On Wed, 25 Aug 2004 14:06:25 -0700 (PDT)
Bruce Chidester <bru...@ya...> wrote:
>
> Thank you for your response and willingness to help.
>
> I have this problem in a very small box.
>
> Behavior:
>
> When making a Tcl "package" and a command extension using an outside SNMP implementation, the command causes a core dump. The same implementation in JACL works fine. I reduced the problem to a few dependencies in the Java made package. They are:
Here is the crash I got when I tried your example:
Exception in thread "main" java.lang.NoClassDefFoundError: snmp/SNMPsample
JavaCmdProc : unexpected pending exception
SIGABRT 6 (*) abort process
stackpointer=0xbfffe48c
Full thread dump Classic VM (J2RE 1.3.0 IBM build cxdev-20000502, native threads):
"Finalizer" (TID:0x40408708, sys_thread_t:0x829a9d0, state:CW, native ID:0x1005) prio=8
The problem in this example is that the class should be defined in a dir named snmp
not in the same dir. I assume you built with "javac *.java" and it put the class files
in the current dir.
You can work around the crash like so:
% javac -d tmp PTLCommands.java SayhelloCmd.java SNMPsample.java
% find tmp
tmp
tmp/PTLCommands.class
tmp/SayhelloCmd.class
tmp/snmp
tmp/snmp/SNMPsample.class
Then change the a.tcl file to:
java::load -classpath tmp PTLCommands
That should avoid the crash, getting the code to not crash in the first place
is another issue, one that I will have to look into more.
cheers
Mo
|