StringIndexOutOfBoundExcpetion and failure to launch JNLP in MAC OS
Asked Answered
A

1

-1

In my application's JNLP file, I specify the PermGenSize in JNLP java-vm-args parameter. After upgrading Java on my MAC to Java7u13, the JNLP fails to launch with java-vm-args params. If I remove the java-vm-args parameter everything works fine.

My java-vm-args parameter is java-vm-args="-XX:MaxPermSize=128m"

Is this a Java 7 issue?. I am able reproduce the above problem in solaris also.

During the failure I see the following exception in trace file:

 Log started: Tue, 19 Feb 2013 11:02:41 +0530
java.lang.StringIndexOutOfBoundsException: String index out of range: -8
        at java.lang.String.substring(String.java:1911)
        at com.sun.deploy.util.Property.<init>(Unknown Source)
        at com.sun.deploy.util.Property.createProperty(Unknown Source)
        at com.sun.deploy.util.JVMParameters$ArgumentSet.addArgument(Unknown Source)
        at com.sun.deploy.util.JVMParameters.addArgumentImpl(Unknown Source)
        at com.sun.deploy.util.JVMParameters.parseImpl(Unknown Source)
        at com.sun.deploy.util.JVMParameters.parseTrustedOptions(Unknown Source)
        at com.sun.javaws.Main.initializeExecutionEnvironment(Unknown Source)
        at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
        at com.sun.javaws.Main.access$000(Unknown Source)
        at com.sun.javaws.Main$1.run(Unknown Source)
        at java.lang.Thread.run(Thread.java:722)
Angry answered 19/2, 2013 at 5:40 Comment(8)
how exactly you start the program?Mauro
I launch the JNLP file from the browser. Internally it uses javaws command by passing the path to downloaded JNLP file as parameterAngry
what is content of JNLP file? where java-vm-args is specified?Mauro
Be sure to validate the JNLP using JaNeLA.Halcomb
@Nickolay, the java-vm-args parameter is part of resources tag in JNLP file. PLease refer to following link for more info on JNLP file format :docs.oracle.com/javase/7/docs/technotes/guides/javaws/…Angry
@AndrewThompson The same JNLP file is working with Windows 7 running Java 7u13. Only in MAC I am facing this issue. It used to work fine earlier on Apple JDK 6 in MAC. I also verified the JNLP using JaNeLA.No error was reported on java-vm-args paramsAngry
"No error was reported on java-vm-args params" Was any error reported in any other part of the JNLP?Halcomb
Looks like there is some issue introduced in Java 7u9 on parsing of java-vm-args params (check the Known Issues section in the below link) : oracle.com/technetwork/java/javase/7u9-relnotes-1863279.html . Also check @ inductiveautomation.com/forum/viewtopic.php?f=72&t=9232Angry
V
0

Permgen is gonna disappear in futher releases. Remove XX:MaxPermSize from your arguments lists and re-run application.

Vacate answered 7/3, 2013 at 17:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.