JNLP application not openning when using signed Jars

The public knowledge pool and discussion forum of the OWS community. Do not post confidential information here!
henriquert
Posts: 2
Joined: 26 Jun 2024, 13:43

JNLP application not openning when using signed Jars

Post by henriquert »

Hi,

We have been using Open Web Start 1.7.0 version and after migrating our application from javax to jakarta namespace along with upgrading the server from Payara 5 to Payara 6.2024.5 we are facing issues when opening JNLP application. Running the app as an standalone application using the same classpath as the one in JNLP file work as before, so it's not an issue from the application. This issue happens when we try to open the JNLP with the jars signed:

java.lang.RuntimeException: javax.naming.CommunicationException: Communication exception for SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is java.lang.NullPointerException]
at com.mmsi.util.ServerStatus.getServerStatusReader(ServerStatus.java:132)
at com.mmsi.util.ServerStatus.isCallerInRole(ServerStatus.java:104)
at com.mmsi.smartui.login.service.LoginService.isRoleAuthorized(LoginService.java:94)
at com.mmsi.smartui.login.service.LoginService.setContext(LoginService.java:65)
at com.mmsi.imine.gaf.AbstractMainForm.putService(AbstractMainForm.java:340)
at com.mmsi.imine.gaf.xml.XmlMainForm.loadService(XmlMainForm.java:272)
at com.mmsi.imine.gaf.xml.XmlMainForm.loadServices(XmlMainForm.java:239)
at com.mmsi.imine.gaf.xml.XmlMainForm.loadConfig(XmlMainForm.java:103)
at com.mmsi.imine.gaf.xml.XmlMainForm.main(XmlMainForm.java:341)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.mmsi.smartui.gui.splash.SplashWindow.invokeMain(SplashWindow.java:292)
at com.mmsi.smartui.gui.splash.Splasher.main(Splasher.java:71)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:406)
at net.sourceforge.jnlp.Launcher.access$300(Launcher.java:71)
at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:660)
Caused by: javax.naming.CommunicationException: Communication exception for SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is java.lang.NullPointerException]
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:518)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:442)
at java.naming/javax.naming.InitialContext.lookup(InitialContext.java:409)
at com.mmsi.util.ServerStatus.getServerStatusReader(ServerStatus.java:124)
... 21 more
Caused by: java.lang.NullPointerException
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:483)
... 24 more

Is there a way of disabling the signing check to test the application using unsigned jars? Please can you provide support on a possible solution?

Operating System
Window Server 2019 Standard

JDK Version
Zulu JDK 11.0.23

Janak Mulani
Posts: 817
Joined: 24 Mar 2020, 13:37

Re: JNLP application not openning when using signed Jars

Post by Janak Mulani »

The stack trace is not from OWS. Please post OWS logs.

Please see viewtopic.php?t=8526

henriquert
Posts: 2
Joined: 26 Jun 2024, 13:43

Re: JNLP application not openning when using signed Jars

Post by henriquert »

Posting the OWS log.
If you see messages java.io.FileNotFoundException: *.jar.pack.gz, this does not prevent the application from opening.
Attachments
2024-06-26_07_35_23.320-ows-stage2.log
(809.07 KiB) Downloaded 15 times

Janak Mulani
Posts: 817
Joined: 24 Mar 2020, 13:37

Re: JNLP application not openning when using signed Jars

Post by Janak Mulani »

OWS is starting your jnlp app by invoking the main method of your app.

There are exceptions in your app::

Code: Select all

ITW-APP ][2024-06-26 07:36:16.224 MST][ERROR][java.base/sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:233)] Jun 26, 2024 7:36:16 AM com.sun.enterprise.v3.server.CommonClassLoaderServiceImpl findH2Client
INFO: Cannot find h2db client jar file, h2 jdbc driver will not be available by default.
[ITW-APP ][2024-06-26 07:36:16.302 MST][ERROR][java.base/sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:233)] Jun 26, 2024 7:36:16 AM org.glassfish.enterprise.iiop.api.GlassFishORBHelper postConstruct
INFO: GlassFishORBFactory service initialized.
[ITW-APP ][2024-06-26 07:36:18.865 MST][ERROR][java.base/sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:233)] Jun 26, 2024 7:36:18 AM io.opentelemetry.api.GlobalOpenTelemetry maybeAutoConfigureAndSetGlobal
INFO: AutoConfiguredOpenTelemetrySdk found on classpath but automatic configuration is disabled. To enable, run your JVM with -Dotel.java.global-autoconfigure.enabled=true
[ITW-APP ][2024-06-26 07:36:31.837 MST][ERROR][java.base/sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:233)] java.lang.RuntimeException: javax.naming.CommunicationException: Communication exception for SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is java.lang.NullPointerException]
at com.mmsi.util.ServerStatus.getServerStatusReader(ServerStatus.java:132)
[ITW-APP ][2024-06-26 07:36:31.837 MST][ERROR][java.base/sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:233)] 	at com.mmsi.util.ServerStatus.isCallerInRole(ServerStatus.java:104)
[ITW-APP ][2024-06-26 07:36:31.837 MST][ERROR][java.base/sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:233)] 	at com.mmsi.smartui.login.service.LoginService.isRoleAuthorized(LoginService.java:94)
...

Post Reply