Hi,
Am facing a strange Problem when working with the
servlets, Please help me. ( When trying to execute the example from "CORE SERVLETS AND
JAVA SERVER PAGES, Chapter 7)
I am having a servlet, "ShadowedText.java", which will invoke a method from "MessageImage.java". These two files are in the same directory.
"MessageImage.java", is importing a class "Acme.JPM.Enoceds.GifEncoder". I have imported the whole pacakge of "Acme" from the net and copied to my system.
From one of the methods of "MessageImage.java", i am calling a method of the class "GifEncoder.java"
When compiling the source files, every thing is going fine and all the class files are available.
But when loading the servlet through IE, am getting the below error -- At "MessageImage.java" when calling the method from the class "GifEncoder.java".
Error:
=============================================
Sun Sep 07 11:26:22 GMT 2003:<E> <ServletContext-General> Servlet failed with Exception
java.lang.NoClassDefFoundError: Acme/JPM/Encoders/GifEncoder
at coreservlets.MessageImage.sendAsGIF(MessageImage.java:69)
at coreservlets.ShadowedText.doGet(ShadowedText.java:49)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:120)
at weblogic.servlet.ServletServlet.service(ServletServlet.java:46)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:120)
at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:941)
at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:905)
at weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:
at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:391)
at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:273)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129)
========================================================
My doubt is, Why am i getting the error, when loading the servlet but not when compiling the source files.
Link to the source files ("ShadowedText.java", "MessageImage.java")
http://archive.coreservlets.com/Chapter7.html Link to -- "Acme.JPM.Enoceds.GifEncoder"
http://www.acme.com/java/software/Acme.JPM.Encoders.GifEncoder.html By the way, I am using Bee Weblogic Server Version 5.1.0.
[ September 07, 2003: Message edited by: narasimha rao bandlamudi ]