D
Daniel
Hello
I have written a Ant Task which increments a version number by
deserializing an XMLEncoder file and reserializing it after
incrementing. The task is in com.xmatrix.ant.VersionInfoIncrementor
and the VersionInfo class in com.xmatrix.update.VersionInfo. They both
are located in the same JAR! However, Ant (even the newest 1.6.1) does
not find VersionInfo, however it does successfully find the
VersionInfoIncrementor task!
A classpath problem of the strange kind. I would like to understand
this. Any suggestions are welcome.
Daniel Frey
Ant output
------------------------
[cvs] Caught exception: CreateProcess: cvs update
config/META-INF/VersionI
nfo.xml error=2
[versioninfo] java.lang.ClassNotFoundException:
com.xmatrix.update.VersionInfo
[versioninfo] Continuing ...
[versioninfo] java.lang.NullPointerException
[versioninfo] Continuing ...
[versioninfo] java.lang.NullPointerException
[versioninfo] Continuing ...
[versioninfo] java.lang.NullPointerException
[versioninfo] Continuing ...
[versioninfo] java.lang.NullPointerException
[versioninfo] Continuing ...
[versioninfo] java.lang.NullPointerException
[versioninfo] Continuing ...
[versioninfo] java.lang.NullPointerException
[versioninfo] Continuing ...
[versioninfo] java.lang.NullPointerException
[versioninfo] Continuing ...
[versioninfo] java.lang.NullPointerException
[versioninfo] Continuing ...
[versioninfo] java.lang.NullPointerException
[versioninfo] Continuing ...
[versioninfo] java.lang.NullPointerException
[versioninfo] Continuing ...
[versioninfo] java.lang.NullPointerException
[versioninfo] Continuing ...
BUILD FAILED
java.lang.NullPointerException: VersionInfo object in file
E:\Daten\HerbarCD\Ver
sion2.1\config\META-INF\VersionInfo.xml not deserialized successfully
at com.xmatrix.ant.VersionInfoIncrementor.doExecute(VersionInfoIncrement
or.java:56)
at com.xmatrix.ant.Incrementor.execute(Incrementor.java:85)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:301)
at org.apache.tools.ant.Target.performTasks(Target.java:328)
at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:383)
at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:301)
at org.apache.tools.ant.Target.performTasks(Target.java:328)
at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:383)
at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:301)
at org.apache.tools.ant.Target.performTasks(Target.java:328)
at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:383)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:301)
at org.apache.tools.ant.Target.performTasks(Target.java:328)
at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:383)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:301)
at org.apache.tools.ant.Target.performTasks(Target.java:328)
at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
at org.apache.tools.ant.Project.executeTargets(Project.java:1063)
at org.apache.tools.ant.Main.runBuild(Main.java:632)
at org.apache.tools.ant.Main.startAnt(Main.java:183)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:197)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)
Total time: 3 seconds
java.lang.NullPointerException: VersionInfo object in file
E:\Daten\HerbarCD\Ver
sion2.1\config\META-INF\VersionInfo.xml not deserialized successfully
at com.xmatrix.ant.VersionInfoIncrementor.doExecute(VersionInfoIncrement
or.java:56)
at com.xmatrix.ant.Incrementor.execute(Incrementor.java:85)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:301)
at org.apache.tools.ant.Target.performTasks(Target.java:328)
at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:383)
at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:301)
at org.apache.tools.ant.Target.performTasks(Target.java:328)
at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:383)
at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:301)
at org.apache.tools.ant.Target.performTasks(Target.java:328)
at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:383)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:301)
at org.apache.tools.ant.Target.performTasks(Target.java:328)
at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:383)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:301)
at org.apache.tools.ant.Target.performTasks(Target.java:328)
at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
at org.apache.tools.ant.Project.executeTargets(Project.java:1063)
at org.apache.tools.ant.Main.runBuild(Main.java:632)
at org.apache.tools.ant.Main.startAnt(Main.java:183)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:197)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)
VersionInfo object in file
E:\Daten\HerbarCD\Version2.1\config\META-INF\VersionI
nfo.xml not deserialized successfully
I have written a Ant Task which increments a version number by
deserializing an XMLEncoder file and reserializing it after
incrementing. The task is in com.xmatrix.ant.VersionInfoIncrementor
and the VersionInfo class in com.xmatrix.update.VersionInfo. They both
are located in the same JAR! However, Ant (even the newest 1.6.1) does
not find VersionInfo, however it does successfully find the
VersionInfoIncrementor task!
A classpath problem of the strange kind. I would like to understand
this. Any suggestions are welcome.
Daniel Frey
Ant output
------------------------
[cvs] Caught exception: CreateProcess: cvs update
config/META-INF/VersionI
nfo.xml error=2
[versioninfo] java.lang.ClassNotFoundException:
com.xmatrix.update.VersionInfo
[versioninfo] Continuing ...
[versioninfo] java.lang.NullPointerException
[versioninfo] Continuing ...
[versioninfo] java.lang.NullPointerException
[versioninfo] Continuing ...
[versioninfo] java.lang.NullPointerException
[versioninfo] Continuing ...
[versioninfo] java.lang.NullPointerException
[versioninfo] Continuing ...
[versioninfo] java.lang.NullPointerException
[versioninfo] Continuing ...
[versioninfo] java.lang.NullPointerException
[versioninfo] Continuing ...
[versioninfo] java.lang.NullPointerException
[versioninfo] Continuing ...
[versioninfo] java.lang.NullPointerException
[versioninfo] Continuing ...
[versioninfo] java.lang.NullPointerException
[versioninfo] Continuing ...
[versioninfo] java.lang.NullPointerException
[versioninfo] Continuing ...
[versioninfo] java.lang.NullPointerException
[versioninfo] Continuing ...
BUILD FAILED
java.lang.NullPointerException: VersionInfo object in file
E:\Daten\HerbarCD\Ver
sion2.1\config\META-INF\VersionInfo.xml not deserialized successfully
at com.xmatrix.ant.VersionInfoIncrementor.doExecute(VersionInfoIncrement
or.java:56)
at com.xmatrix.ant.Incrementor.execute(Incrementor.java:85)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:301)
at org.apache.tools.ant.Target.performTasks(Target.java:328)
at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:383)
at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:301)
at org.apache.tools.ant.Target.performTasks(Target.java:328)
at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:383)
at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:301)
at org.apache.tools.ant.Target.performTasks(Target.java:328)
at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:383)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:301)
at org.apache.tools.ant.Target.performTasks(Target.java:328)
at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:383)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:301)
at org.apache.tools.ant.Target.performTasks(Target.java:328)
at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
at org.apache.tools.ant.Project.executeTargets(Project.java:1063)
at org.apache.tools.ant.Main.runBuild(Main.java:632)
at org.apache.tools.ant.Main.startAnt(Main.java:183)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:197)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)
Total time: 3 seconds
java.lang.NullPointerException: VersionInfo object in file
E:\Daten\HerbarCD\Ver
sion2.1\config\META-INF\VersionInfo.xml not deserialized successfully
at com.xmatrix.ant.VersionInfoIncrementor.doExecute(VersionInfoIncrement
or.java:56)
at com.xmatrix.ant.Incrementor.execute(Incrementor.java:85)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:301)
at org.apache.tools.ant.Target.performTasks(Target.java:328)
at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:383)
at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:301)
at org.apache.tools.ant.Target.performTasks(Target.java:328)
at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:383)
at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:301)
at org.apache.tools.ant.Target.performTasks(Target.java:328)
at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:383)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:301)
at org.apache.tools.ant.Target.performTasks(Target.java:328)
at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:383)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:301)
at org.apache.tools.ant.Target.performTasks(Target.java:328)
at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
at org.apache.tools.ant.Project.executeTargets(Project.java:1063)
at org.apache.tools.ant.Main.runBuild(Main.java:632)
at org.apache.tools.ant.Main.startAnt(Main.java:183)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:197)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)
VersionInfo object in file
E:\Daten\HerbarCD\Version2.1\config\META-INF\VersionI
nfo.xml not deserialized successfully