StringIndexOutOfBoundExcpetion and failure to launch JNLP in MAC OS - java

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)

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

Related

Exception while Running Javafx app from jenkins

I am running a javafx based application from jenkins. My Jenkins version is 2.73.1 and java application is compiled with java 8 and i am running the jar with java8 as well. I am having this exception and this actually starts here without giving any detail.
java.lang.NullPointerException
at sun.awt.shell.Win32ShellFolder2.access$200(Unknown Source)
at sun.awt.shell.Win32ShellFolder2$1.call(Unknown Source)
at sun.awt.shell.Win32ShellFolder2$1.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at sun.awt.shell.Win32ShellFolderManager2$ComInvoker$3.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
I have tried a lot of solutions, changing jenkins versions, logon to jenkins as administrator but nothing work.
It is not the duplicate of 'NPE in Win32ShellFolder2.access when creating new JFileChooser as Local System Account in Windows 7' as it is working perfectly fine in my pc from command prompt.
Any hint or help is appreciated.
Thanks.

How to get the full StackTrace when using SuperDevMode in GWT 2.7?

I use GWT 2.7 with super dev mode. When it comes to an exception the stack trace looks like the following:
SEVERE: UncaughtExceptioncom.github.nmorel.gwtjackson.client.exception.JsonDeserializationException: Unknown property 'uploadImageId'
at Unknown.AHc_g$(Unknown Source)
at Unknown.vHc_g$(Unknown Source)
at Unknown.OHc_g$(Unknown Source)
at Unknown.VHc_g$(Unknown Source)
at Unknown.aIc_g$(Unknown Source)
at Unknown.gIc_g$(Unknown Source)
at Unknown.rDc_g$(Unknown Source)
at Unknown.qDc_g$(Unknown Source)
at Unknown.vNb_g$(Unknown Source)
at Unknown.nNb_g$(Unknown Source)
at Unknown.oNb_g$(Unknown Source)
at Unknown.pNb_g$(Unknown Source)
at Unknown.gNb_g$(Unknown Source)
at Unknown.fNb_g$(Unknown Source)
at Unknown.$Cc_g$(Unknown Source)
at Unknown.ZCc_g$(Unknown Source)
at Unknown.zOm_g$(Unknown Source)
at Unknown.anonymous(Unknown Source)
at Unknown.ZDe_g$(Unknown Source)
at Unknown.aEe_g$(Unknown Source)
at Unknown.anonymous(Unknown Source)
at Unknown.anonymous(Unknown Source)
at Unknown.anonymous(Unknown Source)
at Unknown.anonymous(Unknown Source)
at Unknown.anonymous(Unknown Source)
at Unknown.anonymous(Unknown Source)
I have a GWT project running in a GWT-PhoneGap environment on my iPhone and I use the Safari Console for Debugging.
How can I get the full stack track deobfuscated with SuperDevMode?
Edit: I also use the following flag:
-XmethodNameDisplayMode Full
It does not work.
As of GWT 2.7.0, this isn't possible. You might want to follow this GWT bug.
The -XmethodNameDisplayMode Full only applies to the browser's dev tools. So if you set this parameter and set a breakpoint in the source code, the method names of the call stack will be displayed correctly in dev tools. This doesn't affect the call stack produced by log output (which is what you posted in your question).
Try setting the compiler option style to PRETTY or DETAILED
-style Script output style: DETAILED, OBFUSCATED or PRETTY (defaults to OBFUSCATED)
see GWT compiler options

An error keeps coming up when using repast simulator

