JVM throws Exception - jvm

I am using RHEL 6.0 with JRE1.6.0_43 installed. It's installed properly and java plugin for browser also working fine. But I am facing the problem while running java_vm in /jre/bin directory.
While running for the first time it throws,
java_vm process: You need to set both JAVA_HOME and PLUGIN_HOME
Then i set the JAVA_HOME=/ and PLUGIN_HOME=/plugin, after that it throws the following exception while running java_vm,
java_vm process: Couldn't find class sun/plugin/navig/motif/Plugin
Exception in thread "main" java.lang.NoClassDefFoundError:
sun/plugin/navig/motif/Plugin Caused by:
java.lang.ClassNotFoundException: sun.plugin.navig.motif.Plugin 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)
Then i modified the PLUGIN_HOME=/ , when i try to run again it shows another exception,
Java process: caught exception from
sun.plugin.navig.motif.Plugin.start Exception in thread "main"
java.lang.NullPointerException at
sun.plugin.navig.motif.Plugin.start(Unknown Source)
After this, I don't know what to do to get rid of this problem... I think the problem is with PLUGIN_HOME variable.. Please provide me the clear details about PLUGIN_HOME and tell me why we need this variable?

Related

Cucumber deprecated Main class

I'm new to cucumber and couldn't find any solution for this error
cucumber.api.cli.Main run
WARNING: You are using deprecated Main class. Please use io.cucumber.core.cli.Main
Exception in thread "main" java.lang.BootstrapMethodError: java.lang.NoClassDefFoundError: io/cucumber/tagexpressions/TagExpressionParser
at io.cucumber.core.options.CucumberPropertiesParser.parse(CucumberPropertiesParser.java:83)
at io.cucumber.core.cli.Main.run(Main.java:48)
at cucumber.api.cli.Main.run(Main.java:30)
at cucumber.api.cli.Main.main(Main.java:15)
Caused by: java.lang.NoClassDefFoundError: io/cucumber/tagexpressions/TagExpressionParser
... 4 more
Caused by: java.lang.ClassNotFoundException: io.cucumber.tagexpressions.TagExpressionParser
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)`enter code here`
at java.lang.ClassLoader.loadClass(Unknown Source)
... 4 more

A JNI error has occurred, please check your installation and try again Exception in thread "main"

