Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
NPE in GlassFishORBHelper.getORB #1967
NullpointerException in GlassFishORBHelper:163 when trying to call ping-connection-pool in prepare-resources.txt.
It seems the orbFactory property is not initialized (Inject annotation is commented out, postConstruct method is not called yet, maybe it has some reason).
Command execution causing successful verification of the JDBC pool configuration.
Steps to reproduce (Only for bug reports)
The last command fails. There are more stakctraces hinting that my prebootcommandfile is not correct, but none of them says that directly. NPE is really ugly.
First attempts to use Payara Micro with JAX-RS, JPA, JSF and JTA.
In this case, Payara Micro is behaving accordingly based on the configuration you have set up. According to the official docs, there are some restrictions on asadmin commands that are run as part of a preboot-command script. In this case, the
Hope this clears the issue.
I got some bad news and some good news ... since I rebooted Payara Micro never started from Maven plugin with any version of Payara Micro (current snapshot 188.8.131.52 I have built, 184.108.40.206, 220.127.116.11), it crashed with always the same NPE on the same line. I removed all the pre and post scripts but nothing helped. It took me four hours until I remembered that I tried to install and use OpenJDK9 from Kubuntu repository. It did matter despite I used JDK8 in .mavenrc and JAVA_HOME.
It seems that the ORB initialization is completely evily wrong - thread race conditions and "dummy workarounds" in the code - see synchronized blocks, methods, double-checked locking, commented out @Inject annotation, mixing factory/service initialization and setter/getter, getters using the factory that might not have been initialized, TODOs in other classes ... this code makes me mad ... but I have no time to fix it all and even worse, I cannot understand all mechanisms (hacks) working with this.
Today I will push some small changes in GlassFishORBHelper (NPE with a message), but I think there is much more work needed on the mechanism. But it should work for now ...
Yep. I had issues with building current snapshot of Payara4 - embedded is built only with a profile but crashes due some weird Ant error ... (some dependency packaged with incompatible ZIP algorithm?), so I patched 18.104.22.168.0.1 version - and tested both with embedded and micro distributions. Both work but for micro it seems ORB factory is not initialized at all and it uses setOrb method and does no calls to getters (because I have noticed no errors); so the message level I will lower before commit ...:
Embedded distribution initializes via the ServiceLocator ...
And the stacktrace when I add the "ping" to will now look like this (not much difference, but ...):