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

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

Related

TestNG setup issue- Cannot find class in classpath

I am pretty new to TestNG framework. I did download TestNG from the link http://beust.com/eclipse. Post this I created a new Java Project named as MyProject and a new TestNG class file "NewTest". I did write a small piece of Code with #Test annotation to launch Firefox browser and navigate to Google. I tried searching the web for possible solutions to sort this issue but I am not able to find the low level steps on how this can be corrected. Please help.
Output
org.testng.TestNGException: Cannot find class in classpath: NewTest
at org.testng.xml.XmlClass.loadClass(XmlClass.java:81)
at org.testng.xml.XmlClass.init(XmlClass.java:73)
at org.testng.xml.XmlClass.<init>(XmlClass.java:59)
at org.testng.xml.TestNGContentHandler.startElement(TestNGContentHandler.java:582)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.emptyElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.testng.xml.XMLParser.parse(XMLParser.java:39)
at org.testng.xml.SuiteXmlParser.parse(SuiteXmlParser.java:16)
at org.testng.xml.SuiteXmlParser.parse(SuiteXmlParser.java:9)
at org.testng.xml.Parser.parse(Parser.java:170)
at org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:305)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:109)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:236)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:81)
Move Package1 inside src directory and run the code.
Note: Eclipse run .java files from src directory, and create .class files in bin directory.
It seems that I did not update my Eclipse for few months. I did navigate to Eclipse->Help->Check for updates->Completed installing all updates. Post this the test did run fine.

Error opening transformations in Pentaho DI in Mac

I have installed Pentaho DI and it works for me but not always.
Pentaho DI lets me open only 3 transformations and when I try to open one more (in the menu) the window does not appear.
Also when I push a button who opens a dialog box it appears me an error like this:
java.lang.NullPointerException
at org.eclipse.swt.widgets.FileDialog.panel_shouldShowFilename(Unknown Source)
at org.eclipse.swt.widgets.Display.dialogProc(Unknown Source)
at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
at org.eclipse.swt.internal.cocoa.NSSavePanel.setAccessoryView(Unknown Source)
at org.eclipse.swt.widgets.FileDialog.open(Unknown Source)
at org.pentaho.di.ui.job.entries.shell.JobEntryShellDialog$12.widgetSelected(JobEntryShellDialog.java:690)
at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Display.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.notifyListeners(Unknown Source)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
at org.pentaho.di.ui.job.entries.shell.JobEntryShellDialog.open(JobEntryShellDialog.java:714)
at org.pentaho.di.ui.spoon.delegates.SpoonJobDelegate.editJobEntry(SpoonJobDelegate.java:259)
at org.pentaho.di.ui.spoon.Spoon.editJobEntry(Spoon.java:8564)
at org.pentaho.di.ui.spoon.job.JobGraph.editEntry(JobGraph.java:2836)
at org.pentaho.di.ui.spoon.job.JobGraph.mouseDoubleClick(JobGraph.java:633)
at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Display.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.notifyListeners(Unknown Source)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
at org.pentaho.di.ui.spoon.Spoon.readAndDispatch(Spoon.java:1339)
at org.pentaho.di.ui.spoon.Spoon.waitForDispose(Spoon.java:7939)
at org.pentaho.di.ui.spoon.Spoon.start(Spoon.java:9214)
at org.pentaho.di.ui.spoon.Spoon.main(Spoon.java:653)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.pentaho.commons.launcher.Launcher.main(Launcher.java:92)
I don't know what can be. Java version maybe?
What version? Pentaho 6.0.0 didnt work on the mac. 6.0.1 fixes it
From the stack-trace I see that it is happens when you double-click on JobEntry step in your transformation:
at org.pentaho.di.ui.spoon.Spoon.editJobEntry(Spoon.java:8564)
at org.pentaho.di.ui.spoon.job.JobGraph.editEntry(JobGraph.java:2836)
at org.pentaho.di.ui.spoon.job.JobGraph.mouseDoubleClick(JobGraph.java:633)
It is attempts to open file dialog in response to this action:
at org.eclipse.swt.widgets.FileDialog.open(Unknown Source)
at org.pentaho.di.ui.job.entries.shell.JobEntryShellDialog$12.widgetSelected(JobEntryShellDialog.java:690
And then NPE is thrown. So it is not a java version. Very likely you are not use repository to store transformation/jobs, or use it but some of items in repository may still have links to filesystem, or any other.
That is might be a case when different transformation is reference same file, or one transformation opened from repository, other from filesystem, having same name but trying to reference one job entry.
Nobody knows better than you with you unique environment. If you can reproduce this NPE with job/transformation example I would suggest to open bug in jira.pentaho.org for 'Data Integration' project.

Getting Exception: java.lang.SecurityException: attempted to open sandboxed jar as Trusted-Only

We need to sign all 5 .class java files. That we have done by creating a .jar file and signed it too. But while executing my web application it is showing below error message in Java Console
java.lang.SecurityException: attempted to open sandboxed jar https://xxxxxxxxxxx.com/xxxx/JavaApplet.jar as Trusted-Only
at com.sun.deploy.security.CPCallbackHandler$ParentElement.checkResource(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.checkResource(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.getResource(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath.getResource(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(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.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.SecurityException: attempted to open sandboxed jar https://xxxxxxxxxxx.com/xxxx/JavaApplet.jar as Trusted-Only*
I am not sure about this error. I have signed Jar 3-4 times after getting this error but I am getting same error again again.
Please can anybody help me if I am doing something wrong?
Check your Manifest.mf file of jar. This should contain the Trusted-Library: true if you are using MixedCode(Applet called from the javascript) and your files are self signed. oracle has released latest security updates in Java 7 update 21. According to the release notes you must sign your code with CA certificates only, else JRE will treat your code as malicious. oracle is totally deprecating the Mixedcode. Please check the release notes of latest updates. But before adding the attribute Trusted-Library: true in manifest.mf make sure you are aware of the effects of the attribute.

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...

Execution of .sql file through sqltool utility in hsqldb

I am trying to execute the demofeature_enable.sql file through the following way.
java -jar sqltool.jar --inlineRC=url=jdbc:hsqldb:hsql://localhost:9999/bwdb,user=sa,password= demofeature_enable.sql
The above command is throwing follwoing error
Exception in thread "main" java.lang.Error: Error: could not match input
at org.hsqldb.cmdline.sqltool.SqlFileScanner.zzScanError(Unknown Source)
at org.hsqldb.cmdline.sqltool.SqlFileScanner.yylex(Unknown Source)
at org.hsqldb.cmdline.SqlFile.scanpass(Unknown Source)
at org.hsqldb.cmdline.SqlFile.execute(Unknown Source)
at org.hsqldb.cmdline.SqlTool.objectMain(Unknown Source)
at org.hsqldb.cmdline.SqlTool.main(Unknown Source)