I am facing a issue while trying to run my executable JAR file for my cucumber project (A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.SecurityException: no manifiest section for
signature file entry org/bouncycastle/mail/smime/SMIMEEnvelopedGenerator$Envelo
pedGenerator.class)
Few Important Points : 1.) I am using Idea IntelliJ and created executable JAR
2.) I am using Gradle as a build tool
3.) I am using cucumber framework and want to run only specific test mentioned in my cucumber options using executable JAR
Please find below the complete Error Stack Trace
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.SecurityException: no manifiest section for
signature file entry org/bouncycastle/mail/smime/SMIMEEnvelopedGenerator$Envelo
pedGenerator.class
at sun.security.util.SignatureFileVerifier.verifySection(Unknown Source)
at sun.security.util.SignatureFileVerifier.processImpl(Unknown Source)
at sun.security.util.SignatureFileVerifier.process(Unknown Source)
at java.util.jar.JarVerifier.processEntry(Unknown Source)
at java.util.jar.JarVerifier.update(Unknown Source)
at java.util.jar.JarFile.initializeVerifier(Unknown Source)
at java.util.jar.JarFile.getInputStream(Unknown Source)
at sun.misc.URLClassPath$JarLoader$2.getInputStream(Unknown Source)
at sun.misc.Resource.cachedInputStream(Unknown Source)
at sun.misc.Resource.getByteBuffer(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(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)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
Please let me know for any more information required.Read many articles but could'nt able to find any solution.Thanks in advance

Android Studio fails to start - Cannot register font

I've just downloaded the latest Android Studio (v0.1.1) and installed it, however the program will not run.
I am running on Windows 8, 64 bit.
I have added both the environment variables (JDK_HOME and JAVA_HOME).
When running studio.bat through a command prompt (with administer privileges), it outputs this:
C:\Program Files (x86)\Android\android-studio\bin>studio.bat
ERROR: Cannot register font: /fonts/Inconsolata.ttf
java.io.IOException: Problem reading font data.
at java.awt.Font.createFont(Unknown Source)
at com.intellij.ui.AppUIUtil.registerFont(AppUIUtil.java:129)
at com.intellij.ui.AppUIUtil.registerBundledFonts(AppUIUtil.java:120)
at com.intellij.idea.MainImpl.start(MainImpl.java:48)
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.intellij.ide.plugins.PluginManager$2.run(PluginManager.java:194)
at java.lang.Thread.run(Unknown Source)
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 com.intellij.ide.plugins.PluginManager$2.run(PluginManager.java:194)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.AssertionError: Cannot register font: /fonts/Inconsolata.tt
f
at com.intellij.openapi.diagnostic.DefaultLogger.error(DefaultLogger.jav
a:55)
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:65)
at com.intellij.ui.AppUIUtil.registerFont(AppUIUtil.java:137)
at com.intellij.ui.AppUIUtil.registerBundledFonts(AppUIUtil.java:120)
at com.intellij.idea.MainImpl.start(MainImpl.java:48)
... 6 more
To try and fix the problem I have downloaded the Inconsolatta.tff file from Google and installed it myself, as well as placed the file in the directory where the bat file is looking for it (it wasn't there originally... odd), however to no avail.
Can anyone explain what I need to do to get this working? I quite like Android Studio!
BTW, on previous install attempts, if I ran the program at the end of it's install, it loaded up, but then any attempt after closing it it did not work, if that helps...

Apache Geronimo is not installing in Eclipse

I installed Apache Geronimo Server on my Windows machine and start it from Windows->Preferences->Server->Run-time, but after that I try adding a new server and get the following error:
Booting Geronimo Kernel (in Java 1.7.0_03)...
Module 1/62 org.apache.geronimo.framework/j2ee-security/2.1/car 13:22:28,738 WARN [1/car,j2eeType=GBean,name=JMXService] Failure in JMXConnector service:jmx:rmi://0.0.0.0:9999/jndi/rmi://0.0.0.0:1099/JMXConnector
13:22:28,739 ERROR [GBeanInstanceState] Error while starting; GBean is now in the FAILED state: abstractName="org.apache.geronimo.framework/j2ee-security/2.1/car?ServiceModule=org.apache.geronimo.framework/j2ee-security/2.1/car,j2eeType=GBean,name=JMXService"
java.rmi.server.ExportException: Port already in use: 9999; nested exception is:
java.net.BindException: Address already in use: JVM_Bind
at sun.rmi.transport.tcp.TCPTransport.listen(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.exportObject(Unknown Source)
at sun.rmi.transport.tcp.TCPEndpoint.exportObject(Unknown Source)
at sun.rmi.transport.LiveRef.exportObject(Unknown Source)
at sun.rmi.server.UnicastServerRef.exportObject(Unknown Source)
at java.rmi.server.UnicastRemoteObject.exportObject(Unknown Source)
at java.rmi.server.UnicastRemoteObject.exportObject(Unknown Source)
at javax.management.remote.rmi.RMIJRMPServerImpl.export(Unknown Source)
at javax.management.remote.rmi.RMIJRMPServerImpl.export(Unknown Source)
at javax.management.remote.rmi.RMIConnectorServer.start(Unknown Source)
at org.apache.geronimo.jmxremoting.JMXConnector.doStart(JMXConnector.java:191)
at org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:998)
at org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:268)
at org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:102)
at org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:124)
at org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:555)
at org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:379)
at org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:456)
at org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:187)
at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:534)
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.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:832)
at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
at org.apache.geronimo.gbean.GBeanLifecycle$$EnhancerByCGLIB$$458b9f94.startConfiguration(<generated>)
at org.apache.geronimo.system.main.EmbeddedDaemon.doStartup(EmbeddedDaemon.java:156)
at org.apache.geronimo.system.main.EmbeddedDaemon.execute(EmbeddedDaemon.java:78)
at org.apache.geronimo.kernel.util.MainConfigurationBootstrapper.main(MainConfigurationBootstrapper.java:45)
at org.apache.geronimo.cli.AbstractCLI.executeMain(AbstractCLI.java:67)
at org.apache.geronimo.cli.daemon.DaemonCLI.main(DaemonCLI.java:30)
Caused by: java.net.BindException: Address already in use: JVM_Bind
at java.net.DualStackPlainSocketImpl.bind0(Native Method)
at java.net.DualStackPlainSocketImpl.socketBind(Unknown Source)
at java.net.AbstractPlainSocketImpl.bind(Unknown Source)
at java.net.PlainSocketImpl.bind(Unknown Source)
at java.net.ServerSocket.bind(Unknown Source)
at java.net.ServerSocket.<init>(Unknown Source)
at java.net.ServerSocket.<init>(Unknown Source)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createServerSocket(Unknown Source)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createServerSocket(Unknown Source)
at sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(Unknown Source)
... 36 more
Server Startup failed
org.apache.geronimo.kernel.config.LifecycleException: start of org.apache.geronimo.framework/j2ee-security/2.1/car failed
at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:551)
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.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:832)
at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
at org.apache.geronimo.gbean.GBeanLifecycle$$EnhancerByCGLIB$$458b9f94.startConfiguration(<generated>)
at org.apache.geronimo.system.main.EmbeddedDaemon.doStartup(EmbeddedDaemon.java:156)
at org.apache.geronimo.system.main.EmbeddedDaemon.execute(EmbeddedDaemon.java:78)
at org.apache.geronimo.kernel.util.MainConfigurationBootstrapper.main(MainConfigurationBootstrapper.java:45)
at org.apache.geronimo.cli.AbstractCLI.executeMain(AbstractCLI.java:67)
at org.apache.geronimo.cli.daemon.DaemonCLI.main(DaemonCLI.java:30)
Caused by: org.apache.geronimo.kernel.config.InvalidConfigException: Unknown start exception
at org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:522)
at org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:187)
at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:534)
... 16 more
Caused by: org.apache.geronimo.gbean.InvalidConfigurationException: Configuration org.apache.geronimo.framework/j2ee-security/2.1/car failed to start due to the following reasons:
The service ServiceModule=org.apache.geronimo.framework/j2ee-security/2.1/car,j2eeType=GBean,name=JMXService did not start because Port already in use: 9999; nested exception is:
java.net.BindException: Address already in use: JVM_Bind
at org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:485)
... 18 more
The root error is listed several times in that long stack trace you posted. The server is attempting to bind to a port already in use (port 9999). You need to find which process is using the port in question and stop it before running your Geronimo server.
You can use the netstat command to find what process is holding a particular port:
netstat -ano
+1 for the answer by Perception.
I would like to add something to that...
When I come across 'Port already in use: xxxx', restarting Eclipse session currently in use and trying to run again usually helps me to get rid of it.

