[tcljava-dev] TclBlend Core Dump
Brought to you by:
mdejong
|
From: Bruce C. <bru...@ya...> - 2004-08-25 21:06:31
|
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:
Use the package command in Java
Throw an exception
Files:
Filename: PTLCommands.java
import tcl.lang.*;
public class PTLCommands extends Extension {
public void init(Interp interp) {
interp.createCommand("sayhello", new SayhelloCmd());
}
}
Filename: SayhelloCmd.java
import tcl.lang.*;
import snmp.*;
class SayhelloCmd implements Command {
public void cmdProc(Interp interp, TclObject argv[]) {
try {
SNMPsample comInterface = new SNMPsample();
}
catch(Exception e) {
}
}
}
Filename: SNMPsample.java
package snmp;
import java.net.*;
public class SNMPsample {
public SNMPsample()
throws SocketException {
}
}
Filename: a.tcl
package require java
java::load -classpath . PTLCommands
Steps:
Get to the tclsh prompt
%source a.tcl
%exit
A core dump is produced. I suspect that the Tcl package command and the Java package command are conflicting. I am under the impression that the TclBlend environment allows for Java and tcl commands to co-exist.
---------------------------------
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now. |