Thanks for the suggestion, Vincent.

I had actually looked up the -X and -e switches and tried those,
however, Maven was giving me stack traces like this:

        at org.apache.tools.ant.taskdefs.Exit.execute(Exit.java:104)
        at org.apache.tools.ant.Task.perform(Task.java:319)
        at
org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:231)
        at
org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
        at
org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
//(Although, this one is for a failed test not an error, lest anyone be
//confused if you are familiar with that part of the code base)

The real error was due to a dependency that was not specified for some
initialization code in a static block in the unit test. (Hence, the no
class definition found message.)

Interestingly enough, I actually get the real error when I run the Junit
swing GUI *AND* when I run the junit report as part of the site plug-in.

Is there any way to have the actual exception passed up through the
Jelly framework? It still seems like it is being swallowed along the way
and a trace with less information is being produced. Or, perhaps the
exception is being wrapped and the actual cause of the exception is not
being interrogated by the error print code.

I guess I could log a bug investigation report on it until I have more
time to look through the code on what's happening.

--Todd









-----Original Message-----
From: Vincent Massol [mailto:[EMAIL PROTECTED] 
Sent: Sunday, July 06, 2003 1:11 AM
To: 'Maven Users List'; [EMAIL PROTECTED]
Subject: RE: Junit Difficulties


Hi Todd,

You can try running with "maven -X" or "maven -e" to get more
information. 

-Vincent

> -----Original Message-----
> From: Todd Feather [mailto:[EMAIL PROTECTED]
> Sent: 06 July 2003 07:01
> To: 'Maven Users List'; [EMAIL PROTECTED]
> Subject: RE: Junit Difficulties
> 
> Could someone chime in with how to decipher the information in this
> message:
> 
> BUILD FAILED -- This part I get... ;-)
> 
> null:73:39: <junit> java.lang.NoClassDefFoundError
> com.werken.werkz.UnattainableGoalException: Unable to obtain goal 
> [build] -- null:29:31: <attainGoal> null:73:39: <junit
> > java.lang.NoClassDefFoundError
>         at com.werken.werkz.Goal.fire(Goal.java:646)
>         at com.werken.werkz.Goal.attain(Goal.java:575)
>         at
>
org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:394
> )
> 
> 
> 
> I get the no class def found is generally clearer than this. Is there
a
> class I'm supposed to get from this message that I'm unaware of? Do I 
> need the crystal ball to figure out which class it cannot find?
> 
> Also, for this line:
> null:73:39: <junit> java.lang.NoClassDefFoundError
> 
> The 73 and 39 look like line numbers, but which files do they pertain 
> to? Is this from the initial xml file (they don't seem to match up
> there) or some other intermediary representation. Is null supposed to 
> mean something here as well?
> 
> Thanks,
> 
> Todd
> 
> 
> 
> -----Original Message-----
> From: Todd Feather [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 04, 2003 11:56 PM
> To: Maven Users List
> Subject: Junit Difficulties
> 
> I'm trying to run a basic junit test only a couple of classes.
> 
> When I run the test goal, I get this on the console:
> 
> test:test:
>     [junit] dir attribute ignored if running in the same VM
> 
> BUILD FAILED
> java.lang.NoClassDefFoundError
> Total time:  20 seconds
> 
> However, the log seems to report a different error:
> 
> 2003-07-04 23:48:24,682 WARN 
> org.apache.commons.jelly.expression.jexl.JexlExpression - Caught 
> exception
> evaluating: [EMAIL PROTECTED] Reason:
> java.lang.NumberFormatException: includes
> java.lang.NumberFormatException: includes
>             at java.lang.Integer.parseInt(Integer.java:426)
>             at java.lang.Integer.valueOf(Integer.java:532)
>             at
> org.apache.commons.jexl.util.Coercion.coerceInteger(Coercion.java:95)
>             at
>
org.apache.commons.jexl.parser.ASTArrayAccess.evaluateExpr(ASTArrayAcces
> s.ja
> va:177)
>             at
>
org.apache.commons.jexl.parser.ASTIdentifier.execute(ASTIdentifier.java:
> 104)
>             at
>
org.apache.commons.jexl.parser.ASTReference.execute(ASTReference.java:10
> 6)
>             at
>
org.apache.commons.jexl.parser.ASTReference.value(ASTReference.java:88)
>             at
> org.apache.commons.jexl.parser.ASTNotNode.value(ASTNotNode.java:88)
>             at
>
org.apache.commons.jexl.parser.ASTExpression.value(ASTExpression.java:85
> )
>             at
>
org.apache.commons.jexl.ExpressionImpl.evaluate(ExpressionImpl.java:123)
>             at
>
org.apache.commons.jelly.expression.jexl.JexlExpression.evaluate(JexlExp
> ress
> ion.java:115)
>             at
>
org.apache.commons.jelly.expression.jexl.JexlExpressionFactory$Expressio
> nSup
> portLocal.evaluate(JexlExpressionFactory.java:168)
>             at
>
org.apache.commons.jelly.expression.ExpressionSupport.evaluateRecurse(Ex
> pres
> sionSupport.java:106)
>             at
>
org.apache.commons.jelly.expression.ExpressionSupport.evaluateAsBoolean(
> Expr
> essionSupport.java:116)
>             at
> org.apache.commons.jelly.tags.core.WhenTag.doTag(WhenTag.java:90)
>             at
> org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
>             at
> org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
>             at
> org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
>             at
> org.apache.commons.jelly.tags.core.ChooseTag.doTag(ChooseTag.java:84)
>             at
> org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
>             at
> org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
>             at
> org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
>             at
> com.werken.werkz.jelly.ProjectTag.doTag(ProjectTag.java:112)
>             at
> org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
>             at
> org.apache.maven.jelly.JellyUtils.runScript(JellyUtils.java:112)
>             at
> org.apache.maven.jelly.JellyUtils.runScript(JellyUtils.java:139)
>             at
>
org.apache.maven.plugin.PluginManager.loadPlugin(PluginManager.java:684)
>             at
>
org.apache.maven.plugin.PluginManager.prepForGoal(PluginManager.java:486
> )
>             at
>
org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:375
> )
>             at
> org.apache.maven.MavenSession.attainGoals(MavenSession.java:357)
>             at org.apache.maven.cli.App.doMain(App.java:524)
>             at org.apache.maven.cli.App.main(App.java:1080)
>             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
>             at
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
> a:39
> )
>             at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
> Impl
> .java:25)
>             at java.lang.reflect.Method.invoke(Method.java:324)
>             at com.werken.forehead.Forehead.run(Forehead.java:543)
>             at com.werken.forehead.Forehead.main(Forehead.java:573)
> 
> 
> Is someone not passing up the actual exception message?
> 
> My project.xml includes the default setup as generated by the genapp 
> plugin.
> 
> Has anyone else seen this problem? I'm running beta 9.
> 
> Thanks,
> 
> Todd
> 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to