You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Stephen Haberman <st...@chase3000.com> on 2002/08/17 12:27:43 UTC

RE: [jelly] VerifyError woes - update

Okay, so I fixed the ClassCastException...GrantProject.getProperties()
had to return a hash table with only Strings in it, so I just did
toString() on the key/value out of PropsHandler and all is well with
Jelly.

Jelly's use of ant is now where I had wanted it to be. I can call down
into ant and it works great.

But I'm still getting the VerifyError exception when trying to use the
new jelly/grant with maven. The AntClassLoader seems to be causing the
error, though I haven't figured out why just yet.

In the two places I've had the error occur, they're both Ant tasks
(Property and JUnitTask), it's called via new AntClassLoader(...
project, classpath, ...) where project is a data member of Task of type
Project, but we've put in a derived GrantProject. Though that shouldn't
matter.

I've attached the latest diffs of grant and jelly I'm working with along
with the VerifyError extra exception trace that comes from calling the
Ant task from a maven.xml.



I'm about to the point to say instead of wrapping JellyContext in
PropsHandler, why not just copy all of the context variables in to the
Ant project each time an ant task is called? It's not as sexy, but it'd
let Ant have it's native Project class, which I would imagine would get
rid of this damn VerifyError.

Thoughts?

- Stephen

> -----Original Message-----
> From: Stephen Haberman [mailto:stephenh@chase3000.com]
> Sent: Saturday, August 17, 2002 2:46 AM
> To: commons-dev@jakarta.apache.org
> Subject: [jelly] VerifyError woes
> 
> Hi,
> 
> I've been patching commons-grant and commons-jelly to execute Ant
tasks
> from jelly/maven scripts correctly (specifically making sure that the
> jelly/maven context properties get inherited down to the new ant
> project).
> 
> I've made great, but slow, progress with grant and jelly, but now I
> can't the patched versions integrated back into maven without
> VerifyErrors.
> 
> Here are the results of my plight... any help would be greatly
> appreciated.
> 
> The grant-getProperties.txt adds the getProperties to GrantProject,
> which seems to be the root of the whole not-inheriting-properties bug.
> 
> The jelly-big.txt is a big patch of how my jelly checkout is. It has a
> small, unrelated dynamic tag patch, along with changing jelly's
> AntTag/AntTagLibrary to use GrantProject with a maven-inspired wrapper
> around the JellyContext.
> 
> So, now for the funny behavior. Maven itself works fine, it's only
when
> it tries to execute the test:test/junit stuff do things go awry.
> 
> The stack traces are ugly, so I've attached an errors.txt with several
> different stack traces along with the results of maven --info.
> 
> I also tried running ant:junit straight from jelly; I get a
> ClassCastException...the stack trace is in errors.txt, but the origin
of
> it is:
> 
> [ERROR] TagScript - -Caught exception: java.lang.ClassCastException:
> [Ljava.lang.String; <java.lang.ClassCastException:
[Ljava.lang.String;>
> java.lang.ClassCastException: [Ljava.lang.String;
> 	at java.util.Properties.store(Properties.java:451)
> 	at java.util.Properties.save(Properties.java:389)
> 
> So between java.util.Properties.save throwing a ClassCastException and
> the VerifyError in maven, I'm stumped. Any help or pointers would be
> really, really appreciated.
> 
> Thanks,
> Stephen

RE: [jelly] VerifyError woes - resolved

Posted by Stephen Haberman <st...@chase3000.com>.
Earlier today Bob McWhirter saved me by suggesting I use javac instead
of jikes. Sure enough, after compiling grant and jelly with javac, the
ant/maven's VerifyError goes away.

So, things are working good. I'll post some more patches with the
completed (working) grant/jelly/maven stuff I've been working on.

- Stephen


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>