Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Environment:Sun JDK 1.5.0_06 on Linux
-
Testcase included:yes
-
Number of attachments :
Description
The attachment contains five small files (few lines each) with messy dependencies. When loaded from
source, beginning with BallCellDef, it generates the stack trace below. The src folder has an example
that attempts the load and generates the errors.
When loaded from .class files, all is well: the problem only arises when there are no class files there.
Exception in thread "main" java.lang.LinkageError: duplicate class definition: org/ccneuro/cell/compact/WkItemStruct
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.lang.ClassLoader.defineClass(ClassLoader.java:465)
at org.codehaus.janino.JavaSourceClassLoader.defineBytecode(JavaSourceClassLoader.java:358)
at org.codehaus.janino.JavaSourceClassLoader.defineBytecodes(JavaSourceClassLoader.java:343)
at org.codehaus.janino.CachingJavaSourceClassLoader.findClass(CachingJavaSourceClassLoader.java:195)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at BallCellTest.main(BallCellTest.java:33)
Fixed the logic of [Caching]JavaSourceClassLoader; wrote two JUNIT tests.
JSCL and CJSCL should now work as expected.
Released as version 2.4.7.