ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roy Truelove" <rtruel...@ipicorp.com>
Subject RE: hack? - Custom task, java.lang.VerifyError error
Date Fri, 22 Nov 2002 18:44:42 GMT
A followup to this: this error manifests itself on jvm 1.3.1_01 as the class
just not being found.

In the interm I've fixed the problem.. I added an empty static block to the
problem class, and now don't have any errors :

static
{
	// do nothing.
}

the comment in the code said that it needed to run the class' static
initializer.. is it a must that custom tasks have a static initializer?

thanks,
Roy

> -----Original Message-----
> From: Roy Truelove [mailto:rtruelove@ipicorp.com]
> Sent: Friday, November 22, 2002 12:49 PM
> To: ant-user@jakarta.apache.org
> Subject: hack? - Custom task, java.lang.VerifyError error
>
>
> Hello all,
>
> 	I seem to be the victim of a "hack" in 1.5.1 (jvm 1.3.1_4).
>  I'm getting
> the following error when ant is initially trying to load my custom task :
>
> ------
>
> java.lang.VerifyError: (class: com/ipicorp/anttasks/TaglibAdd, method:
> getXmlDoc
>  signature: (Ljava/io/InputStream;)Lorg/w3c/dom/Document;) Incompatible
> object a
> rgument for function call
>         at java.lang.Class.getConstructors0(Native Method)
>         at java.lang.Class.getDeclaredConstructors(Class.java:1072)
>         at
> org.apache.tools.ant.AntClassLoader.initializeClass(AntClassLoader.ja
> va:482)
> etc....
> ------
>
> Right above line 482 in AntClassLoader.java is the following comment :
>
>         // ***HACK*** We ask the VM to create an instance
>         // by voluntarily providing illegal arguments to force
>         // the VM to run the class' static initializer, while
>         // at the same time not running a valid constructor.
>
> Um... is there a workaround to this?  I wasn't getting the error
> before, so
> I'm guessing a change in my environment will fix it.. I have no
> idea what I
> did differently to start this happening.
>
> Thanks for the help,
> Roy
>
>
> --
> To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:ant-user-help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message