websphere 程序报错 java.lang.UnsatisfiedLinkError: ocijdbc10 (device not foundd in java.library.path)

websphere 程序报错 java.lang.UnsatisfiedLinkError: ocijdbc10 (Not found in java.library.path)_百度知道
提问者采纳
缺少数据库驱动如果客户端是11g的,可以将oracle10g数据库安装目录..\oracle\product\10.2.0\db_1\BIN下的ocijdbc10.dll拷贝至oracle11g客户端安装目录..\product\11.2.0\client_1\BIN中,“no ocijdbc10 in java.library.path”的问题便可以解决了。
是找个10G的ocijdbc10.dll拷到11G里面么?
提问者评价
没解决掉~~哥们~~能帮我解决下么
来自团队:
其他类似问题
为您推荐:
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁java的oci方式连接数据库的问题_百度知道
OCI 只是一种连接方式,既然你使用 Java 来做客户端程序,为什么要使用 Native 方式的驱动?
你应该使用 java:oracle:thin:@ 的 thin 协议来连接数据库。
OCI 本身是为 C++, VB 这样的程序准备的。Java 版本的程序建议使用 thin 协议的驱动。
Java 驱动有4种类型,type 1 - type 4,现在已经基本上普及了type 4驱动,几乎所有的厂商都提供 type 4驱动,它是说服务器端和驱动程序之间是厂商内部网络通信格式,驱动程序和 java 程序之间是纯 java。而依赖厂商的 DLL 的驱动就是 type 2,它是要求在当前 path 变量路径或 java.library.path 参数的路径上能找到 oracle 驱动程序的 DLL。所以如果你坚持使用 oci 驱动,你需要把 oracle
BIN 目录 (可能还有其它目录,反正有Oracle 的 DLL 的目录你都得确...
应用服务器上安装客户端就可以了。JDBC OCI方式连接数据库比JDBC THIN方式操作数据库要快得多,更重要的是,可是使用Oracle服务器的客户端缓存。提示信息是can't find
dependent library,应该是ocijdbc10.dll依赖的dll缺少,用dependency.exe打开看看到底是哪些依赖dll,这是vs6.0里面自带的一个工具,独立的exe文件。
其他类似问题
12人觉得有用
为您推荐:
连接数据库的相关知识
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁Having the above error in your Android JNI app?
Read on...
Up front, I'll say that I've already solved this, in my own way, but I feel something in the Android build system (perhaps regarding Eclipse) is broke, and I hope to save someone else hours of pain.
Perhaps others have come across this issue and can comment on what worked for them.
For a while, I've had an Android project with some JNI code that I developed using the NDK.
Then, today, I changed something in the java code and then poof, I could no longer load my JNI library.
It failed with an exception like:
E/AndroidRuntime(
999): java.lang.UnsatisfiedLinkError: Couldn't load mylibrary: findLibrary returned null
I googled and tried everything (rebuilding, close and relaunch Eclipse, etc, etc)
What finally fixed my problem?
I physically uninstalled my app from the device before trying another run.
That's it.
After that, it worked.
What worked for you?
17.2k43580
I've got this issue too, but for my situation, i'm using my libs in another project. And I don't think it's a matter of eclipse or android-ndk.
you may check these tips that can lead to UnsatisfiedLinkError and it works fine for me, good luck :)
must following the JNI interface's nameing rule(you said that you did load the library successfully before, so you can ignore this) and the libraries must in directory /your project/libs/armeabi/
if you ensure the above things are done, then you must ensure that your generated libs are installed into your app.apk, otherwise it will still cannot find the lib and thorw you an error. to do this, you right click on your eclipse project name, and go into Build Path - Configure Build Path, on the left menu, choose Java Build Path, then click on the Order and Export tab on the right panel, checking the checkbox before your library name and click OK, then clean,rebuild and run you project, and your libs will be installed into app.apk, things are done.
in a word, UnsatisfiedLinkError are thrown if the library is not installed into your app.apk, so it cannot be linked sucessfully.
If you are trying to run your app in a simulator, then make sure that you have specified the correct architecture in Run -> Run Configurations -> Target (you may need to add the required simulator using Window -> Android Virtual Device Manager).
I had the same problem when trying to execute an app in an Intel simulator, while the app was using a library precompiled for the ARM.
If you have a native project with LOCAL_MODULE "libXYZ", make sure to load it as
System.loadLibrary("XYZ");
I was not aware of this and lost couple hours. Hope this helps someone.
Inside libs folder, I create a new folder called armeabi-v7a, and copied the .so file from armeabi to the new folder. It solves the error.
In my case, while making a System Application the issue was related to permissions. After putting the ".so" files into /system/lib/ or /system/vendor/lib/ directory, I modified the default allocated permissions 600 to 644. It worked well.
just had a similar problem.
Check out your /data/data/your.package.name/lib directory
When i ls in my package directory it currently displays:
lib -& /mismatched_uid/settings_10037/fs_1000
probably i accidently switched the sharedUserId and thus the library can't be accessed anymore.
I was having the same issue and these are some of the problems I had with my project:
Changing from System.load("hello-test"); into System.loadLibrary("hello-test");;
Changing the C function signature to JNIEXPORT jstring Java_com_example_testndk_TestNDK_funcNami(JNIEnv* env, jobject thiz): here you use Java_&java_package_name&_&java-class-name&_&function-name&;
Adding NDK path to local.properties, in my case ndk.dir=&my-path-to-ndk-directory&; and
Updating my build.gradle to also include within defaultConfig: ndk { moduleName "hello-test" }.
Package name: com.example.testndk
Java class name: TestNDK
C source name: hello-test.c
JNI directory location within the project structure: AndroidProjects/TestNDK/app/src/main/jni
IDE: Android Studio 0.8.1.
None of the previous answers solved my problem, but this did:
All along the problem was that a necessary subdirectory and file were not present.
All I had in my libs folder was an armeabi folder containing the proper .so file, but there are supposed to be 3 others, each with a .so file in them. Not certain yet which of the other three (armeabi-v7a, mips, or x86) was the required one, but I do know that all three were automatically generated when I added the Application.mk file to the same folder as the Android.mk file, and made sure it had the following line in it:
APP_ABI := all
For me, that line is the only text in there.
When ndk-build is then run the Application.mk file apparently causes "all" the 4 folders to be created and the proper .so files to be created in them. Once I got Application.mk in place, I ran ndk-build again, and then did a clean and a clear on my Eclipse project before trying again.
Everything ran perfectly.
No need to root the device..deploy app on emulator and browse the folder
If you have a native project with "libXYZ.so", make sure that /system/lib/libXYZ.so does not exist on your device. There is a painful workaround: use
System.load("/data/data/your.package.name/lib/libXY.so")
instead of System.loadLibrary().
18.5k32563
First, check you have the jni files inside you libs folder in eclipse or jniLibs folder in android studio. When you checkin in any svn, cross check to check in the .so files too.
My Scenario was when Building with Android studio.
When you are building in android studio, your library .so files or (jni) files should be inside the \src\main\jniLibs\armeabi***.so folder.
where as these files will be inside the \libs\armeabi***.so in eclipse.
When building using both eclipse and android studio, you have to modify your build.gradle file as
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
// Fixed Issue : "android studio java.lang.unsatisfiedlinkerror: couldn't load find library returned null"
// Cause : For android studio : The JNI files should be placed in the /src/main/jniLibs folder.
// Fix : Mapping the jniLibs 's source Directories with Lib's folder
jniLibs.srcDirs = ['libs']
Here I am building the project using both the android studio and the eclipse.
Had identical problem.
Just cleaned project and it worked. Mystery..
1,20311125
I just had this happen and the problem was that the device simply did not have enough space to install the library. I uninstalled some other apps and then it worked.
UnsatisfiedLinkerror is solved by this.Build your .so file again by "ndk_build"
Your Answer
Sign up or
Sign up using Google
Sign up using Facebook
Sign up using Stack Exchange
Post as a guest
Post as a guest
By posting your answer, you agree to the
Not the answer you're looking for?
Browse other questions tagged
Top questions and answers
Important announcements
Unanswered questions
By subscribing, you agree to the
Stack Overflow works best with JavaScript enabled}

我要回帖

更多关于 source not found 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信