I looked at the demos and built my own zombie simulator as described in the documentation, but an error keeps coming up and I'm pretty sure its not to do with my code since I just copied it from the docs for the zombie simulator and opened the demos repast provides.
when I run the simulator it gives me this error
2014/10/03 16:05:19,354: Scenario Load Error
repast.simphony.scenario.ScenarioLoadException: ParseError at [row,col]:[5,21]
Message: Open quote is expected for attribute "{1}" associated with an element type "type".
at repast.simphony.scenario.ScenarioLoader.load(ScenarioLoader.java:220)
at repast.simphony.ui.RSApplication.open(RSApplication.java:353)
at repast.simphony.ui.RSAppConfigurator.postWindowOpen(RSAppConfigurator.java:39)
at saf.core.ui.GUICreatorDelegate.runDisplay(GUICreatorDelegate.java:188)
at saf.core.ui.GUICreator$1.run(GUICreator.java:18)
at simphony.util.ThreadUtilities$Runner.run(ThreadUtilities.java:33)
at simphony.util.ThreadUtilities.runInEventThread(ThreadUtilities.java:47)
at saf.core.ui.GUICreator.runDisplay(GUICreator.java:16)
at repast.simphony.ui.RSUIPlugin$1.run(RSUIPlugin.java:104)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$400(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[5,21]
Message: Open quote is expected for attribute "{1}" associated with an element type "type".
at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(Unknown Source)
at com.sun.xml.internal.stream.XMLEventReaderImpl.nextEvent(Unknown Source)
at repast.simphony.scenario.data.ContextFileReader.read(ContextFileReader.java:40)
at repast.simphony.scenario.ScenarioLoader.load(ScenarioLoader.java:126)
... 22 more
Also on the eclipse console it gives me this error before repast starts
Oct 03, 2014 4:05:01 PM java.util.prefs.WindowsPreferences
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
I just can't figure out what is going on but I need to solve the problem soon because I need to work with repast for a uni project.
Thank you for any help :)
The first error is not a coding error but a parsing error - it is likely a typo in your context.xml file (the error message indicates line 5, column 21). Did you edit it as advised on pages 18-20 of the repast getting started guide? Without seeing your context.xml file, I can't say exactly what the error is in it - if you want to add the first 5 lines of it then we can probably diagnose.
The second message (warning, not error) on the console window is common and is not associated with the first error. This answer might help if you want to get rid of it - however I have not experienced any problems with leaving it there.

Grails, Tomcat deployment error

I am trying to deploy a war file using tomcat 7 but I get these error.
Feb 26, 2013 3:42:48 PM org.apache.catalina.loader.WebappClassLoader loadClass
INFO: Illegal access: this web application instance has been stopped already. Could not load org.compass.core.lucene.engine.manager.DefaultLuceneSearchEngineIndexManager$11. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
java.lang.IllegalStateException
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1599)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1558)
at org.compass.core.lucene.engine.manager.DefaultLuceneSearchEngineIndexManager.performScheduledTasks(DefaultLuceneSearchEngineIndexManager.java:426)
at org.compass.core.lucene.engine.manager.DefaultLuceneSearchEngineIndexManager$ScheduledIndexManagerRunnable.run(DefaultLuceneSearchEngineIndexManager.java:527)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(Unknown Source)
at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
The same war works fine on other machines but it gives this error on production machine. I tried changing the apache server and also jdk in the machine, but no effect. Can someone please tell me what is this error related to ?
This could be a file system access rights issue. Please make sure that the path exists and that tomcat has 'write' rights on the location where Searchable/Lucene is trying to create the index.

Issue while starting WLDF Console Extension

Any fix to avoid this exception while starting WLDF Console? Thanks.
java.lang.ClassFormatError: Incompatible magic value 218762506 in class file com/bea/diagnostics/dashboard/ChartPanelApplet
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception: java.lang.ClassFormatError: Incompatible magic value 218762506 in class file com/bea/diagnostics/dashboard/ChartPanelApplet
There is an earlier Sun bug report on this issue, with JDK 1.4
you are mostly running JDK 1.6 but take a look at the bug report.
Short Summary (gleaned from this forum) :
The Java plug-in of your browser tries
to get some .class file from the
current location (your server) and
fails because your server returns some
custom 404 page. Let's try to check
the Java console to see what really is
requested. Please, run the Java
console, set the trace level to 5
(highest level).
Enable the Java console on Windows for IE browser and see if it gives a detail on which URL is giving the 404 or some other error.
Further Reading
Oracle forum question

Categories