no ocijdbc10 in java.library.path - java

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

Related

No LeapJava in java.library.path

I'm encountering a problem with the build of my JavaFX project with the Leap Motion.
When I run the file.jar, the application's window is opening, but when I call the leap motion, it's not working any more.
I have the following error :
Native code library failed to load.
java.lang.UnsatisfiedLinkError: no LeapJava in java.library.path
Yet, I have configured the buildpath. I have added the leapJava.jar, with the native library x64.
I don't understand why it doesn't work ?
Anyone with an idea ?
Thanks
The LeapJava.dll is missing or the Java library path is not set up correctly. Please have a look at the docs - setting up a project:
https://developer.leapmotion.com/documentation/java/devguide/Project_Setup.html
I have followed each step in the Eclipse section. :/
Firstly, since you haven't mentioned any specification about your system, I am answering this in context with a 64 bit Ubuntu machine.
You will posses a libLeap.so and a libLeapJava.so in 'YourDeveloperKitDirectory'/LeapSDK/lib/x64/ . These files should be copied to your /usr/lib and the configuration/bulid path (if using IntelliJ IDE -> 'Edit Configurations'->'Application'->'configuration'->'VM options'->"-Djava.library.path=/usr/lib") should be appropriately stated.
Save and run your application.
I had this problem, what solved it was adding -Djava.library.path=/Path/to/LeapDeveloperKit_2.3.1+31549_mac/LeapSDK/lib to the command line call for the .jar file. (make sure your developer kit is the right version)
So rather than:
java -jar leapMotionProgram.jar
It had to be:
java -jar -Djava.library.path=/Path/to/LeapDeveloperKit_2.3.1+31549_mac/LeapSDK/lib leapMotionProgram.jar

under hange root environment: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory

Actually I have solved the problem but I don't understand why it works.
I have been developing under a change root environment, which was configured by someone else. I tried to use java command, but got that error message in the title.
After searching for solutions to this problem, I found no one works for my situation. Then I downloaded the newest java package from Oracle website and put it somewhere in my change root environment. By running ./java in .../jre.../bin, I tried test whether this new one works and it did work.
Then the thing I cannot understand happened. After testing the new jre, the old java command is fixed and I don't get the error message any more. I have used "java -version" to check the version of the java command and it was the old version.
Can someone explain?

Finding Library Location in Java

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?

Java won't work (Possibly related to installing QTP)

I was working on eclipse two days ago, and closed it properly.
Now, when I'm trying to start it, I get the splash screen popping for a blink of an eye, then disappearing.
I get:
no error message, and
no error is logged in the <workspace>\.metadata\.log file (the last errors logged there are from two days ago).
Apparently, the problem isn't with the workspace, because I changed the SHOW_WORKSPACE_SELECTION_DIALOG argument in <eclipse>\configurations\.settings\org.eclipse.ui.ide.prefs to true, and it doesn't even get as far as showing the dialog.
There's only one thing I can recall I did before it stopped working - I have installed a plugin for UFT Java Extensibility SDK from HP.
Needless to say uninstalling it didn't help.
Is there any other log I can hope to find helpful?
Or anything else I can do to get it to work?
EDIT:
I was just trying to start another instance of eclipse I have (adt-bundle-windows-x86-20130219), and got the same outcome.
EDIT:
I added Java & QTP to the title in order to help others who bumps into the same issue.
If the JRE is somehow the issue, try installing a JDK (not a JRE), in a non-default path (for instance, C:\Prog\Java\JDK1.7.0_xx), and make sure your eclipse.ini explicitly reference that JDK.
-vm
C:/Prog/Java/jdk1.7.0_21/jre/bin/server/jvm.dll
(you can use '/' even on Windows in an eclipse.ini file)
The problem was indeed with Java (Thanks Arne). Re-installing the jre didn't help, so I also tried to deleted the JAVA_OPTIONS and JAVA_TOOL_OPTIONS enviroment variables, which solved the problem.
Later, I found this discussion which seems related to my problem: http://h30499.www3.hp.com/t5/Unified-Functional-Testing/Environment-variables-JAVA-OPTIONS-and-JAVA-TOOL-OPTIONS-is/td-p/5855995.
I will look more deeply into it later, when I will start using HP's plugin, but I hope this thread can help others who run into trouble with eclipse after installing this plugin.

Lotus Domino Java Script Library Compile Error

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

Categories

Resources