Results 1 to 5 of 5
Thread: java.lang.UnsatisfiedLinkError
- 02-27-2009, 08:59 AM #1
Member
- Join Date
- Jan 2009
- Posts
- 8
- Rep Power
- 0
java.lang.UnsatisfiedLinkError
Hi,
I am using quicktime API for image extracting.actually i have two different context in tomcat for two diffferent Applications and both have this feature so i am keeping the corresponding jar in both context/web-inf/lib folder.the problem is that when i upload video from one application then that have no issue but when upload from the second one that gives java.lang.UnsatisfiedLinkError error the java.lang.NoClassDefFoundError.or if i upload firstly from second one then no issue then upload from the first one then got the same exception.
can anybody help me out.
thanks in advance.
- 03-01-2009, 05:43 PM #2
Sounds like a Java class is using JNI to call a native code library. When you try to access the native code from two contexts in the same JVM, you end up with an error the second time.
Try moving the JAR file to common/lib *and* remove it from the application directories.Last edited by Steve11235; 03-01-2009 at 05:44 PM. Reason: and ......
- 03-01-2009, 07:49 PM #3
Member
- Join Date
- Jan 2009
- Posts
- 8
- Rep Power
- 0
Thanks but still had some doubts
Thanks and got your point but still some doubts like that kind of problem facing in very rare case if i got this exception every time then problem has resolved by what u have suggested.what should i do in this situation please help me out.
- 03-02-2009, 02:35 AM #4
I'm not sure what you are saying. Try using very short sentences.
First of all, did my solution stop the problem?
What I'm hearing is that you want to know the root cause of the problem and why what I suggested might fix it.
I'm just guessing at the solution, based on what I believe the problem might be.
Web application servers are very complex. They load the same class multiple times if the class is placed in multiple applications' WEB-INF directory. I'm guessing that the interface between Java and the operating system will not allow the same native code to be accessed twice in the same JVM. The first application "locks" the native code. The second application attempts to do the same thing, but it can't, so you get an error.
Putting the class in the common directory causes all *applications* to share the class. (Note that the core server component has its own code base.) However, the Web server is smart enough to load the class again it finds it in an application's WEB-INF directory. WEB-INF overrides common.
Therefore, take the class (or its JAR) out of the every WEB-INF directory and put it in the common directory.
Native code tends to be touchy, and it can crash the application instead of just causing an exception.
If what I suggested doesn't work, you might want to try the following, somewhat complicated, solution.
Create a separate server application that *only* runs the native code classes. Access this application from your Web server applications using sockets running over localhost.
- 03-03-2009, 05:36 PM #5
Member
- Join Date
- Jan 2009
- Posts
- 8
- Rep Power
- 0
Similar Threads
-
java.lang.OutOfMemoryError: Java heap space
By paul in forum Advanced JavaReplies: 11Last Post: 06-12-2010, 05:30 PM -
java.lang.UnsatisfiedLinkError: no parport in java.library.path
By Heather in forum NetBeansReplies: 3Last Post: 09-07-2009, 01:28 PM -
Error: cannot resolve symbol' on Person (java.lang.String, java.lang.String)
By baltimore in forum New To JavaReplies: 2Last Post: 09-18-2008, 07:30 AM -
UnsatisfiedLinkError: lob_createTemporary
By Nauman in forum JDBCReplies: 0Last Post: 08-12-2007, 03:23 PM -
java.lang.UnsatisfiedLinkError: JAWT_GetAWT()
By Albert in forum AWT / SwingReplies: 2Last Post: 07-01-2007, 04:58 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks