File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes server error on weblogic Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "server error on weblogic" Watch "server error on weblogic" New topic
Author

server error on weblogic

chandana sapparapu
Ranch Hand

Joined: Sep 28, 2002
Posts: 63
Hi,
I have an issue with Weblogic. I get the log4j error when I didnt have the log4j.jar. So, I pasted log4j-1.2.8.jar in my web-inf\lib folder. I get the following error. I was trying to implements struts in weblogic, and I used the code in Struts tutorial by Stephan Wiesner.
Thanks,
Chandana
java.lang.NoClassDefFoundError
at jsp_servlet._jsp.__createbook._jspService(__createbook.java:157)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6350)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
Rick Hightower
Author
Ranch Hand

Joined: Feb 20, 2002
Posts: 350
YUCK.... the dreaded NoClassDefFound error.
This usually means you have some jar files on your system classpath or server classpath that do not belong.
Each EAR file gets its own classloader. Each WAR file get its own classloader. You must make sure that jar files for a web application do not show up anywhere else (especially for struts actions and JSP custom tags). Make sure that the log4j.jar file is not on the system class path or the weblogic server classpath. (Put it in the WEB-INF/lib directory of your web app and make sure it is nowhere else)
The NoClassDefFound error is at times worse the DLL hell, untill you straigten out your CLASSPATH.

I spent several days recently going from cube to cube helping developers get a pristine J2EE development environment.

If all else fails, try circling your cublicle seven times backwards while chanting, "I will keep my classpath clean; I will keep my development env. clean". (Some I have heard use virgin goats blood in a classpath cleansing ritual, but I am not superstitious so skip that step).
sorry i could not resist.


Rick Hightower is CTO of Mammatus which focuses on Cloud Computing, EC2, etc. Rick is invovled in Java CDI and Java EE as well. linkedin,twitter,blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: server error on weblogic