Tomcat & Java servlet java.lang.UnsatisfiedLinkError- Please help!

Hi,

I am trying to use some java classes which I have created in a servlet, however these classes in turn use an external API which seems to work fine as desktop java but on my server they don't.

I get the following exceptions when trying to run my servlet:

(The first time I run it after restarting Tomcat:)

java.lang.NullPointerException

at com.jae.jaeQuestion.QuestionServlet.doGet(QuestionServlet.java:65)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)

at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)

at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)

at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)

at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)

at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)

at java.lang.Thread.run(Unknown Source)

(The second time I run it after getting the above error:)

java.lang.UnsatisfiedLinkError: The shared library C:\Program Files\ECLiPSe 5.10\lib\i386_nt\ec_java_load.dll could not be found.

com.parctechnologies.eclipse.Platform_i386_nt.loadEclipseSharedLibrary(Platform_i386_nt.java:72)

com.parctechnologies.eclipse.EmbeddedEclipse.loadEclipse(EmbeddedEclipse.java:321)

com.parctechnologies.eclipse.EmbeddedEclipse.processOptions(EmbeddedEclipse.java:234)

com.parctechnologies.eclipse.EmbeddedEclipse.<init>(EmbeddedEclipse.java:164)

com.parctechnologies.eclipse.EmbeddedEclipse.getInstance(EmbeddedEclipse.java:124)

com.jae.Question.QuestionSet.<init>(QuestionSet.java:81)

com.jae.jaeQuestion.QuestionServlet.getOutput(QuestionServlet.java:75)

com.jae.jaeQuestion.QuestionServlet.doGet(QuestionServlet.java:51)

javax.servlet.http.HttpServlet.service(HttpServlet.java:689)

javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

The API that I am trying to get wokring is an interface between java and Eclipse Prolog, this is the API:

http://eclipse.crosscoreop.com/doc/javadoc/JavaEclipseInterface/index.html

Has anyone ever used this- there must be someone out there!

My Tomcat setup is fine as I am aware because I have other webapps running on it without a hitch. I am running this on Windows XP, would it be any better if I moved it to my linux server?

If anyone could shed some light on this problem I will be very grateful. (It's for a University project and I feel that I have tried everything, even my lecturers don't know what's wrong!)

Thanks in advance,

Lilalfyalien

[3587 byte] By [lil_alfy_aliena] at [2007-11-26 15:03:21]
# 1

first exception seem like you are using an variable that's null inside your servlet. Check line 65 of your QuestionServlet.java. Break down your statments to one variable per line and you can narrow it dow to which one has a null problem.

second exception is likely generated from when loading your JNI libraries twice. You need to read the $TOMCAT_HOME/RELEASE-NOTE.txt with the section titled: "JNI Based Applications:"

thebugslayera at 2007-7-8 8:52:51 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

But the files that I am trying to use are java files (a .jar file) in my classpath... and I get the error that it;s not a valid win32 application. I just want to use a java package which creates a process within the jvm that someone else has written... isn't that just done with import statements?

lil_alfy_aliena at 2007-7-8 8:52:51 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...