OWS deploy can't read System property

The public knowledge pool and discussion forum of the OWS community. Do not post confidential information here!
Stefan
Posts: 1
Joined: 03 Sep 2024, 11:30

OWS deploy can't read System property

Post by Stefan »

Hi,
I've just started looking at OWS as a replacement for the Oracle JWS but I'm having a problem deploying my application.

I get an Access Denied Exception for a System Parameter
Caused by: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "sun.arch.data.model" "read")

This is the stack trace
net.sourceforge.jnlp.LaunchException: Fatal: Launch Error: Could not launch JNLP file. The application has not been initialized, for more information execute javaws/browser from the command line and send a bug report.
at net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:414)
at net.sourceforge.jnlp.Launcher.access$300(Launcher.java:72)
at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:661)
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:407)
... 2 more
Caused by: java.lang.ExceptionInInitializerError
at com.bredband.nexus.elektra.comm.RVComm.initTransport(RVComm.java:108)
at com.bredband.nexus.elektra.comm.RVComm.initializeTransport(RVComm.java:92)
at com.bredband.nexus.elektra.uiframework.Next.<init>(Next.java:81)
at com.bredband.nexus.elektra.uiframework.Next.main(Next.java:738)
... 7 more
Caused by: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "sun.arch.data.model" "read")
at java.base/java.security.AccessControlContext.checkPermission(AccessControlContext.java:485)
at java.base/java.security.AccessController.checkPermission(AccessController.java:1068)
at java.base/java.lang.SecurityManager.checkPermission(SecurityManager.java:416)
at net.sourceforge.jnlp.runtime.JNLPSecurityManager.checkPermission(JNLPSecurityManager.java:272)
at java.base/java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1160)
at java.base/java.lang.System.getProperty(System.java:915)
at com.tibco.tibrv.Tibrv.loadNativeLibrary(Tibrv.java:379)
at com.tibco.tibrv.Tibrv.<clinit>(Tibrv.java:88)
... 11 more

How come I can't access this parameter when running OWS. If I deploy from Eclipse the parameter is accessible.
I've added a print out in the OWS-log so I can see that the parameter is set.

Row 66-69 in the OWS2.txt is from the application, so it starts but It can't access the System parameter.

This is the JNLP (since the forum won't let me upload it)
<?xml version="1.0" encoding="utf-8"?>
<!-- Web Start Deployment Template -->
<jnlp spec="1.0+" codebase="url..." href="elektra_64_openjdk.jnlp">

<information>
<title>Elektra 64-Bit Java</title>
<description kind="short">
A application to manage client ports
</description>
</information>

<security>
<all-permissions/>
</security>

<resources>
<j2se href="http://myjvms.myserver.com/jvms.json" version="1.6+" java-vm-args="-Djava.net.preferIPv4Stack=true" />
<j2se href="http://myjvms.myserver.com/jvms.json" onclick="javascript:mytracker(this.href);" version="1.6+" initial-heap-size="128m" max-heap-size="256m"/>
<jar href="lib_openjdk/elektra.jar" main="true"/>
<jar href="lib_openjdk/Date_selector.jar"/>
<jar href="lib_openjdk/guicommon.jar"/>
<jar href="lib_openjdk/tibilizer.jar"/>
<jar href="lib_openjdk/swingx-1.6.jar"/>
<jar href="lib_openjdk/nexusjgw_utils.jar"/>
<jar href="lib_openjdk/commons-net-3.0.1.jar"/>
<jar href="lib_openjdk/jcommon-1.0.17.jar"/>
<jar href="lib_openjdk/EmagwServices-modell.jar"/>
<jar href="lib_openjdk/jfreechart-1.0.14.jar"/>
<jar href="lib_openjdk/tibrvjsd_64.jar"/>
<jar href="lib_openjdk/jackson-annotations-2.6.3.jar"/>
<jar href="lib_openjdk/jackson-core-2.6.3.jar"/>
<jar href="lib_openjdk/jackson-databind-2.6.3.jar"/>
<jar href="lib_openjdk/jackson-module-jaxb-annotations-2.6.3.jar"/>
<jar href="lib_openjdk/CAI3G-ProvisionGateway.jar"/>
<jar href="lib_openjdk/commons-codec-1.15.jar"/>
</resources>

<resources os="Windows">
<nativelib href="lib_openjdk/tibnative_64_openjdk.jar"/>
</resources>

<application-desc main-class="com.bredband.nexus.elektra.uiframework.Next" />
</jnlp>
Attachments
OWS2.txt
(132.82 KiB) Downloaded 26 times
OWS1.txt
(19.61 KiB) Downloaded 33 times

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

Re: OWS deploy can't read System property

Post by Janak Mulani »

>
How come I can't access this parameter when running OWS. If I deploy from Eclipse the parameter is accessible.
I've added a print out in the OWS-log so I can see that the parameter is set.
>
OWS runs the app in a sandbox with restricted access.

> Row 66-69 in the OWS2.txt is from the application, so it starts but It can't access the System parameter.
Instead of copying the console log to a file you could have set OWS logging to log to a file and sent those files.

OWS is starting your application. But your application is trying to access a property that cannot be accessed from a sandbox. You will have to give permission in the java.policy file of the JVM C:\Program Files\Microsoft\jdk-17.0.7.7-hotspot that is used to run the application.

Post Reply