I am implementing java application to communicate with windows dll files through a C++ JNI bridge.
Some point, with the following error, my java application is getting freezed.
java.lang.NoSuchMethodException: java.lang.System.getCallerClass()
at java.lang.Class.getDeclaredMethod(Class.java:2130) ~[na:1.8.0_121]
at com.jniwrapper.Library.unloadNativeCode(SourceFile:181) ~[jniwrap-3.8.4.jar:na]
at com.jniwrapper.NativeResourceCollector.d(SourceFile:252) [jniwrap-3.8.4.jar:na]
at com.jniwrapper.NativeResourceCollector.a(SourceFile:77) [jniwrap-3.8.4.jar:na]
at com.jniwrapper.NativeResourceCollector.c(SourceFile:22) [jniwrap-3.8.4.jar:na]
at com.jniwrapper.n.run(SourceFile:141) [jniwrap-3.8.4.jar:na]
This method was removed in JDK8, while it was still there in JDK7.
As jniwrapper is a commercial product, you should ask them for an updated version. From the release notes, version 3.10 should do the trick.
Related
I am trying to install db2 connect (Version 10.1) under Linux (Debian 9.5). After calling db2setup the user interface freezes at point 5 (language selection) of the menu. The problem occurs only with the installation type CUSTOM.
This error message is triggered in the /tmp/db2setup.err log when the Next button is pressed.
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at com.ibm.db2.install.util.MessageHandler.handleMessage(Unknown Source)
at com.ibm.db2.install.util.MessageHandler.handleMessage(Unknown Source)
at com.ibm.db2.install.util.MessageHandler.handleError(Unknown Source)
at com.ibm.db2.install.gui.panels.FeaturePage.preValidate(Unknown Source)
at com.ibm.db2.install.gui.wizard.SetupWizardPanel.preValidatePage(Unknown Source)
at com.ibm.db2.install.gui.wizard.SetupWizardPanel.actionPerformed(Unknown Source)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2029)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2352)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:413)
at javax.swing.JToggleButton$ToggleButtonModel.setPressed(JToggleButton.java:319)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:263)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:300)
at java.awt.Component.processMouseEvent(Component.java:6515)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3332)
at com.ibm.db2.tools.common.sg.CustomToggleButton.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Component.java:6280)
at java.awt.Container.processEvent(Container.java:2240)
at java.awt.Component.dispatchEventImpl(Component.java:4871)
at java.awt.Container.dispatchEventImpl(Container.java:2298)
at java.awt.Component.dispatchEvent(Component.java:4697)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4843)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4503)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4433)
at java.awt.Container.dispatchEventImpl(Container.java:2284)
at java.awt.Window.dispatchEventImpl(Window.java:2724)
at java.awt.Component.dispatchEvent(Component.java:4697)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:718)
at java.awt.EventQueue.access$000(EventQueue.java:112)
at java.awt.EventQueue$3.run(EventQueue.java:677)
at java.awt.EventQueue$3.run(EventQueue.java:675)
at java.security.AccessController.doPrivileged(AccessController.java:226)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:98)
at java.awt.EventQueue$4.run(EventQueue.java:691)
at java.awt.EventQueue$4.run(EventQueue.java:689)
at java.security.AccessController.doPrivileged(AccessController.java:226)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:688)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:222)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:139)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:128)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:124)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:101)
This message appears in db2setup.log:
"TSAMP" is needed but cannot be found on the media.
What am I doing wrong? I also tried to make the selection with the keyboard only - with the same result.
Is it possible to install db2 connect without GUI?
Stackoverflow is for programming issues, you might try dba.stackexchange.com for non-programming matters.
According to IBM SPCR, the v10.1 of Db2-connect was supported on RHEL 5.6 & 6, also SLES 10 and 11 , and Ubuntu 10.04LTS , 12.04LTS.
It might work (or might not) on later versions of Linux, or Debian 9.5 , or might have issues that need workaraounds. You might not get official support via the IBM formal channels. If you intend to use for production, ensure your business formally accepts the risks of running an out-of-support product on operating-system for which it was not tested.
If possible, use a currently supported version of a Db2-connect edition. Check end of support dates with IBM.
Ensure you try with the final fixpack of V10.1 which is FP6 (free download from IBM - get the 'server fixpack' build fixpack, not the universal one,
the server fixpack is installable without needing the base product to be installed already).
Install as root, because non-root installs are troublesome.
Carefully verify all of the prerequisites especially the required packages, SElinux settings, kernel-parameters and all others mentioned in documentation.
To install without a GUI you have 2 options, either use db2setup with response-files, or use the command-line db2_install tool (deprecated, but still works). Both tools support additional detailed logging (tracing) which can help, refer to documentation for details.
If you already have a different working Db2-connect server, you can use its db2rspgn tool to generate a text response-file (which you can then edit as needed) and supply the modified response file to db2setup.
If you get installation/run issues, try dba.stackexchange.com.
To avoid the exception, the TSAMP option must be deselected (installation type: CUSTOM).
I have installed eclipse luna java EE for android development and have installed all the plugins and most of the software available. It was working fine untill today when i got the error while trying to open the activity_main.xml - "write access not allowed during rendering".
also this is the content of the exception stack trace :
Exception raised during rendering: com/android/layoutlib/bridge/impl/RenderSessionImpl
java.lang.ClassCastException: org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 cannot be cast to java.lang.String
at org.eclipse.m2e.logback.configuration.LogHelper.logJavaProperties(LogHelper.java:26)
at org.eclipse.m2e.logback.configuration.LogPlugin.loadConfiguration(LogPlugin.java:189)
at org.eclipse.m2e.logback.configuration.LogPlugin.configureLogback(LogPlugin.java:144)
at org.eclipse.m2e.logback.configuration.LogPlugin.access$2(LogPlugin.java:107)
at org.eclipse.m2e.logback.configuration.LogPlugin$1.run(LogPlugin.java:62)
at java.util.TimerThread.mainLoop(Unknown Source)
at java.util.TimerThread.run(Unknown Source)
also it is worth mentioning that prior to this error i got a blue screen error in windows 8.1, which was "kernel security check failure". after that i did a memory check and found no problem. i have also installed the Genymotion emulator for android and have VT enabled in bios.
could you help me with this? thank you.
Finally i had to reinstall eclipse. The better way is to install each version of eclipse for the specific need and not to install a lot of unnecessary plugins. This according to me is the right way to use Eclipse.
If anyone has a better solution i would be happy to know it.
This question already has an answer here:
Talend: java.lang.UnsatisfiedLinkError: no sapjco3 in java.library.path
(1 answer)
Closed 5 years ago.
I am getting the below mentioned error while using SAPJCO 3.0.11 jar for 32 Bit windows XP OS. I am using a StepByStepClient example mentioned in the zip libarary when i downloaded the 32 but SAPJCO jar from market place.
The Jar I downloaded never had a dll file for 32 bit system.
please let me kow what i am missing and please help me to get this issues resolved.
Below is the error:
ava.lang.UnsatisfiedLinkError: no sapjco3 in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1886)
at java.lang.Runtime.loadLibrary0(Runtime.java:849)
at java.lang.System.loadLibrary(System.java:1088)
at com.sap.conn.jco.rt.DefaultJCoRuntime.loadJCoLibrary(DefaultJCoRuntime.java:772)
at com.sap.conn.jco.rt.DefaultJCoRuntime.registerNativeMethods(DefaultJCoRuntime.java:382)
at com.sap.conn.jco.rt.JCoRuntime.registerNatives(JCoRuntime.java:1200)
at com.sap.conn.rfc.driver.CpicDriver.<clinit>(CpicDriver.java:792)
at com.sap.conn.rfc.engine.DefaultRfcRuntime.getVersion(DefaultRfcRuntime.java:36)
at com.sap.conn.rfc.api.RfcApi.RfcGetVersion(RfcApi.java:238)
at com.sap.conn.jco.rt.MiddlewareJavaRfc.<clinit>(MiddlewareJavaRfc.java:217)
at com.sap.conn.jco.rt.DefaultJCoRuntime.initialize(DefaultJCoRuntime.java:98)
at com.sap.conn.jco.rt.JCoRuntimeFactory.<clinit>(JCoRuntimeFactory.java:23)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:190)
at com.sap.conn.jco.JCo.createJCo(JCo.java:52)
at com.sap.conn.jco.JCo.<clinit>(JCo.java:26)
at com.sap.conn.jco.JCoDestinationManager.getDestination(JCoDestinationManager.java:77)
at com.sap.connect.StepByStepClient.step1Connect(StepByStepClient.java:91)
at com.sap.connect.StepByStepClient.main(StepByStepClient.java:358)
Exception in thread "main" java.lang.ExceptionInInitializerError: JCo initialization failed with java.lang.UnsatisfiedLinkError: no sapjco3 in java.library.path
Thanks, Rohit
First, and despite this connector is designed for Java, you should be aware that SAP Java Connector is not platform independent. You should have guessed it because there are different download links for each architecture in SAP's website.
So, the SAP Java Connector consists basically of two parts:
a sapjco3.jar file, for the java binding (platform independent).
a native library (an .so-file or .dll-file) for the platform specific binding.
To make your application work, just assure that both files are in the PATH (or CLASSPATH) of your app, and you're done.
If you're under Windows, copying the .dll file to \Windows\System32 will work, but a puppy dies every time you do so. If you love puppies, don't do that. Ever.
Better yet, it would be to always read the documentation. This is really a very good practice. The docs for SAP Java Connector 3.0 clearly states the following:
SAP Java Connector 3.0 :: Installation
...
Microsoft Windows
...
Note: Do not copy the sapjco3.dll neither into the {windows-dir}\system32 nor into the {windows-dir}\SysWOW64 directory. This will break the operability of other JCo versions that are already installed on the same system. Furthermore you would risk that the current installation also would not work anymore, if the sapjco3.dll gets replaced in the respective Windows system directory in the future.
Then add {sapjco3-path} to the PATH environment variable.
Finally, add {sapjco3-path}\sapjco3.jar to your CLASSPATH environment variable.
...
This means SAP developers love puppies.
We are trying to run a process (broker) from a SUSE Linux Enterprise Server 11 (java-1_7_0-ibm) which connects to a Javaspace Blackboard (JINI) deployed on another linux machine. (CentOs with Open JDK "1.7.0_05-icedtea" version)
Stack Trace :
INFO: Starting broker
Exception in thread "main" java.lang.ExceptionInInitializerError
at java.lang.J9VMInternals.initialize(J9VMInternals.java:259)
at net.jini.jeri.BasicInvocationHandler.invokeRemoteMethod(BasicInvocationHandler.java:653)
at net.jini.jeri.BasicInvocationHandler.invoke(BasicInvocationHandler.java:528)
at com.sun.jini.reggie.$Proxy0.lookup(Unknown Source)
at com.sun.jini.reggie.RegistrarProxy.lookup(RegistrarProxy.java:128)
at edu.vt.ndssl.blackboard.JiniSpaceService.findSpace(JiniSpaceService.java:372)
at edu.vt.ndssl.blackboard.JiniSpaceService.<init>(JiniSpaceService.java:74)
at edu.vt.ndssl.blackboard.JavaSpaceBlackboard.<init>(JavaSpaceBlackboard.java:31)
at edu.vt.ndssl.blackboard.BlackboardFactory.make(BlackboardFactory.java:28)
at edu.vt.ndssl.broker.Broker.<init>(Broker.java:53)
at edu.vt.ndssl.broker.Broker.main(Broker.java:231)
Caused by: java.lang.RuntimeException: Unexpected exception
at com.sun.jini.logging.Levels.createLevel(Levels.java:142)
at com.sun.jini.logging.Levels.<clinit>(Levels.java:52)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:237)
... 10 more
Caused by: java.io.EOFException
at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2667)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1387)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2059)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1984)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1867)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1419)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:420)
at com.sun.jini.logging.Levels.createLevel(Levels.java:138)
... 13 more
Same code works fine with Java 1.6 version upto 26.
I am looking for a correct version of Java to be installed on the SUSE Linux Enterprise Server which will be compatible with this OS and also equivalent to the Oracle JDK Update 5 or Open JDK Version 1.7.0_05 (icedtea).
Apparently, the root cause of the problem is that Oracle has made an incompatible change to the serialization format of the com.sun.jini.logging.Levels class. The change reportedly happened in Oracle JDK 1.6.0_38 and JDK 1.7.0_13, and has presumably made it into recent OpenJDK versions as well.
This problem has manifested in a variety of projects that use JINI. Examples:
https://issues.apache.org/jira/browse/RIVER-415 + https://issues.apache.org/jira/browse/RIVER-416.
https://cloudifysource.zendesk.com/entries/23079726-bootstrap-localcloud-not-working-Could-not-initialize-class-com-sun-jini-logging-Levels
More examples can be found by searching for "com.sun.jini.logging.Levels EOFException".
I can't say what the solution is / would be for you, but I have a couple of ideas:
Avoidance: I think you can avoid the problem if you don't mix pre and post-change JVM versions in your application network.
If you need to upgrade your application JVMs, I suggest that you upgrade them all, and then do a complete shutdown/restart of your JINI applications and services.
Fix your applications: It appears that the Apache River project fixed the problem by modifying the JINI code. As the issue ticket says:
The com.sun.jini.logging.Levels class produces a RuntimeException with the latest version of Java (both 1.6 and 1.7). The issue surrounds creation of custom java.util.logging.Level. The current implementation uses a ClassReplacingObjectOutputStream and the LevelData approach. By removing this approach and creating a subclass of java.util.logging.Level the issue gets resolved.
The issue ticket has a lot of discussion on the best way to do this, proposed patches and links to the checkin where they actually implemented the fix.
I'm trying to create an SWT Browser widget of the SWT.MOZILLA type under windows 8 64Bit with SWT 4.3 64Bit.
According to this, SWT 4.3 should support 64 Bit version on XULRunner 10.x or 24.x
So, I have downloaded both the 10.x and 24.x 64 versions from here and unzipped under c:\xulrunner10 and c:\xulrunner24 respectively.
If I start my java app pointing to xulrunner10 (using the VM argument -Dorg.eclipse.swt.browser.XULRunnerPath=C:\xulrunner10) it works, however if I try with xulrunner24 (using the VM argument -Dorg.eclipse.swt.browser.XULRunnerPath=C:\xulrunner24) I get the follwoing error:
Exception in thread "main" org.eclipse.swt.SWTError: XPCOM error 0x80004005
at org.eclipse.swt.browser.Mozilla.error(Unknown Source)
at org.eclipse.swt.browser.Mozilla.initXULRunner(Unknown Source)
at org.eclipse.swt.browser.Mozilla.create(Unknown Source)
at org.eclipse.swt.browser.Browser.<init>(Unknown Source)
I also noticed that I get the same error if pointing to unexisting directory, however the folder c:\xulrunner24 exists and contains all the files as well as xulrunner.exe.
How can I make xulrunner 24.x 64bit embeddable in my swt 4.3 app?
Got it!
It's an error on SWT wiki: xulrunner 24.x requires SWT 4.4.
I've installed swt-4.4M5 and now I can embed xurlrunner 24 64bit
I realize that this question is old and already has an accepted answer, but the download location mentioned in the question is no longer valid (http://wiki.mozilla-x86-64.com/Download), and the same issue has been posted about several times.
With 64-bit 4.3 SWT I was able to fix this exception by using XULRunner version 1.9.2.25 runtimes. Originally I found the download from here: https://osdn.net/projects/sfnet_runawfe/downloads/SRC%20and%20BIN%20files/extras/xulrunner-1.9.2.25-win64.zip/
However, I have also re-hosted it as xulrunner-1.9.2.25.en-US.win64.zip.
Full explanation posted in my answer here: https://stackoverflow.com/a/44848877/3300205
Looks like this might be Eclipse bug 411996 (same error and stack trace).