I am getting below error on my web app.
java.lang.UnsatisfiedLinkError: Can't obtain updateLastError method for class com.sun.jna.Native
com.sun.jna.Native.initIDs(Native Method)
com.sun.jna.Native.<clinit>(Native.java:139)
com.sun.jna.Pointer.<clinit>(Pointer.java:41)
com.sun.jna.platform.win32.WinNT$HANDLEByReference.<init>(WinNT.java:1114)
com.sun.jna.platform.win32.WinNT$HANDLEByReference.<init>(WinNT.java:1110)
waffle.windows.auth.impl.WindowsAuthProviderImpl.logonDomainUserEx(WindowsAuthProviderImpl.java:193)
waffle.windows.auth.impl.WindowsAuthProviderImpl.logonDomainUser(WindowsAuthProviderImpl.java:181)
waffle.windows.auth.impl.WindowsAuthProviderImpl.logonUser(WindowsAuthProviderImpl.java:212)
waffle.apache.MixedAuthenticator.post(MixedAuthenticator.java:233)
waffle.apache.MixedAuthenticator.authenticate(MixedAuthenticator.java:112)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:577)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
I searched that it may be due to some old version access of jna but removing jna is giving me NoClassDefErrors for com.sun.jna.Pointer. Also tried -Djna.nosys=true but its also not solving the issue.
I also tried -Djava.library.path=
from What is the cause of an UnsatisfiedLinkError? but it is also not working..
Any suggestion is highly appreciated.
I resolved this by deleting an old jnidispatch.dll file from my machine.
I'm using Gradle and Tomcat on Windows 7.
Delete the jnidispatch.dll file in C:\Users\<username>\.gradle\native\jna\win32-amd64
Don't have enough rep to just comment, but this is vaguely similar to a question i asked a couple years ago called UnsatisfiedLinkError, despite setting Djava.library.path variable
Somebody suggested making sure i was using the right architecture type, i.e. using 64 bit jdk with 64 bit Tomcat & 32 with 32. Does that match up?
Related
Until a few days ago, my STS worked perfectly, but of a sudden, the Pivotal server does not start, throws me the following error message when you run an application:
SEVERE: Class loader creation threw exception
java.io.IOException: The filename, directory name, or volume label syntax is incorrect
at java.io.WinNTFileSystem.canonicalize0 (Native Method)
at java.io.Win32FileSystem.canonicalize (Win32FileSystem.java: 414)
at java.io.File.getCanonicalPath (File.java: 618)
at java.io.File.getCanonicalFile (File.java: 643)
at org.apache.catalina.startup.ClassLoaderFactory.createClassLoader (ClassLoaderFactory.java: 170)
at org.apache.catalina.startup.Bootstrap.createClassLoader (Bootstrap.java: 149)
at org.apache.catalina.startup.Bootstrap.initClassLoaders (Bootstrap.java: 90)
at org.apache.catalina.startup.Bootstrap.init (Bootstrap.java: 226)
at org.apache.catalina.startup.Bootstrap.main (Bootstrap.java: 425)
They could help me with this problem?
From already, thank you very much for your attention and time.
Gustavo Echenique
I had the same error on Tomcat 6 (Pivotal 3.0, STS) and my problem was in catalina.properties. The "common.loader" property was incorrectly using Tomcat 8 style and it was as follows:
common.loader = \
\"${catalina.base}/lib\",\
\"${catalina.base}/lib/*.jar\",\
\"${catalina.home}/lib\",\
\"${catalina.home}/lib/*.jar\"
I have removed the double quotes and that fixed the problem. Correct definition:
common.loader = \
${catalina.base}/lib,\
${catalina.base}/lib/*.jar,\
${catalina.home}/lib,\
${catalina.home}/lib/*.jar
Also, STS has quietly added Tomcat 8 JARs (bootstrap.jar, etc) to my Tomcat 6 launch configuration. While I had these JARs on the classpath, everything worked fine. But once I discovered and removed them, Tomcat 6 started breaking with the error in the original post.
I started to have the same issue out of nothing as well. We are using Java 1.7 in our project, but I also have Java 8 installed on my machine for experimenting. Even though everything is still configured to use 1.7 (I never changed the configuration and it was working fine), I think after some Java 8 update I started to get this issue.
After trying several things, I decided to uninstall all Java 8 related updates and installations; and made a fresh installation of Spring STS 3.6.2 with a new workspace. It seems to be working fine right now. You can try this if you also have a similar environment.
I have a program that uses Sqlite database. It works fine on Windows (exported jar or directly in Eclipse) but when I move it to linux server (plan is to use run it at certain intervals, cron job). I'm exporting it to jar from Eclipse and packing the sqlite-jdbc4-3.8.2-SNAPSHOT.jar with it. Error is this:
/$ /usr/bin/java -jar /home/username/Software.jar /home/username/
java.lang.UnsatisfiedLinkError: /tmp/sqlite-3.8.2-amd64-libsqlitejdbc.so: /tmp/sqlite-3.8.2-amd64-libsqlitejdbc.so: failed to map segment from shared object: Operation not permitted
Exception in thread "main" java.lang.UnsatisfiedLinkError: org.sqlite.core.NativeDB._open(Ljava/lang/String;I)V
at org.sqlite.core.NativeDB._open(Native Method)
at org.sqlite.core.DB.open(DB.java:161)
at org.sqlite.core.CoreConnection.open(CoreConnection.java:145)
at org.sqlite.core.CoreConnection.<init>(CoreConnection.java:66)
at org.sqlite.jdbc3.JDBC3Connection.<init>(JDBC3Connection.java:21)
at org.sqlite.jdbc4.JDBC4Connection.<init>(JDBC4Connection.java:23)
at org.sqlite.SQLiteConnection.<init>(SQLiteConnection.java:44)
at org.sqlite.JDBC.createConnection(JDBC.java:113)
at org.sqlite.JDBC.connect(JDBC.java:87)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:207)
....
So before you ask, I've made sure that sqlite-3.8.2-amd64-libsqlitejdbc.so in /tmp/ has all permissions (rwxrwxrwx). Still that native library is causing problems. It does get copied in /tmp/ folder though. That being said I totally suck in Linux... and for that reason I'm pretty much clueless what to try next.
What should I do? Switch connector?
EDIT:
Solved the problem by using System.setProperty("java.io.tmpdir", "/home/username/"); Apparently it for some reason couldn't execute the native library from tmp folder... Probably because it was created by root. Also I had to revert back to sqlite-jdbc-3.7.2.jar because the new one crashes on linux.
I had same problem, and I found the solution in this GitHub issue:
JAVA_OPTS=-Djava.io.tmpdir=/path/to/some/other/tmpdir bin/cerebro
Also look at this other SO answer.
I am using Netbeans 7, and I have 32 bit JDK version 1.7.0.40. I want to use jpcap library to analyze incoming packets.
I do following to be able to use jpcap.
I added "jpcap.jar" into my project's library.
I copied "jpcap.dll" into my JRE/bin
I copied "jpcap.jar" into my JDK/jre/lib/ext
I copied "jpcap.jar" into my JRE/lib/ext
However, I get the exception below:
Exception in thread "main" java.lang.UnsatisfiedLinkError: jpcap.JpcapCaptor.getDeviceList()[Ljpcap/NetworkInterface;
at jpcap.JpcapCaptor.getDeviceList(Native Method)
at src.JpcapAnalyzer.<init>(JpcapAnalyzer.java:19)
at src.Main.main(Main.java:31)
Java Result: 1
I appreciate for any recommendations.
Edit :
After 2 weeks posting this question, I received no answers. Then I want to share my experience with the community.
I tried another library,jnetpcap, which can be downloaded at https://sourceforge.net/projects/jnetpcap/. I easily implemented it. You can use this library both in 32 bit and 64 bit OS and JDK.
If I run my program or server then I find alsways this error message. Can anyone tell me and help me please.. I will be very thankfull to you.
<Jul 29, 2013 3:01:55 AM ACT> <Error> <Socket> <BEA-000433> <Unable to load performance pack. Using Java I/O instead.
Please ensure that libmuxer library is in :'C:\j2sdk1.4.2_17\bin;C:\bea\weblogic81\bin;C:\bea\weblogic81\server\bin'
java.lang.UnsatisfiedLinkError: no muxer in java.library.path
java.lang.UnsatisfiedLinkError: no muxer in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1517)
at java.lang.Runtime.loadLibrary0(Runtime.java:788)
at java.lang.System.loadLibrary(System.java:834)
at weblogic.socket.PosixSocketMuxer.<init>(PosixSocketMuxer.java:30)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at java.lang.Class.newInstance0(Class.java:308)
at java.lang.Class.newInstance(Class.java:261)
at weblogic.socket.SocketMuxer.makeTheMuxer(SocketMuxer.java:82)
at weblogic.socket.SocketMuxer.getMuxer(SocketMuxer.java:49)
at weblogic.t3.srvr.ListenThread.initServerSocket(ListenThread.java:690)
at weblogic.t3.srvr.ListenThread.run(ListenThread.java:205)
"...this indicates that the Native Libraries are not properly being picked up the Weblogic server. This happens when the weblogic installed as 32 Bit on a 64 Bit Operating System or vice versa. In such scenario we need to explicitly specify the path to the Native Library."
Add the following to the setDomainEnv.sh
-Djava.library.path=/opt/bea/wlserver_10.3/server/native/solaris/sparc64/
Enable "Native IO" check box under each servers Tuning Tab.
Restart the servers.
http://weblogic.middlewarebase.com/2013/04/unable-to-load-performance-pack-using.html
I have the some problem, and thanks to sᴜʀᴇsʜ-ᴀᴛᴛᴀ for the hint! It looks like a 32bit/64bit issue. By the way, I'm using WebLogic 12 on a 64bit Centos5.
Note that the libmuxer.so is provided with weblogic for many archs, in fact
$ find $MW_HOME -name *muxer*
/application/weblogic/wlserver/server/native/macosx/libmuxer.jnilib
/application/weblogic/wlserver/server/native/linux/s390/libmuxer.so
/application/weblogic/wlserver/server/native/linux/ia64/libmuxer.so
/application/weblogic/wlserver/server/native/linux/x86_64/libmuxer.so
/application/weblogic/wlserver/server/native/linux/i686/libmuxer.so
/application/weblogic/wlserver/server/native/linux/s390x/libmuxer.so
I edited the file $MW_HOME/wlserver/common/bin/commEnv.sh, where I found
#JAVA_USE_64BIT, true if JVM uses 64 bit operations
JAVA_USE_64BIT=false
and updated with
#JAVA_USE_64BIT, true if JVM uses 64 bit operations
JAVA_USE_64BIT=true
This worked for me, the Error you reported is gone.
Good luck!
I am using Jacob a Java-COM bridge and I have placed the required dll to -C:\WINDOWS\system32\jacob-1.14.3-x86.dll. I have also added the required jar file to -
C:\Program Files\Java\jdk1.6.0_18\jre\lib\ext\jacob-1.14.3.jar.
Until yesterday I was able to use it, today I uninstalled some unrequired .Net softwares on my machine and suddenly it stopped working and throws following error -
com.jacob.com.ComFailException: Can't co-create object
at com.jacob.com.Dispatch.createInstanceNative(Native Method)
at com.jacob.com.Dispatch.<init>(Dispatch.java:101)
at com.jacob.activeX.ActiveXComponent.<init>(ActiveXComponent.java:58)
My machine belongs to "x86 Family 15 Model 4 Stepping 3". I have tried to de-register/register the dll using regsvr32.exe but to no luck. I have no idea how to bring it to work again..other wise I will have to format my machine..geeks pls hlp me out !
I wonder if anyone faced similar problem by any chance..
Anyways I had no other option than to restore my machine to last working date.
I guess some JAVA-COM class entries would have been accidently deleted from the registry.
Had no idea which was it exactly..
Finally "System Restore" was my solution :)