eclipse-ocl / org.eclipse.ocl

Eclipse Public License 2.0
0 stars 0 forks source link

[tests] Plugin test fail to resolve library classes #1593

Open eclipse-ocl-bot opened 2 months ago

eclipse-ocl-bot commented 2 months ago

| --- | --- | | Bugzilla Link | 474158 | | Status | NEW | | Importance | P3 normal | | Reported | Aug 03, 2015 11:35 EDT | | Modified | Aug 10, 2017 10:10 EDT | | Reporter | Ed Willink |

Description

Running org.eclipse.ocl.examples.test.xtext.testCSE as part of a Plugin test passes, but the console log shows:

1 [main] ERROR org.eclipse.ocl.examples.codegen.asm5.ASM5JavaAnnotationReader - Failed to read 'org.eclipse.ocl.pivot.library.numeric.NumericPlusOperation'\ java.io.IOException: Class not found\ at org.objectweb.asm.ClassReader.a(Unknown Source)\ at org.objectweb.asm.ClassReader.(Unknown Source)\ at org.eclipse.ocl.examples.codegen.asm5.ASM5JavaAnnotationReader.getIsNonNull(ASM5JavaAnnotationReader.java:66)\ at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\ at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)\ at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\ at java.lang.reflect.Method.invoke(Method.java:606)\ at org.eclipse.ocl.examples.codegen.java.JavaCodeGenerator.getIsNonNull(JavaCodeGenerator.java:312)\ at org.eclipse.ocl.examples.codegen.java.CG2JavaVisitor.visitCGLibraryOperationCallExp(CG2JavaVisitor.java:1712)\ at org.eclipse.ocl.examples.codegen.java.CG2JavaVisitor.visitCGLibraryOperationCallExp(CG2JavaVisitor.java:1)

for both ASM5 and ASM3.

This does not appear to happen on Hudson and probably did not occur until recently.

Debugging the problem lines are

String classFileName = className.replace('.', '/') + ".class";\ classStream = contextClassLoader.getResourceAsStream(classFileName);

classStream is null provoking the failure although classFileName is identical for standalone and plugin tests.

?? has the pltform classloader gone bad\ ?? is this another Java 7/8 magic (8 on Hudson, 7/8 interactively.)

Changing to Java 8 for interactive launch makes no difference.

Is this is just a perverse inelegance in console output or does it hide a problem whereby code generated classes are not adequately consumable?

eclipse-ocl-bot commented 2 months ago

By Ed Willink on Aug 10, 2017 10:10

At that time many auto-compile invocations completely ignored their compilation failures leaving diagnosis to obscure corrolaries. Perhaps missing errors contributed.