Incremental build failure due to class loading problem.

Project:JNode Builder
Component:Miscellaneous
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

I'm frequently seeing JNode build failures when I do an incremental build using './build.sh cd-x86-lite'. The problem goes away when I run './build.sh clean ; ./build.sh cd-x86-lite', only to recur later on. This is happening often enough to be a real nuisance.

(I should note that I always do a 'clean' build after checking out changes from SVN ... so this is not "that" problem. And it is not the "too many files open" problem.)

Here is the stacktrace:

BUILD FAILED
java.lang.NoClassDefFoundError: org/jnode/plugin/model/PluginJar
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
        at org.apache.tools.ant.AntClassLoader.defineClassFromData(AntClassLoader.java:1146)
        at org.apache.tools.ant.AntClassLoader.getClassFromStream(AntClassLoader.java:1324)
        at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1388)
        at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1341)
        at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1088)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at org.jnode.build.InitJarBuilder.execute(InitJarBuilder.java:111)
        at org.jnode.build.InitJarsBuilder.execute(InitJarsBuilder.java:83)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
        at org.apache.tools.ant.Main.runBuild(Main.java:758)
        at org.apache.tools.ant.Main.startAnt(Main.java:217)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: java.lang.ClassNotFoundException: org.jnode.plugin.model.PluginJar
        at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1400)
        at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1341)
        at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1088)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        ... 27 more

#1

This has never ever happened to me, though I do a clean build as rarely as possible. So I wonder if someone can reproduce it.
Isn't there something very unsusual in your environment or in the way you are calling the build?
I'm calling the build from the command line. Other ways might be not so well tested and less stable.

#2

I'm simply running the build from the Linux command line also.

I guess I'll have to investigate this myself.

#3

Hmmm ...

I upgraded my Java to 1.6.0 patch 12 (was patch 4), and the problem appears to have gone away.

#4

Status:active» fixed

I've noted the need to use a recent JDK in the build documentation. Marking as 'fixed'.

#5

Status:fixed» closed