Jenkins slave throws "Classloading from system classloader disabled" exception

When running a Maven2 job on a slave instance (Master on AIX 5.3; slave on Windows 2008(R2)), I get the following message (complete stack trace pasted in below): "java.lang.ClassNotFoundException: Classloading from system classloader disabled". This happens with the first job after the slave instance is started (it's running as a Windows service). After that, I get a "java.lang.NoClassDefFoundError: Could not initialize class hudson.maven.MavenModuleSetBuild" error.
If I create a freestyle job, and include the maven command as a batch command to run on the slave, it works fine. The Maven2 job appears to locate Maven on the slave machine, but it apparently can't find the maven-plugin (probably due to the classloading error).
I've searched and posted a ticket to the jenkins-ci site, but no luck as of yet. Has anyone run into this problem?
Stacktrace:
Found mavenVersion 2.2.1 from file jar:file:/C:/apache-maven-2.2.1/lib/maven-2.2.1-uber.jar!/META-INF/maven/org.apache.maven/maven-core/pom.properties
Parsing POMs
ERROR: Failed to parse POMs
hudson.util.IOException2: remote file operation failed: c:\jenkins-slave\workspace\AO_SISO_AT-smoketest-CIT1 at hudson.remoting.Channel#7b827b82:10.40.163.105
at hudson.FilePath.act(FilePath.java:752)
at hudson.FilePath.act(FilePath.java:738)
at hudson.maven.MavenModuleSetBuild$RunnerImpl.parsePoms(MavenModuleSetBuild.java:817)
at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:617)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:429)
at hudson.model.Run.run(Run.java:1374)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:467)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:145)
Caused by: java.io.IOException: Remote call on 10.40.163.105 failed
at hudson.remoting.Channel.call(Channel.java:652)
at hudson.FilePath.act(FilePath.java:745)
... 8 more
Caused by: java.lang.ExceptionInInitializerError
at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1236)
at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1110)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:1956)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:270)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at hudson.remoting.Engine$1$1.run(Engine.java:60)
at java.lang.Thread.run(Unknown Source)
Caused by: com.thoughtworks.xstream.XStream$InitializationException: Could not instantiate converter : com.thoughtworks.xstream.converters.extended.DurationConverter : null
at com.thoughtworks.xstream.XStream.dynamicallyRegisterConverter(XStream.java:735)
at com.thoughtworks.xstream.XStream.setupConverters(XStream.java:699)
at com.thoughtworks.xstream.XStream.<init>(XStream.java:445)
at com.thoughtworks.xstream.XStream.<init>(XStream.java:385)
at com.thoughtworks.xstream.XStream.<init>(XStream.java:323)
at hudson.util.XStream2.<init>(XStream2.java:62)
at hudson.model.Run.<clinit>(Run.java:1867)
... 13 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.thoughtworks.xstream.XStream.dynamicallyRegisterConverter(XStream.java:728)
... 19 more
Caused by: javax.xml.datatype.DatatypeConfigurationException: Provider org.apache.xerces.jaxp.datatype.DatatypeFactoryImpl not found
at javax.xml.datatype.DatatypeFactory.newInstance(Unknown Source)
at com.thoughtworks.xstream.converters.extended.DurationConverter.<init>(DurationConverter.java:33)
... 24 more
Caused by: java.lang.ClassNotFoundException: Classloading from system classloader disabled
at java.lang.Throwable.<init>(Throwable.java:56)
at java.lang.Throwable.<init>(Throwable.java:80)
at java.lang.ClassNotFoundException.<init>(ClassNotFoundException.java:80)
at hudson.remoting.RemoteClassLoader$ClassLoaderProxy.fetch2(RemoteClassLoader.java:399)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:274)
at hudson.remoting.Request$2.run(Request.java:270)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:432)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:284)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
at java.lang.Thread.run(Thread.java:799)
I had similar issue. Researched internet but did not get any solution. Finally debugged the jenkins/hudson and resolved this issue.
The root cause of this error is that recent versions of jenkin is shipped with xml parser within jenkins.war file. Looks like if your server already has this jar file, it won't let jenkin application to reload its own version of xml parsers. So to resolve this issue I have removed file xercesImpl-2.9.1.jar from WEB-INF/lib directory of jenkins.war file. After that replaced existing war file and restarted server. And it worked as without any problem.