-
Notifications
You must be signed in to change notification settings - Fork 1.7k
native-image output cannot find com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl #684
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@dsilvasc it looks like you are trying to allocate classes with |
In this case the call to the JDK's The Oracle JDK docs don't mention the classes it will try to load: In general how should users determine which internal classes Oracle's implementation of the JDK might try to load at runtime? |
I tried adding it to the reflection config JSON, but then it complains during build time that no such method ( |
To automatically discover reflectively used elements you can now use the |
This still occurs with GraalVM CE 20.0 when using the native image agent (e.g.,
Note that the method in question ( /**
* Find a Class using the specified ClassLoader
*/
public static Class findProviderClass(String className, ClassLoader cl,
boolean doFallback)
throws ClassNotFoundException, ConfigurationError
{
//throw security exception if the calling thread is not allowed to access the package
//restrict the access to package as speicified in java.security policy
SecurityManager security = System.getSecurityManager();
if (security != null) {
if (className.startsWith(JAXP_INTERNAL) ||
className.startsWith(STAX_INTERNAL)) {
cl = null;
} else {
final int lastDot = className.lastIndexOf(".");
String packageName = className;
if (lastDot != -1) packageName = className.substring(0, lastDot);
security.checkPackageAccess(packageName);
}
}
Class providerClass;
if (cl == null) {
//use the bootstrap ClassLoader.
providerClass = Class.forName(className, false, ObjectFactory.class.getClassLoader());
} else {
try {
providerClass = cl.loadClass(className);
} catch (ClassNotFoundException x) {
if (doFallback) {
// Fall back to current classloader
ClassLoader current = ObjectFactory.class.getClassLoader();
if (current == null) {
providerClass = Class.forName(className);
} else if (cl != current) {
cl = current;
providerClass = cl.loadClass(className);
} else {
throw x;
}
} else {
throw x;
}
}
}
return providerClass;
} Please reopen this issue. |
Perhaps effectively a duplicate of #1387. |
I will add for Google to to index. Whoever will try to use POI with graalvm and get
|
To reproduce this, first compile the coverage report tool from gradle-scoverage with graal native-image:
Then try it out:
The text was updated successfully, but these errors were encountered: