ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject AW: NoClassDefFoundError but class shown as loaded...
Date Tue, 10 Jun 2003 13:45:30 GMT
Sorry, no idea.
Hopefully another guy here knows something.


Jan

> -----Urspr√ľngliche Nachricht-----
> Von: Adam Jack [mailto:ajack@TrySybase.com]
> Gesendet am: Dienstag, 10. Juni 2003 15:43
> An: 'Ant Users List'
> Betreff: RE: NoClassDefFoundError but class shown as loaded...
> 
> I hear that, and am going to go look, but I can't believe it 
> is that because
> (1) debug shows the classes loaded [from parent classloader] 
> (2) I can load
> others from the *same* jar.
> 
> regards
> 
> Adam
> -----Original Message-----
> From: Jan.Materne@rzf.fin-nrw.de [mailto:Jan.Materne@rzf.fin-nrw.de]
> Sent: Tuesday, June 10, 2003 7:24 AM
> To: user@ant.apache.org
> Subject: AW: NoClassDefFoundError but class shown as loaded...
> 
> 
> Sounds like a classpath problem.
> If you had the tasks in %ant%/lib/??.jar earlier the Ant 
> classloader could
> find them when
> resolving <taskdef classname="xy"/>.
> If you move the jar to a project path (e.g. /lib) you have to 
> specify the
> classpath
> <taskdef classname="xy" classpath="lib"/>.
> 
> 
> Jan
> 
> > -----Urspr√ľngliche Nachricht-----
> > Von: Adam Jack [mailto:ajack@TrySybase.com]
> > Gesendet am: Dienstag, 10. Juni 2003 15:21
> > An: user@ant.apache.org
> > Betreff: NoClassDefFoundError but class shown as loaded...
> >
> > I am working on some custom ant tasks, that have been
> > around/working for
> > quite a while. I moved them to a different project (and
> > package FWIIW) so
> > they are in a different jar. Other than that, nothing ought
> > be different.
> >
> > Unfortunately, I am going nuts over an error I am now
> > getting. I am getting
> > a NoClassDefFoundError, despite the class being shown as
> > loaded. If I load
> > one of the other two of the three (in my resource/jar) it
> > works, just this
> > one class fails. Perhaps it is some dependent class that it
> > is loading, but
> > the constructor for it is no different than for the others,
> > so could that
> > really be a factor?
> >
> > I've looked at typos in the resource file, dependent types,
> > etc. etc. Even
> > if I copy-n-paste from the package/classname & have no
> > spaces, same thing. I
> > even wrote <available tests to ensure the class was loadable
> > from the jar,
> > and they pass.
> >
> > Can anybody help me with any other suggestions? Thanks in advance.
> >
> > regards
> >
> > Adam
> > --------------------------------------------------------------
> > --------------
> > ----------------------------
> >
> > Apache Ant version 1.6alpha compiled on January 1 2003
> > Searching for centibuild.xml ...
> > Buildfile:
> > F:\data\automatic\trysybase-cents\plugin-site\centibuild.xml
> > Adding reference: ant.PropertyHelper ->
> > org.apache.tools.ant.PropertyHelper@723d7c
> > Detected Java version: 1.4 in: F:\apps\j2sdk1.4.1\jre
> > Detected OS: Windows 2000
> > Setting ro project property: ant.version -> Apache Ant
> > version 1.6alpha
> > compiled on January 1 2003
> > Setting ro project property: ant.file ->
> > F:\data\automatic\trysybase-cents\plugin-site\centibuild.xml
> > Adding reference: ant.projectHelper ->
> > org.apache.tools.ant.helper.ProjectHelper2@867e89
> > Adding reference: ant.parsing.context ->
> > org.apache.tools.ant.helper.ProjectHelper2$AntXmlContext@1de3f2d
> > Adding reference: ant.targets -> []
> > parsing buildfile
> > F:\data\automatic\trysybase-cents\plugin-site\centibuild.xml
> > with URI =
> > file:///F:/data/automatic/trysybase-cents/plugin-site/centibuild.xml
> > Setting ro project property: ant.project.name -> 
> trysybase.plugin-site
> > Adding reference: trysybase.plugin-site ->
> > org.apache.tools.ant.Project@1f436f5
> > Setting ro project property: ant.file.trysybase.plugin-site ->
> > F:\data\automatic\trysybase-cents\plugin-site\centibuild.xml
> > Project base dir set to: 
> F:\data\automatic\trysybase-cents\plugin-site
> >  +Target:
> > Get task description
> > Get task description
> >    +DataType: description
> > Get task taskdef
> >    +Task: taskdef
> > Loading definitions from resource centipede
> > ResourceStream for centipede loaded from parent loader
> > Class org.krysalis.centipede.ant.antlib.ImportAntLibTask
> > loaded from parent
> > loader ( parentFirst )
> > Get task importantlib
> >  +User task: importantlib
> > org.krysalis.centipede.ant.antlib.ImportAntLibTask
> > Class org.krysalis.centipede.ant.cent.CentipedeTask loaded 
> from parent
> > loader ( parentFirst )
> > Get task centipede
> >  +User task: centipede
> > org.krysalis.centipede.ant.cent.CentipedeTask
> > Class org.krysalis.centipede.ant.antlib.ImportAntLibTask
> > loaded from parent
> > loader ( parentFirst )
> > Get task importcent
> >  +User task: importcent
> > org.krysalis.centipede.ant.antlib.ImportAntLibTask
> > Class org.krysalis.centipede.ant.depend.RuperDependTask
> > loaded from parent
> > loader ( parentFirst )
> > Get task ruperdepend
> >  +User task: ruperdepend
> > org.krysalis.centipede.ant.depend.RuperDependTask
> >
> > BUILD FAILED
> > file:///F:/data/automatic/trysybase-cents/plugin-site/centibui
> > ld.xml:8:
> > Could not create task of type: centipede due to
> > java.lang.NoClassDefFoundError
> > 	at org.apache.tools.ant.Project.createNewTask(Project.java:1068)
> > 	at org.apache.tools.ant.Project.createTask(Project.java:1017)
> > 	at
> > 
> org.apache.tools.ant.UnknownElement.makeTask(UnknownElement.java:307)
> > 	at
> > org.apache.tools.ant.UnknownElement.makeObject(UnknownElement.
> > java:280)
> > 	at
> > org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElem
> > ent.java:123)
> > 	at org.apache.tools.ant.Task.perform(Task.java:347)
> > 	at org.apache.tools.ant.Target.execute(Target.java:309)
> > 	at
> > org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper
> > 2.java:122)
> > 	at
> > org.apache.tools.ant.ProjectHelper.configureProject(ProjectHel
> > per.java:120)
> > 	at org.apache.tools.ant.Main.runBuild(Main.java:597)
> > 	at org.apache.tools.ant.Main.start(Main.java:197)
> > 	at org.apache.tools.ant.Main.main(Main.java:235)
> > Caused by: java.lang.NoClassDefFoundError
> > 	at
> > 
> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> > 	at
> > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeCo
> > nstructorAcces
> > sorImpl.java:39)
> > 	at
> > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Dele
> > gatingConstruc
> > torAccessorImpl.java:27)
> > 	at
> > java.lang.reflect.Constructor.newInstance(Constructor.java:274)
> > 	at java.lang.Class.newInstance0(Class.java:306)
> > 	at java.lang.Class.newInstance(Class.java:259)
> > 	at org.apache.tools.ant.Project.createNewTask(Project.java:1045)
> > 	... 11 more
> > --- Nested Exception ---
> > java.lang.NoClassDefFoundError
> > 	at
> > 
> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> > 	at
> > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeCo
> > nstructorAcces
> > sorImpl.java:39)
> > 	at
> > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Dele
> > gatingConstruc
> > torAccessorImpl.java:27)
> > 	at
> > java.lang.reflect.Constructor.newInstance(Constructor.java:274)
> > 	at java.lang.Class.newInstance0(Class.java:306)
> > 	at java.lang.Class.newInstance(Class.java:259)
> > 	at org.apache.tools.ant.Project.createNewTask(Project.java:1045)
> > 	at org.apache.tools.ant.Project.createTask(Project.java:1017)
> > 	at
> > 
> org.apache.tools.ant.UnknownElement.makeTask(UnknownElement.java:307)
> > 	at
> > org.apache.tools.ant.UnknownElement.makeObject(UnknownElement.
> > java:280)
> > 	at
> > org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElem
> > ent.java:123)
> > 	at org.apache.tools.ant.Task.perform(Task.java:347)
> > 	at org.apache.tools.ant.Target.execute(Target.java:309)
> > 	at
> > org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper
> > 2.java:122)
> > 	at
> > org.apache.tools.ant.ProjectHelper.configureProject(ProjectHel
> > per.java:120)
> > 	at org.apache.tools.ant.Main.runBuild(Main.java:597)
> > 	at org.apache.tools.ant.Main.start(Main.java:197)
> > 	at org.apache.tools.ant.Main.main(Main.java:235)
> >
> > Total time: 0 seconds
> > --
> > <http://www.try.sybase.com>
> > Experience Sybase Technology ...
> >
> >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> > For additional commands, e-mail: user-help@ant.apache.org
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message