|
From: Giovanni R. <g.r...@so...> - 2003-10-31 10:07:43
|
dear experts,
I would like to get a thread dump of my app via telnet.
This is the code:
package it.soltec.test;
import java.io.IOException;
import java.util.Date;
import java.util.Timer;
import java.util.TimerTask;
import org.tanukisoftware.wrapper.WrapperActionServer;
public class TestWrapper {
private Timer timer =3D new Timer();
private MyTimer myTimer =3D new MyTimer();
private String library =3D "java.library.path";
private String wrapperDllPath =3D =
"D:\\j2sdk1.4.2\\tools\\wrapper_win32_3.0.5\\lib";
public TestWrapper() {
int port =3D9999;
WrapperActionServer server =3D new WrapperActionServer( port );=20
server.enableShutdownAction( true );
server.enableHaltExpectedAction( true );
server.enableRestartAction( true );
server.enableThreadDumpAction( true );
server.enableHaltUnexpectedAction( true );
server.enableAccessViolationAction( true );
String property =3D =
System.getProperty(library)+";"+wrapperDllPath;
System.setProperty(library,property);
System.out.println(System.getProperty(library));
try {
server.start();
System.out.println("Server running on port "+port);
} catch (IOException e) {
e.printStackTrace();
}
timer.schedule(myTimer, 0, 5000);
}
private class MyTimer extends TimerTask {
public void run() {
System.out.println("time: "+new Date());
}
}
public static void main(String[] args) {
new TestWrapper();
}
}
When I try to connect via telnet I get the following error:
D:\j2sdk1.4.2\bin;.;C:\WINNT\system32;C:\WINNT;C:\WINNT\system32;C:\WINNT=
;C:\WINNT\System32\Wbem;C:\Programmi\Microsoft SQL =
Server\80\Tools\Binn\;C:\PROGRA~1\ULTRAE~1;D:\Programmi\Sun =
Microsystems\Message Queue =
3.0\bin;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Programmi\Mi=
crosoft SQL Server\80\Tools\Binn\;C:\PROGRA~1\ULTRAE~1;D:\Programmi\Sun =
Microsystems\Message Queue =
3.0\bin;D:\jakarta-ant-1.5\bin;D:\j2sdk1.4.2\bin;D:\TowerJ\bin\x86-w32;D:=
\Programmi\Microsoft Visual Studio =
.NET\Vc7\bin;;D:\j2sdk1.4.2\tools\wrapper_win32_3.0.5\lib
Server running on port 9999
time: Fri Oct 31 10:39:05 CET 2003
time: Fri Oct 31 10:39:10 CET 2003
time: Fri Oct 31 10:39:15 CET 2003
time: Fri Oct 31 10:39:20 CET 2003
WARNING - Unable to load native library 'Wrapper.DLL'. The file
is located on the path at the following location but could
not be loaded:
D:\j2sdk1.4.2\tools\wrapper_win32_3.0.5\lib\Wrapper.DLL
Please verify that the file is readable by the current user
and that the file has not been corrupted in any way.
System signals will not be handled correctly.
wrapper library not loaded.
Do you know how to solve this problem?
thanks in advance
Giovanni Regola |