commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fernando Nasser (JIRA)" <commons-...@jakarta.apache.org>
Subject [jira] Created: (JELLY-210) invokeStatic causes ClassNotFoundException in junit test testSetSingleNode during buil
Date Wed, 27 Apr 2005 20:54:31 GMT
invokeStatic causes ClassNotFoundException in junit test testSetSingleNode during buil
--------------------------------------------------------------------------------------

         Key: JELLY-210
         URL: http://issues.apache.org/jira/browse/JELLY-210
     Project: jelly
        Type: Bug
  Components: taglib.xml  
    Versions: 1.0-RC1    
 Environment: Linux installed with JPackage Java RPMs
    Reporter: Fernando Nasser


When trying to build COMMONS_JELLY-1_0_RC1 I get an error on the test

testSetSingleNode
from
jakarta-commons/jelly/jelly-tags/xml/src/test/org/apache/commons/jelly/tags/xml/suite.jelly

I get:
    [junit] Testcase: testSetSingleNode took 0.029 sec
    [junit]     Caused an ERROR
    [junit] file:/notnfs/fnasser/BUILD/commons-jelly-1.0-RC1/jelly-tags/xml/target/test-classes/org/apache/commons/jelly/tags/xml/suite.jelly:295:85:
<j:invokeStatic> method forName threw exception: org.dom4j.Element
    [junit] org.apache.commons.jelly.JellyTagException: file:/notnfs/fnasser/BUILD/commons-jelly-1.0-RC1/jelly-tags/xml/target/test-classes/org/apache/commons/jelly/tags/xml/suite.jelly:295:85:
<j:invokeStatic> method forName threw exception: org.dom4j.Element
    [junit]     at org.apache.commons.jelly.tags.core.InvokeStaticTag.doTag(Lorg.apache.commons.jelly.XMLOutput;)V(InvokeStaticTag.java:148)
    [junit]     at org.apache.commons.jelly.impl.TagScript.run(Lorg.apache.commons.jelly.JellyContext;Lorg.apache.commons.jelly.XMLOutput;)V(TagScript.java:253)
(...)
    [junit] Caused by: java.lang.ClassNotFoundException: org.dom4j.Element
    [junit]     at java.lang.Class.forName(Ljava.lang.String;I)Ljava.lang.Class;(Unknown Source)
    [junit]     at java.lang.Class.forName(Ljava.lang.String;)Ljava.lang.Class;(Unknown Source)
    [junit]     at jrockit.reflect.NativeMethodInvoker.invoke0(Ljava.lang.Object;ILjava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown
Source)
(...)

However, the classpath given to junit has the dom4j.jar:

    [junit] '/usr/share/java/ant.jar:/usr/share/java/ant-launcher.jar:/usr/share/java/jaxp_parser_impl.jar:/usr/share/java/xml-commons-apis.jar:/usr/share/java/ant/ant-junit.jar:/usr/share/java/junit.jar:/usr/lib/jvm/java/lib/tools.jar:/notnfs/fnasser/BUILD/commons-jelly-1.0-RC1/jelly-tags/junit/target/commons-jelly-tags-junit-1.0-SNAPSHOT.jar:/home/fnasser/topdir/BUILD/commons-jelly-1.0-RC1/target/commons-jelly-1.0-beta-5-SNAPSHOT.jar:/notnfs/fnasser/BUILD/commons-jelly-1.0-RC1/jelly-tags/xml/target/classes:/notnfs/fnasser/BUILD/commons-jelly-1.0-RC1/jelly-tags/xml/target/test-classes:/usr/share/java/commons-beanutils16.jar:/usr/share/java/commons-cli.jar:/usr/share/java/commons-collections.jar:/usr/share/java/commons-discovery.jar:/usr/share/java/commons-jexl.jar:/usr/share/java/commons-lang.jar:/usr/share/java/commons-logging.jar:/usr/share/java/taglibs-core.jar:/usr/share/java/dom4j.jar:/usr/share/java/forehead.jar:/usr/share/java/jaxen.jar:/usr/share/java/servletapi4.jar:/usr/share/java/xerces-j2.jar'


That is how ant was called:

  pushd xml
    JELLY_TAGS_XML_DEPS=$JELLY_TAGS_DEPS
    CLASSPATH=$JELLY_TAGS_XML_DEPS
    ant -Dbuild.sysclasspath=only dist
  popd


Before you ask, I've checked and dom4j.jar do has the org/dom4j/Element.class in it.


So, invokeStatic does not (always *) find the java.lang.Class wanted.

* = I assume it has passed this test for some






-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message