I've be struggling in debugging an install4j installer where I'm trying to introduce some complicated condition expression that is failing for some reason.
However when I try to use the debug_installer.sh script I get the following error:
java.io.FileNotFoundException: /Applications/install4j/resource/MessagesDefault (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:120)
at com.install4j.runtime.util.FileResourceBundle.<init>(Unknown Source)
at com.install4j.runtime.installer.frontend.Messages.createMessagesInternal(Unknown Source)
at com.install4j.runtime.installer.frontend.Messages.createMessages(Unknown Source)
at com.install4j.runtime.installer.frontend.Messages.getMessages(Unknown Source)
at com.install4j.runtime.installer.frontend.GUIHelper.showMessageInternal(Unknown Source)
at com.install4j.runtime.installer.frontend.GUIHelper.access$100(Unknown Source)
at com.install4j.runtime.installer.frontend.GUIHelper$2.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:682)
at java.awt.EventQueue.access$000(EventQueue.java:85)
at java.awt.EventQueue$1.run(EventQueue.java:643)
at java.awt.EventQueue$1.run(EventQueue.java:641)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:652)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
The file actually doesn't exist but I have no idea of what that file should contain. My install4j version is 4.2.8
In the debug installer start script, replace
-cp i4jruntime.jar:user.jar:user/*.jar
with
-cp 'i4jruntime.jar:user.jar:user/*'
Then it should work. This bug was fixed in 5.0.1.
Related
OS: Windows 7 64-bit
Java: C:\Program Files\Java\jdk1.8.0_202 [Installed jdk-8u202-windows-x64.exe]
Java 3d: C:\Program Files\Java\Java3D\1.5.1 [Installed java3d-1_5_1-windows-amd64.exe]
Environment Varaibles:
JAVA_HOME C:\Program Files\Java\jdk1.8.0_202
JRE_HOME C:\Program Files\Java\jdk1.8.0_202\jre
PATH=%PATH%:C:\Program Files\Java\jdk1.8.0_202\bin;C:\Program Files\Java\Java3D\1.5.1\bin;C:\Program Files\Java\Java3D\1.5.1\lib;
And also copied j3d jars[j3dcore.jar, j3dutils.jar and vecmath.jar] to C:\Program Files\Java\jdk1.8.0_202\jre\lib\ext. j3dcore-ogl.dll to C:\Program Files\Java\jdk1.8.0_202\bin
Running the classic HelloJava3D Program and getting the below error. I can understand this is looking for Canvas3d class but that already present in one of the java3d jar file. Have come across similar thread in stackoverflow where they mentioned to check the classpath.Above i've shared the path which i set. Anything i missed out?
Java3D - Some classes not found but classpath is set correctly
But in my case its showing some JNI error is it because some architecture mismatch?
D:\JavaSample>java HelloJava3D
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: javax/media/j3d/Canva
s3D
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.privateGetMethodRecursive(Unknown Source)
at java.lang.Class.getMethod0(Unknown Source)
at java.lang.Class.getMethod(Unknown Source)
at sun.launcher.LauncherHelper.validateMainClass(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
Caused by: java.lang.ClassNotFoundException: javax.media.j3d.Canvas3D
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 7 more
One of the tool in my project is dependent on Java3d and i'm from c++ background and new to this project. I couldn't figure out what i am missing. Please suggest.
I have a grammar P.g that until recently compiled quietly. Today when I type in the command prompt:
java -cp .;../antlr-3.5-complete.jar org.antlr.Tool P.g
(the grammar is in the folder gram, while antlr-3.5-complete.jar is in the parent folder. The prompt is placed in the folder gram.)
Generates the following errors:
warning(24): template error: context [/outputFile /parser /genericParser /region__/genericParser__m
embers] 32:3 no such property or can't access: org.antlr.tool.Grammar.indirectDelegates
Caused by: org.stringtemplate.v4.misc.STNoSuchPropertyException: no such property: org.antlr.tool.Gr
ammar.indirectDelegates
at org.stringtemplate.v4.misc.ObjectModelAdaptor.throwNoSuchProperty(ObjectModelAdaptor.java
:106)
at org.stringtemplate.v4.misc.ObjectModelAdaptor.lookupMethod(ObjectModelAdaptor.java:99)
at org.stringtemplate.v4.misc.ObjectModelAdaptor.getProperty(ObjectModelAdaptor.java:67)
at org.stringtemplate.v4.Interpreter.getObjectProperty(Interpreter.java:1158)
at org.stringtemplate.v4.Interpreter._exec(Interpreter.java:210)
at org.stringtemplate.v4.Interpreter.exec(Interpreter.java:145)
at org.stringtemplate.v4.Interpreter.writeObject(Interpreter.java:703)
at org.stringtemplate.v4.Interpreter.writeObjectNoOptions(Interpreter.java:635)
at org.stringtemplate.v4.Interpreter._exec(Interpreter.java:285)
at org.stringtemplate.v4.Interpreter.exec(Interpreter.java:145)
at org.stringtemplate.v4.Interpreter.writeObject(Interpreter.java:703)
at org.stringtemplate.v4.Interpreter.writeObjectNoOptions(Interpreter.java:635)
at org.stringtemplate.v4.Interpreter._exec(Interpreter.java:285)
at org.stringtemplate.v4.Interpreter.exec(Interpreter.java:145)
at org.stringtemplate.v4.Interpreter.writeObject(Interpreter.java:703)
at org.stringtemplate.v4.Interpreter.writeObjectNoOptions(Interpreter.java:635)
at org.stringtemplate.v4.Interpreter._exec(Interpreter.java:285)
at org.stringtemplate.v4.Interpreter.exec(Interpreter.java:145)
at org.stringtemplate.v4.ST.write(ST.java:415)
at org.antlr.codegen.CodeGenerator.write(CodeGenerator.java:1296)
at org.antlr.codegen.Target.genRecognizerFile(Target.java:98)
at org.antlr.codegen.CodeGenerator.genRecognizer(CodeGenerator.java:459)
at org.antlr.Tool.generateRecognizer(Tool.java:696)
at org.antlr.Tool.process(Tool.java:509)
at org.antlr.Tool.main(Tool.java:98)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.stringtemplate.v4.misc.Misc.invokeMethod(Misc.java:218)
at org.stringtemplate.v4.misc.ObjectModelAdaptor.lookupMethod(ObjectModelAdaptor.java:84)
... 23 more
Caused by: java.lang.NullPointerException
at java.util.Objects.requireNonNull(Unknown Source)
at java.util.ArrayList.removeAll(Unknown Source)
at org.antlr.tool.CompositeGrammar.getIndirectDelegates(CompositeGrammar.java:226)
at org.antlr.tool.Grammar.getIndirectDelegates(Grammar.java:2722)
... 29 more
I did not change anything. From what all of these errors are due?
thank you very much
This happens using Java8, try to switch back to 7
The latest version of antlr 3.5 doesn't have this problem (3.5.2)
I made an application in Java (version 7) with Eclipse (Indigo) when I exported my application interface on a Runnable JAR file on my computer and tried it worked fine, then I tried on another computer and I get this problem
Exception in thread "main" java.lang.UnsupportedClassVersionError: cliente/Princ
ipal : Unsupported major.minor version 51.0
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 java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoa
der.java:56)
I saw other post that this can be because the other computer have an older version of Java than mine, can somebody confirm this please?.
Yes, that is the error when you try to run Java bytecode with an older version that the version you build it with.
You will find more information in this question.
I have a jar which is created using onejar-maven-plugin, which is meant to listen to jms messages from tibco and process accordingly. It works fine but when I sign this jar using jarsigner and try to run it, it throws the exception below:
org.apache.commons.logging.LogConfigurationException: java.lang.StackOverflowError (Caused by java.lang.StackOverflowError)
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:538)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
at org.springframework.context.support.AbstractApplicationContext.<init>(AbstractApplicationContext.java:160)
at org.springframework.context.support.AbstractRefreshableApplicationContext.<init>(AbstractRefreshableApplicationContext.java:89)
at org.springframework.context.support.AbstractRefreshableConfigApplicationContext.<init>(AbstractRefreshableConfigApplicationContext.java:59)
at org.springframework.context.support.AbstractXmlApplicationContext.<init>(AbstractXmlApplicationContext.java:61)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:136)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
at com.adobe.jobcloud.envoy.client.PushToPrereleaseWorker.main(PushToPrereleaseWorker.java:33)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.simontuffs.onejar.Boot.run(Boot.java:340)
at com.simontuffs.onejar.Boot.main(Boot.java:166)
Caused by: java.lang.StackOverflowError
at com.simontuffs.onejar.OneJarFile.getJarEntry(OneJarFile.java:43)
at java.util.jar.JarFile.getManEntry(Unknown Source)
at java.util.jar.JarFile.getManifestFromReference(Unknown Source)
at java.util.jar.JarFile.getManifest(Unknown Source)
at java.util.jar.JarFile.maybeInstantiateVerifier(Unknown Source)
at java.util.jar.JarFile.getInputStream(Unknown Source)
at com.simontuffs.onejar.OneJarFile.getJarEntry(OneJarFile.java:50)
at java.util.jar.JarFile.getManEntry(Unknown Source)
at java.util.jar.JarFile.getManifestFromReference(Unknown Source)
at java.util.jar.JarFile.getManifest(Unknown Source)
at java.util.jar.JarFile.maybeInstantiateVerifier(Unknown Source)
at java.util.jar.JarFile.getInputStream(Unknown Source)
at com.simontuffs.onejar.OneJarFile.getJarEntry(OneJarFile.java:50)
at java.util.jar.JarFile.getManEntry(Unknown Source)
at java.util.jar.JarFile.getManifestFromReference(Unknown Source)
at java.util.jar.JarFile.getManifest(Unknown Source)
Also if I use maven-jarsigner-plugin to sign it, the result is exactly same. I'm clueless and stuck up with this issue.
Any help will be appreciated.
Have you tried to increase the -Xss JVM option? To 4096k at first, then lower it until it fails again.
Working with ciphers generally maybe need more than default stack size.
For the maven jarsigner plugin you can edit .mavenrc file in your linux home directory and add these lines:
#!/bin/bash
export JAVA_HOME=/usr/lib/jvm/java-6-sun-i586 #(or another)
export M2_HOME=/usr/local/lib/apache-maven/apache-maven-3.0.4
export MAVEN_OPTS="-Xss4096k -XX:MaxPermSize=128m -Xmx384m"
I don't know how to do this under windows, but there must be similar solution (here?)
I compiled Infinispan quickstart and when I am trying to run I am getting following error
Exception in thread "main" java.lang.NoClassDefFoundError: Quickstart (wrong nam
e: org/infinispan/quickstart/embeddedcache/Quickstart)
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 java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: Quickstart. Program will exit.
I am following this tutorial.
https://github.com/infinispan/infinispan-quickstart/tree/master/embedded-cache
Though I am not using any IDE so that I can learn how maven works with infinispan. From command prompt prompt I am using this command To compile,
mvn clean compile dependency:copy-dependencies -DstripVersion
and then, to run,
java -cp target/classes:target/dependency/* Quickstart
It is compiling successfully.
I have tried to compile and then run the quickstart from within target directory where the class file is kept. But I am getting the same error class found .....
Thanks
Meena
Anyhelp will be appreciated.
Try running with
java -cp target/classes:target/dependency/* org.infinispan.quickstart.embeddedcache.Quickstart