I'm working on a Java project with a native library in question. I believe that another version is being loaded when I try to use it from a non-Netbeans environment- when I debug the file in Netbeans, it works as expected, but when I run it from anywhere else, it hits a "NoSuchMethodError", leading me to believe that there is another instance (in the wrong version) being loaded
I've already examined my java.library.path and removed all other instances of the library beyond the dist/lib, but the error persists. Is there an easy way to find the location of a loaded library, so that I might be able to find out what is happening?
Related
Hey guys I am working on a Scala/Java project and we are using OpenCv to image processing. I have been stuck for several days trying to import the library, I went through different errors but right now the one I am having in the last attempts is
Uncaught error from thread [application-akka.actor.default-dispatcher-9]: org.opencv.imgcodecs.Imgcodecs.dicomJpgMatRead_0(JII)J, shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled for ActorSystem[application
java.lang.UnsatisfiedLinkError: org.opencv.imgcodecs.Imgcodecs.dicomJpgMatRead_0(JII)J
Please, I would be very grateful if someone could help me. I don't know what else to try.
Thank you in advance!
This generally happens when your code has access to the class when you compile but not when you run. In many IDEs it's due to where you are placing the classes or how you are deploying the code.
UnsatisfiedLinkError refers specifically to a DLL (or Lib in Linux) that it isn't finding at runtime. Does your running code have access to the dynamically linked library? (obviously not, find out why)
Hey guys thank you for the response. I try (at least I think) all the solutions I found including the onces that are in the link you mentioned #zoranjeremic.
I am working with a Java project that has inside one class "JDicomImageLoader" that is the one who needs the opencv library. Inside of it I have a method call setup:
Now I am using a System.load with absolute path but I also try doing System.loadLibrary with the respective "java.library.path".
Then I am compile this Java project (sbt compile) and publish locally (sbt publishlocal) to use in my Scala project.
I had an issue where I was getting the following error in the Problems view when attempting to save/compile a Java script library in a DB held on a server. I'm using DDE 8.5.3 (Note, I've changed the app and the lib names):
Project 'app_name.nsf.java-lib-name.javalib' is missing required library: 'C:\lotus\notes8\jvm\lib\axis\axis.jar'
It's worth noting that I'm using the Eclipse based Java editor, this issue doesn't happen if I use the traditional editor.
My script library had a number of JAR files associated, however none of them were included via the path which appeared to be causing the issue. Also it couldn't have been some deeply concealed dependency thing as all of the included JARs are custom built and none of them user or require Axis.
I also did a test creating a fresh library without pulling any external JARs in and the same error occurred.
It turns out the problem was being caused by the use of "JavaUserClassesExt" in my local notes.ini. I've recently been using a LN client app which depends on Axis and part of the install process includes dropping the relevant Axis files into a custom directory within jvm/lib/ext and then updating the ini to include those files using "JavaUserClassesExt" when launching the JVM.
I guess the issue has only shown up now because I've recently had to change the location of my LN install from the path indicated above (lotus\notes8) to something slightly different (lotus\notes853). I copied my ini across from the original install location which is why it still references the old path. Once I removed the references to the wrong path, the error cleared up.
So I can kind of understand what is happening, the JVM is attempting to load all required files on the classpath but is running into an issue because the files being requested via "JavaUserClassesExt" can no longer be found.
What I don't understand is why it's throwing this error when I'm attempting to edit a script library in a completely different database which has nothing to do with the Axis framework. I'd expect a compile error if trying to import anything to do with Axis based on it being on my local classpath, but to throw this error when the library has nothing to do with Axis seems confusing and incorrect to me.
As I mentioned, this only happens when using the Eclipse based Java editor so I presume this is a bug with that version of the editor.
Has anyone come across anything similar? Would this be classed as expected behaviour or can anyone confirm if this is a bug?
I realise this is a pretty edge case issue but would be interested in any insight.
Cheers,
Lee
I'm a bit new to Java / Processing and I opened up a project/workspace with the following errors:
is missing required library: '/Applications/Processing.app/Contents/Resources/Java/libraries/javamail/smtp.jar'
/javamail/dsn.jar
/javamail/mailapi.jar
/javamail/pop3.jar
I have the Processing app installed, but it's been a while...do I just need to upgrade processing or is there another place I need to go to get these .jar files?
I'm using Eclipse and there seems to be quite a list of referenced jar files (some broken)
It's telling you that there used to be a library at
/Applications/Processing.app/Contents/Resources/Java/libraries/javamail/smtp.jar
but it's no longer there, or possibly you opened a project that somebody else edited on a different machine where things were laid out differently.
Open the project build-path dialog and make sure all the libraries point to the correct locations.
If the problem still persist, try doing clean and build in eclipse. It might help.
So I've been plagued by this issue, whenever I try to run my app in eclipse, I get this error.
2011-02-23 09:55:08,388 ERROR (com.xxxxx.services.factory.ServiceInvokerLocal:21) -
java.lang.UnsatisfiedLinkError: no ocijdbc10 in java.library.path
I've tried following the steps I found here with no luck. I've tried this on a XP VM as well as windows 7 (although in win 7 I get a different error, below)
java.lang.UnsatisfiedLinkError: no ocijdbc9 in java.library.path
I've made sure my oracle client was ok (by running TOAD) and I also re-added the classes12.jar / ojdbc14.jars to my WEB-INF/lib folder taken directly from my %ORACLE_HOME% folder (also re-added them to the lib path). I've also tried just adding the ojdbc14.jar without the classes12.jar. Any suggestions appreciated.
In the XP VM I have my PATH variable set to C:\Program Files\Java\jdk1.6.0_24\bin;C:\ORACLE\product\10.2.0.1\BIN. I'm using Tomcat server 5.0
I agree with the advice you've gotten in the comments to use the thin driver instead of the OCI driver if you can. It is simpler and it should bypass the problem you're having.
If you do need the OCI driver for some reason, your problem is that the DLLs are not on your Java library path. This is separate from the classpath that is used to locate class definitions. The clues here are (a) the fact that the error references java.library.path, and (b) the fact that you are getting an UnsatisfiedLinkError rather than a ClassNotFoundException.
You would need to set your java.library.path property to include the location of the DLLs, or add the location of the DLLs to the Windows PATH, in order for Java to locate them.
More information here: http://forums.oracle.com/forums/thread.jspa?threadID=615281
I have encountered this same error twice recently. The first time I managed to resolve it without knowing exactly what I did. Don't you just hate that because when it shows up again what do you do? Well it did show up again when I had to create a new project in eclipse. This time I know what the problem was and it is a very simple thing to overlook and fix. The other posters have great information but it won't help you if you have the same root cause that I had and I believe that you do...
The issue was simple and it was this: I had two different ojdbcXX.jar files in my Java buildpath (within Eclipse). I had both ojdbc14.jar and ojdbc6.jar Apparently it was hitting ojdbc14.jar first and then throwing the error. Once I removed the unnecessary jar file then the error went away. Drove me crazy for an entire day before I realized what was wrong!
I hope this helps.
This error occurs when you have a wrong/older version of oci.dll. After setting the path and reverting to the correct oci.dll, the error went away.
I also meet this error when i use DBvisualize to connect Oracle database.
I think it is because you have not yet installed Oracle Client.
After installing it, maybe it is ok
I had the same problem while using MyEclipse. One needs to set the path to oracle clients lib and bin folder. Attaching image for reference. Hope it helps
enter image description here
I am trying to publish an Atom/RSS feed in my Java based Google App Engine code. I have tried using Rome and keep getting the following error (tried googling without success), also the code I am running that generates the error is the demo code (so I get the feeling Rome won't work with GAE)
java.lang.NoClassDefFoundError: org/jdom/JDOMException
at com.sun.syndication.io.SyndFeedOutput.<init>(SyndFeedOutput.java:44)
What I am looking for is recommendations for a simple Java library to create and publish an Atom feed from within Google App Engine.
Thanks.
java.lang.NoClassDefFoundError: org/jdom/JDOMException
This just means that the particular class is missing in the runtime classpath (while it was available in the compiletime classpath, that's the difference with ClassNotFoundException).
Logical next step would be to include the particular class (or more actually, the JAR file with the particular class) in the runtime classpath. Then this error wil gone.
Check your compiletime classpath if it is there and add it to runtime classpath. Or if it is actually a dependency which you don't have yet, then it's good to know that the package name already hints that you could find and download it at http://jdom.org.
#Adriana and any other people late to the thread:
What Balus meant was that the original poster, was missing the JDOM library, which can be downloaded at http://jdom.org/. You just need to add the .jar to the classpath, which the ROME demo code apparently was lacking.