You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// js code
try {
// remove B.class file from the class path, let C can't be loaded
new Packages.test.C();
} finally {
print("not here when load class fail");
}
// java code C.java
package test;
public class C {
public B b;
}
// java code B.java
package test;
public class B {
}
The text was updated successfully, but these errors were encountered:
Thank you for the report. I am able to reproduce an internal error in this case:
$ js
> Java.addToClasspath(classpathEntryWithCclass);
> try { new Packages.test.C() } finally { print("caught"); }
org.graalvm.polyglot.PolyglotException: java.lang.NoClassDefFoundError: test/B
at java.base/java.lang.Class.getDeclaredFields0(Native Method)
at java.base/java.lang.Class.privateGetDeclaredFields(Class.java:3297)
at java.base/java.lang.Class.privateGetPublicFields(Class.java:3324)
at java.base/java.lang.Class.getFields(Class.java:1928)
at com.oracle.truffle.host.HostClassDesc$Members.collectPublicFields(HostClassDesc.java:331)
at com.oracle.truffle.host.HostClassDesc$Members.<init>(HostClassDesc.java:147)
at com.oracle.truffle.host.HostClassDesc.getMembers(HostClassDesc.java:514)
at com.oracle.truffle.host.HostClassDesc.lookupConstructor(HostClassDesc.java:610)
at com.oracle.truffle.host.HostObject$LookupConstructorNode.doUncached(HostObject.java:3330)
at com.oracle.truffle.host.HostObjectFactory$LookupConstructorNodeGen$Inlined.executeAndSpecialize(HostObjectFactory.java:723)
at com.oracle.truffle.host.HostObjectFactory$LookupConstructorNodeGen$Inlined.execute(HostObjectFactory.java:701)
at com.oracle.truffle.host.HostObject$Instantiate.doObjectCached(HostObject.java:1602)
at com.oracle.truffle.host.HostObjectGen$InteropLibraryExports$Cached.instantiateAndSpecialize(HostObjectGen.java:3988)
at com.oracle.truffle.host.HostObjectGen$InteropLibraryExports$Cached.instantiate(HostObjectGen.java:3959)
at com.oracle.truffle.api.interop.InteropLibraryGen$CachedDispatch.instantiate(InteropLibraryGen.java:7982)
at com.oracle.truffle.js.nodes.function.JSNewNode.doNewForeignObject(JSNewNode.java:210)
js version 22.3.1, 21.3.5
// js code
try {
// remove B.class file from the class path, let C can't be loaded
new Packages.test.C();
} finally {
print("not here when load class fail");
}
// java code C.java
package test;
public class C {
public B b;
}
// java code B.java
package test;
public class B {
}
The text was updated successfully, but these errors were encountered: