You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Don Lawton <dg...@verizon.net> on 2012/06/26 00:57:37 UTC
SEVERE: Servlet threw load() exception
java.lang.ClassNotFoundException:
Greetings...
I’m developing a servlet to use as the controller in a MVC web app. Each time I start/restart the server, I get a “SEVERE: Servlet threw load() exception java.lang.ClassNotFoundException:” error with a stack dump. The missing class that is identified is the controller servlet. I put some console print statements in the constructor and they indicate no problem. The jsp’s that post to the servlet and those that are dispatched from the servlet also work as expected. The hits I get from a web search usually point to a specific framework jar that is missing (i.e. Struts, Spring, etc.) that I can’t adapt to this issue. Here’s the dump:
Jun 25, 2012 3:56:32 PM org.apache.catalina.core.StandardContext loadOnStartup
SEVERE: Servlet threw load() exception
java.lang.ClassNotFoundException: org.dgl.HomeFinances.Utilities.Controller.hfController
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1711)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:525)
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:507)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:124)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1136)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1080)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5015)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5302)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1566)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1556)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Windows 7 Ultimate x64
Eclipse Version: Indigo Service Release 2 Build id: 20120216-1857
jdk 1.7.0_01
Tomcat 7.0
Thanks!
Don Lawton
Re: SEVERE: Servlet threw load() exception
java.lang.ClassNotFoundException:
Posted by Don Lawton <dg...@verizon.net>.
Hi Martin. Yes indeed, 'public class hfController extends HttpServlet {'.
As I mentioned to Brooke, I'll go see if I can get an explanation from the
Eclipse folks about compiling servlets and placing them in the appropriate
server folders. Thanks.
Don
-----Original Message-----
From: Martin Gainty
Sent: Tuesday, June 26, 2012 8:23 AM
To: Tomcat Users List
Subject: RE: SEVERE: Servlet threw load() exception
java.lang.ClassNotFoundException:
as brooke mentioned your hfController java class has to be in either
YourWebApp\WEB-INF\classes or packaged in some manner of jar located
inYourWebApp\WEB-INF\lib so your web.xml can find the servlet-class<servlet>
<servlet-class>org.dgl.HomeFinances.Utilities.Controller.hfController</servlet-class>
does hfController class extend javax.servlet.http.HttpServlet?
Martin
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
dient lediglich dem Austausch von Informationen und entfaltet keine
rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le
destinataire prévu, nous te demandons avec bonté que pour satisfaire
informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie
de ceci est interdite. Ce message sert à l'information seulement et n'aura
pas n'importe quel effet légalement obligatoire. Étant donné que les email
peuvent facilement être sujets à la manipulation, nous ne pouvons accepter
aucune responsabilité pour le contenu fourni.
> From: dglawton@verizon.net
> To: users@tomcat.apache.org
> Subject: Re: SEVERE: Servlet threw load() exception
> java.lang.ClassNotFoundException:
> Date: Tue, 26 Jun 2012 07:11:11 -0400
>
> Good morning and thank you for you quick response. This problem occurs
> while testing within Eclipse - the app is not deployed. The class is
> listed
> in the project tree in the 'Java Resources/src' folder. There is nothing
> in
> the 'Web Content/WEB-INF/lib' folder and there is no 'Web
> Content/WEB-INF/classes' folder . Any ideas? Thanks.
>
> Don Lawton
>
> -----Original Message-----
> From: Brooke Hedrick
> Sent: Monday, June 25, 2012 7:27 PM
> To: Tomcat Users List
> Subject: Re: SEVERE: Servlet threw load() exception
> java.lang.ClassNotFoundException:
>
>
>
>
> -Brooke
>
> On Jun 25, 2012, at 5:57 PM, "Don Lawton" <dg...@verizon.net> wrote:
>
> > I’m developing a servlet to use as the controller in a MVC web app.
> > Each
> > time I start/restart the server, I get a “SEVERE: Servlet threw load()
> > exception java.lang.ClassNotFoundException:” error with a stack dump.
> > The
> > missing class that is identified is the controller servlet. I put some
> > console print statements in the constructor and they indicate no
> > problem.
> > The jsp’s that post to the servlet and those that are dispatched from
> > the
> > servlet also work as expected. The hits I get from a web search usually
> > point to a specific framework jar that is missing (i.e. Struts, Spring,
> > etc.) that I can’t adapt to this issue. Here’s the dump:
> >
>
> Is the class, org.dgl.HomeFinances.Utilities.Controller.hfController,
> included in your app's web-inf/classes or in a jar under web-inf/lib?
>
> Sometimes these callstacks can be pretty long and what you are missing is
> further down in the stacktrace.
>
> > Jun 25, 2012 3:56:32 PM org.apache.catalina.core.StandardContext
> > loadOnStartup
> > SEVERE: Servlet threw load() exception
> > java.lang.ClassNotFoundException:
> > org.dgl.HomeFinances.Utilities.Controller.hfController
> > at
> > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1711)
> > at
> > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556)
> > at
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: SEVERE: Servlet threw load() exception
java.lang.ClassNotFoundException:
Posted by Martin Gainty <mg...@hotmail.com>.
as brooke mentioned your hfController java class has to be in either YourWebApp\WEB-INF\classes or packaged in some manner of jar located inYourWebApp\WEB-INF\lib so your web.xml can find the servlet-class<servlet>
<servlet-class>org.dgl.HomeFinances.Utilities.Controller.hfController</servlet-class>
does hfController class extend javax.servlet.http.HttpServlet?
Martin
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.
> From: dglawton@verizon.net
> To: users@tomcat.apache.org
> Subject: Re: SEVERE: Servlet threw load() exception java.lang.ClassNotFoundException:
> Date: Tue, 26 Jun 2012 07:11:11 -0400
>
> Good morning and thank you for you quick response. This problem occurs
> while testing within Eclipse - the app is not deployed. The class is listed
> in the project tree in the 'Java Resources/src' folder. There is nothing in
> the 'Web Content/WEB-INF/lib' folder and there is no 'Web
> Content/WEB-INF/classes' folder . Any ideas? Thanks.
>
> Don Lawton
>
> -----Original Message-----
> From: Brooke Hedrick
> Sent: Monday, June 25, 2012 7:27 PM
> To: Tomcat Users List
> Subject: Re: SEVERE: Servlet threw load() exception
> java.lang.ClassNotFoundException:
>
>
>
>
> -Brooke
>
> On Jun 25, 2012, at 5:57 PM, "Don Lawton" <dg...@verizon.net> wrote:
>
> > I’m developing a servlet to use as the controller in a MVC web app. Each
> > time I start/restart the server, I get a “SEVERE: Servlet threw load()
> > exception java.lang.ClassNotFoundException:” error with a stack dump. The
> > missing class that is identified is the controller servlet. I put some
> > console print statements in the constructor and they indicate no problem.
> > The jsp’s that post to the servlet and those that are dispatched from the
> > servlet also work as expected. The hits I get from a web search usually
> > point to a specific framework jar that is missing (i.e. Struts, Spring,
> > etc.) that I can’t adapt to this issue. Here’s the dump:
> >
>
> Is the class, org.dgl.HomeFinances.Utilities.Controller.hfController,
> included in your app's web-inf/classes or in a jar under web-inf/lib?
>
> Sometimes these callstacks can be pretty long and what you are missing is
> further down in the stacktrace.
>
> > Jun 25, 2012 3:56:32 PM org.apache.catalina.core.StandardContext
> > loadOnStartup
> > SEVERE: Servlet threw load() exception
> > java.lang.ClassNotFoundException:
> > org.dgl.HomeFinances.Utilities.Controller.hfController
> > at
> > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1711)
> > at
> > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556)
> > at
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
Re: SEVERE: Servlet threw load() exception
java.lang.ClassNotFoundException:
Posted by Don Lawton <dg...@verizon.net>.
Good morning and thank you for you quick response. This problem occurs
while testing within Eclipse - the app is not deployed. The class is listed
in the project tree in the 'Java Resources/src' folder. There is nothing in
the 'Web Content/WEB-INF/lib' folder and there is no 'Web
Content/WEB-INF/classes' folder . Any ideas? Thanks.
Don Lawton
-----Original Message-----
From: Brooke Hedrick
Sent: Monday, June 25, 2012 7:27 PM
To: Tomcat Users List
Subject: Re: SEVERE: Servlet threw load() exception
java.lang.ClassNotFoundException:
-Brooke
On Jun 25, 2012, at 5:57 PM, "Don Lawton" <dg...@verizon.net> wrote:
> I’m developing a servlet to use as the controller in a MVC web app. Each
> time I start/restart the server, I get a “SEVERE: Servlet threw load()
> exception java.lang.ClassNotFoundException:” error with a stack dump. The
> missing class that is identified is the controller servlet. I put some
> console print statements in the constructor and they indicate no problem.
> The jsp’s that post to the servlet and those that are dispatched from the
> servlet also work as expected. The hits I get from a web search usually
> point to a specific framework jar that is missing (i.e. Struts, Spring,
> etc.) that I can’t adapt to this issue. Here’s the dump:
>
Is the class, org.dgl.HomeFinances.Utilities.Controller.hfController,
included in your app's web-inf/classes or in a jar under web-inf/lib?
Sometimes these callstacks can be pretty long and what you are missing is
further down in the stacktrace.
> Jun 25, 2012 3:56:32 PM org.apache.catalina.core.StandardContext
> loadOnStartup
> SEVERE: Servlet threw load() exception
> java.lang.ClassNotFoundException:
> org.dgl.HomeFinances.Utilities.Controller.hfController
> at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1711)
> at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556)
> at
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: SEVERE: Servlet threw load() exception java.lang.ClassNotFoundException:
Posted by Brooke Hedrick <br...@gmail.com>.
-Brooke
On Jun 25, 2012, at 5:57 PM, "Don Lawton" <dg...@verizon.net> wrote:
> I’m developing a servlet to use as the controller in a MVC web app. Each time I start/restart the server, I get a “SEVERE: Servlet threw load() exception java.lang.ClassNotFoundException:” error with a stack dump. The missing class that is identified is the controller servlet. I put some console print statements in the constructor and they indicate no problem. The jsp’s that post to the servlet and those that are dispatched from the servlet also work as expected. The hits I get from a web search usually point to a specific framework jar that is missing (i.e. Struts, Spring, etc.) that I can’t adapt to this issue. Here’s the dump:
>
Is the class, org.dgl.HomeFinances.Utilities.Controller.hfController, included in your app's web-inf/classes or in a jar under web-inf/lib?
Sometimes these callstacks can be pretty long and what you are missing is further down in the stacktrace.
> Jun 25, 2012 3:56:32 PM org.apache.catalina.core.StandardContext loadOnStartup
> SEVERE: Servlet threw load() exception
> java.lang.ClassNotFoundException: org.dgl.HomeFinances.Utilities.Controller.hfController
> at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1711)
> at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556)
> at
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org