History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: JANINO-67
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Arno Unkrig
Reporter: Robert Cannon
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Janino

classes that cause a LinkageError (duplicate class definition) when loaded

Created: 29/Aug/06 04:21 AM   Updated: 11/Sep/06 01:12 PM
Component/s: None
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments: 1. Zip Archive embeddingTests.zip (11 kb)

Environment: Sun JDK 1.5.0_06 on Linux

Testcase included: yes


 Description  « Hide
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)



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Arno Unkrig - 11/Sep/06 01:12 PM
Fixed the logic of [Caching]JavaSourceClassLoader; wrote two JUNIT tests.

JSCL and CJSCL should now work as expected.

Released as version 2.4.7.