ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> tcljava-user
tcljava-user
[tcljava-user] tclblend execution problem on linux
by Will Zapar other posts by this author
Jan 25 2006 11:08AM messages near this date
RE: [tcljava-user] java debugger | Re: [tcljava-user] tclblend execution problem on linux
Mo,

I am having problems getting tclblend working on linux.  I have installed
tclblend and everything looks ok, but when I attempt to run my tcl script I
get the following error:

-bash-2.05b$ cdv.tcl
"XpUtils::iload -d /opt/tclBlend1.3.2 tclblend" failed:
 java.lang.UnsatisfiedLinkError: no tclblend in java.library.path
While instantiating Interp object in Tclblend_Init
The Tcl Blend shared lib was loaded by Tcl,
but the JVM could not access JNI symbols.
    while executing
"error "\"XpUtils::iload -d $dir tclblend\" failed:\n $errMsg""
    (procedure "loadtclblend" line 168)
    invoked from within
"loadtclblend /opt/tclBlend1.3.2"
    ("package ifneeded" script)
    invoked from within
"package require java"
    (file "./cdv.tcl" line 6)

I check my env and it looks fine.  From jtclsh I did the following:

-bash-2.05b$ jtclsh
% env
HOSTNAME=automation01
JAVA_LIB_RUNTIME_PATH=/usr/java/jdk1.5.0_06/jre/lib/i386:/usr/java/jdk1.5.0_06/jre/lib/i386/
client:/usr/java/jdk1.5.0_06/jre/lib/i386/native_threads:/usr/local/lib/tcljava1.3.2

TERM=vt100
SHELL=/bin/bash
LD_BIND_NOW=
HISTSIZE=1000
LD_PRELOAD=
USER=tester2
LS_COLORS=no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=01;05;3
7;41:mi=01;05;37;41:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.btm=01;32:*.bat=01;32:*.s
h=01;32:*.csh=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:
*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tz=01;31:*.rpm=01;31:*.cpio=01;31:*.
jpg=01;35:*.gif=01;35:*.bmp=01;35:*.xbm=01;35:*.xpm=01;35:*.png=01;35:*.tif=01;35:

LD_LIBRARY_PATH=/usr/java/jdk1.5.0_06/jre/lib/i386:/usr/java/jdk1.5.0_06/jre/lib/i386/client
:/usr/java/jdk1.5.0_06/jre/lib/i386/native_threads:/usr/local/lib/tcljava1.3.2:/opt/tclBlend
1.3.2/unix:/usr/java/jdk1.5.0_06/jre/lib/i386/native_threads

KAFFELIBRARYPATH=/usr/java/jdk1.5.0_06/jre/lib/i386:/usr/java/jdk1.5.0_06/jre/lib/i386/clien
t:/usr/java/jdk1.5.0_06/jre/lib/i386/native_threads:/usr/local/lib/tcljava1.3.2:/usr/java/jd
k1.5.0_06/jre/lib/i386:/usr/java/jdk1.5.0_06/jre/lib/i386/client:/usr/java/jdk1.5.0_06/jre/l
ib/i386/native_threads:/usr/local/lib/tcljava1.3.2:/opt/tclBlend1.3.2/unix:/usr/java/jdk1.5.
0_06/jre/lib/i386/native_threads

PATH=/usr/kerberos/bin::::/usr/java/jdk1.5.0_06/bin://home/tester2:/usr/local/bin:/usr/sbin:
/sbin:/usr/bin:/bin:/usr/X11R6/bin
MAIL=/var/spool/mail/tester2
LOGIN=tester2
PWD=/home/tester2/run
INPUTRC=/etc/inputrc
TCLLIBPATH=/usr/local/lib
LANG=en_US.UTF-8
KRB5CCNAME=FILE:/tmp/krb5cc_p566
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
HOME=/home/tester2
SHLVL=1
LOGNAME=tester2
CLASSPATH=/usr/java/jdk1.5.0_06/jre/lib/rt.jar
LESSOPEN=|/usr/bin/lesspipe.sh %s
G_BROKEN_FILENAMES=1

Your help would greatly be appreciated.

P.S.

I have expect code in my tcl script.  Here is what I am working on:

#!/usr/bin/expect --

source /home/server/module/startup.tcl

lappend auto_path /opt/tclBlend1.3.2 /usr/local/lib/xputils
/usr/local/lib/tcljava1.3.2
package require java

########## start here ###########
set procname cdv.tcl;
set dbg 1;
printFilesOpen {cdv}
equipFileRead equipment.txt; # read in the data file
arrArrayDump eqArr $dbg;

if {1} {####### login to all devices #######
        ##### go through all alphabetically
        foreach key [lsort -dictionary [array names eqArr {*ip*}]] { # only
need one so use "ip" which needs to exist for all device
s

                regsub {\{ip\}} $key "" name; # strip off "{ip}"

                ### Do the stuff here
                if {$dbg} {print "Debug - $procname Debug - dut = $name"};

                ### open session to device
                set spawn_id [equipSessionOpen $name];

                ### close session
                close $spawn_id;
        }
}

if {1} { ####### SNMP

        set ver 1;
        set retries 1
        set timeout 2;
        set optSet "-c \$comm -m all -v $ver -O vQ -r $retries -t $timeout";

        set optGet "-c \$comm -m all -v $ver -O vQ -r $retries -t $timeout";

        ##### go through all alphabetically
        foreach key [lsort -dictionary [array names eqArr {*ip*}]] { # only
need one so use "ip" which needs to exist for all device
s

                regsub {\{ip\}} $key "" name; # strip off "{ip}";
                set ip $eqArr($name{ip});
                set roComm $eqArr($name{snmpRO})
                set rwComm $eqArr($name{snmpRW})
                if {$dbg} {print "Debug - $procname Debug - dut = $name => 
ip = $ip, roComm = $roComm, rwComm = $rwComm"};

                ### try to read the sysDescr using local RO string
                set act [snmpGet $ip " sysDescr.0" $roComm $optGet 1];
                set strng "get sysDescr from local using local RO"
                set exp "VENDOR";
                chkRegexp $strng $act $exp

                ### try to read the sysDescr using local RW string
                set act [snmpGet $ip "sysDescr.0" $rwComm $optGet 1];
                set strng "get sysDescr from local using local RW"
                set exp "VENDOR";
                chkRegexp $strng $act $exp

                ### try to write the sysContact using local RW string
                set act [snmpSet $ip sysContact.0 s "Local-RW" $rwComm
$optSet 1];
                set strng "set sysContact from local using local RW"
                set exp "OK";
                chkString $strng $act $exp
        }
}

##### End of File #####

Regards,

Will
Attachments:
unknown1
unknown2

Thread:
Will Zapar
Mo DeJong

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved