MyClass is in the manage lib.
if i delete this timer-stuff it works fine... but i need the timer
Li wrote:
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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]