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
PGBundleActivator class issues on OpenJ9 #2133
Comments
What is the spec ? |
Of |
where it says how to create the message correctly. |
It does not appear to be specified what the message is anywhere. The javadocs for I noted an error in my report which is that it is
|
Hello, |
Hello, Is there an update on this please? The PR contains my latest update following the comments. |
Apologies. I'll have a look at this today |
I've reworked OSGi tests in #507, and it allows running OSGi tests as a part of pgjdbc test suite. The takeaways are:
|
PGBundleActivator
checks the content of theNoClassDefFoundError
message as the basis of a condition. In OpenJ9 Java 11 JVMs (https://www.eclipse.org/openj9/) this condition is no longer met and thus does not function.the condition is:
msg.contains("org/osgi/service/jdbc/DataSourceFactory")
Unfortunately OpenJ9 uses the class name with "." separators rather than "/" separators, and so in reality this condition needs to be:
(msg.contains("org/osgi/service/jdbc/DataSourceFactory") || msg.contains("org.osgi.service.jdbc.DataSourceFactory"))
I considered reporting this to OpenJ9, but I note that even HotSpot JVMs throw
NoClassDefFoundErrors
with "." rather than "/" (see source forClassLoader.defineClass()
) under some circumstances so best to be defensive against JVM inconsistencies.We are specifically using 42.2.18, but suspect affects all versions.
OpenJ9 version: jdk-11.0.10+9_openj9-0.24.0 from AdoptOpenJDK (https://adoptopenjdk.net/releases.html?variant=openjdk11&jvmVariant=openj9)
The text was updated successfully, but these errors were encountered: