tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Li <ampyx...@gmail.com>
Subject Re: Cannot create object of class
Date Tue, 09 Jan 2007 15:27:20 GMT
Hi, it seems that catalina was trying to find your MyClass in her manager's
classpath "java.lang.NoClassDefFoundError:
org/apache/catalina/manager/MyClass$1".

Make sure your class path is correct. A faster way to test if to write a
simple jsp and run your thread inside
<% ... %>. You can need configure your system to give tomcat permission to
run process or executable files...



On 1/9/07, Stephan Schöffel <stephan.schoeffel@gmx.net> wrote:
>
> hi,
>
> have a problem with creating a class in the doPost method of a servlet:
>
> MyClass mc= new MyClass();
>
> if i do so i get the following error message:
>
>
>   HTTP Status 500 -
>
> ------------------------------------------------------------------------
>
> *type* Exception report
>
> *message*
>
> *description* _The server encountered an internal error () that
> prevented it from fulfilling this request._
>
> *exception*
>
> javax.servlet.ServletException: Servlet execution threw an exception
>
> *root cause*
>
> java.lang.NoClassDefFoundError: org/apache/catalina/manager/MyClass$1
>         org.apache.catalina.manager.AgroManagerServlet.doPost(
> AgroManagerServlet.java:112)
>         javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
>         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>
> *note* _The full stack trace of the root cause is available in the
> Apache Tomcat/5.5.20 logs._
>
> ------------------------------------------------------------------------
>
>
>       Apache Tomcat/5.5.20
>
>
>
>
> i belive it has something to to with the timer i use in the class:
>
> public class MyClass implements Runnable{
>     public void run(){
>         final Timer timer = new Timer();
>         timer.schedule(new TimerTask(){
>             public void run(){
>
>                 timer.cancel();
>             }
>         }, 60*1000);
>     }
>     public void startUpdate(){
>         try{
>             System.out.println("do something");
>             Process p =
> Runtime.getRuntime().exec(TomcatPath.getAbsInstPath
> ()+"update/check_for_updates.exe");
>         }catch(Exception e){
>
>         }
>     }
> }
>
>
> dont know what do to since i need the timer task and i need it in a
> separate thread...
>
> --stephan
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
When we invent time, we invent death.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message