[jboss-user] [Tomcat, HTTPD, Servlets & JSP] - Re: Error in a web application on JBoss: javax.servlet.Servl
do-not-reply at jboss.com
Thu Jul 16 13:49:35 EDT 2009
Have you compared the set of classes imported into the servlet with the set of classes in the classes directory? Do they match? Are any missing?
Do those classes in turn access other classes and are those classes also accounted for?
I can think of a few things you can try.
1) Start with a simple servlet that imports nothing. Make sure it works. Then start adding imports and code for those classes until it breaks. It is usually best to do a binary search - add in half the classes and if it still works add in half of the remaining classes, and so on. If it doesn't work then then remove half of the classes that were added and try again. Eventually you will narrow it down to the class that has the problem. If that classe is in the WEB-INF/classes directory, then you will have to see what classes it in turn imports and repeat this process with that class.
2) Add the "-verbose:class" option to JAVA_OPTS in the runs script. This option causes the JVM to print each class loaded and list where it came from. This might help you identify the missing class.
3) Download JBoss Tattletale. It is a handy utility that finds dependencies for classes and JAR files. It should help you locate the missing class.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4244144#4244144
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4244144
More information about the jboss-user