Hi I have a big problem. I got t expain to u in detail.I have installed tomcat 5.0.19 in windows xp. I have set the classpath as follows: C:\Documents and Settings\madhan\My Documents\servlets C:\Tomcat\jakarta-tomcat-5.0.19\common\lib\servlet-api.jar C:\Tomcat\jakarta-tomcat-5.0.19\common\lib\jsp-api.jar catalina_home=c:\tomcat\jakarta-tomcat path = c:\j2sdk1.4.2_04\bin;c:\tomcat\jakarta-tomcat\bin;%path% Java_home=c:\j2sdk1.4.2_04 Iam able to run a simple servlet in "http://localhost:8080/servlet/Hello" I have used "bridge2java" software to convert a Visual Basic dll(trimSDK.dll) to a java dll (bridge2java.dll)which contains the converted java classes(COM objects). Now i have these java classes(COM objects) in c:\IBM\bridge2java I can run a code using some classes from it in c:\IBM\bridge2java and it works fine. c:\IBM\bridge2java\javac trim.java c:\IBM\bridge2java\java trim But when i include it in servlet it doesnt run and i get an error like this: Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Cannot allocate servlet instance for path /servlet/trim org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:435) org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180) javax.servlet.http.HttpServlet.service(HttpServlet.java:743) javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
Madhan, I think the problem is related to Tomcat not finding the class files that are in the trimIBM.*; package. Hence the error: java.lang.NoClassDefFoundError: trimIBM/IDatabase I assume IDatabase is one of the "converted" COM classes and is in your c:\IBM\bridge2java\trimIBM
When Tomcat starts it looks first starts up it loads the classes (and jars) in your A. $JRE_install/lib (this may be implied) B. $Catalina_home/common/lib C. $Catalina_home/shared/lib D. /WEB-INF/classes and /WEB-INF/lib I would have also suggested to place them in the classpath but a bartender mentioned that Tomcat does not use the system classpath, so it would not help this situation. I guess that is only for when compiling. So to get to the possible solution: What you probably will have to do is copy all of the files in trimIBM and save them in your /WEB-INF/classes/trimIBM or JAR them and place them in the /WEB-INF/lib of your webapp.