Thread: Re: [tcljava-user] NoClassDefFound
Brought to you by:
mdejong
From: Robinson, D. <Dav...@Co...> - 2007-07-11 17:25:29
|
Hi, I'm using tclblend for the first time. I have successfully compiled some java classes that reference functions in an external MQSeries .jar file which is in a non-standard directory. However, when I try to call the class from jtclsh I get % package require java 1.4.0 % java::load -classpath /apps/fidessa/top/commerzbank/lib:/. TEExt % te connect Exception in thread "main" java.lang.NoClassDefFoundError: com/ibm/mq/MQException at TECmd.cmdProc(TECmd.java:16) at tcl.lang.Interp.callCommand(Interp.java:1266) JavaCmdProc : Interp.callCommand() raised an Exception Abort Which path env var or tcl setting do I need to change to get the references to get these objects visibility ? Regards David Robinson ********************************************************************** This is a commercial communication from Commerzbank AG. This communication is confidential and is intended only for the person to whom it is addressed. If you are not that person you are not permitted to make use of the information and you are requested to notify <mailto:LON...@co...> immediately that you have received it and then destroy the copy in your possession. Commerzbank AG may monitor outgoing and incoming e-mails. By replying to this e-mail you consent to such monitoring. This e-mail message and any attached files have been scanned for the presence of computer viruses. However, you are advised that you open attachments at your own risk. This email was sent either by Commerzbank AG, London Branch, or by Commerzbank Corporates & Markets, a division of Commerzbank. Commerzbank AG is a limited liability company incorporated in the Federal Republic of Germany. Registered Company Number in England BR001025. Our registered address in the UK is 60 Gracechurch Street, London, EC3V 0HR. We are regulated by the Financial Services Authority for the conduct of investment business in the UK and we appear on the FSA register under number 124920. ********************************************************************** |
From: Robinson, D. <Dav...@Co...> - 2007-07-12 14:03:59
|
Patrick, On Solaris 10 TCL_CLASSPATH doesn't seem to like more than one jar (or have I got the separator wrong ?) : append x /apps/fidessa/top/commerzbank/lib/com.ibm.mq.jar: append x /apps/fidessa/top/commerzbank/lib/com.ibm.mq_websphere.jar Result : cannot import class "com.ibm.mq.MQC", it does not exist while executing "java::import com.ibm.mq.MQC" (procedure "checkMQ" line 6) invoked from within "checkMQ $QManager $CCSID $channel $hostname $queueName $port $traceFile $msg" (file ".//MQEx.tcl" line 124) While append x /apps/fidessa/top/commerzbank/lib/com.ibm.mq.jar works OK. Also I get this : checkMQ java.lang.UnsatisfiedLinkError: no mqjbnd02 in java.library.path while executing "java::new MQQueueManager 1" (procedure "checkMQ" line 14) invoked from within "checkMQ $QManager $CCSID $channel $hostname $queueName $port $traceFile $msg" (file ".//MQEx.tcl" line 124) Do you know which jar file on Solaris has this mqjbnd02 class ? I have my LD_LIBRARY_PATH and PATH set to where the com.ibm.mq.jar file is. Thanks for your help. David -----Original Message----- From: tcl...@li... [mailto:tcl...@li...] On Behalf Of Patrick Finnegan Sent: 11 July 2007 18:55 To: A list for users of tcljava Subject: Re: [tcljava-user] NoClassDefFound On Wednesday 11 July 2007 18:25, Robinson, David wrote: > Hi, I'm using tclblend for the first time. I have successfully compiled > some java classes that reference functions in an external MQSeries .jar > file which is in a non-standard directory. However, when I try to call the > class from jtclsh I get > See the examples at the Tcl Cookbook. http://aspn.activestate.com/ASPN/Cookbook/Tcl?kwd=TclBlend Specifically: http://aspn.activestate.com/ASPN/Cookbook/Tcl/Recipe/442320 Building the classpath. # build tcl classpath append x $drive/IBM/WebSphereMQ/Java/lib/com.ibm.mq.jar\; append x $drive/IBM/WebSphereMQ/Tools/Java/base\; append x $drive/IBM/WebSphereMQ/Java/lib/com.ibm.mqjms.jar\; append x $drive/IBM/WebSphereMQ/Tools/Java/jms\; append x $drive/IBM/WebSphereMQ/Java/lib/com.ibm.mqbind.jar\; set env(TCL_CLASSPATH) $x ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ tcljava-user mailing list tcl...@li... https://lists.sourceforge.net/lists/listinfo/tcljava-user ********************************************************************** This is a commercial communication from Commerzbank AG. This communication is confidential and is intended only for the person to whom it is addressed. If you are not that person you are not permitted to make use of the information and you are requested to notify <mailto:LON...@co...> immediately that you have received it and then destroy the copy in your possession. Commerzbank AG may monitor outgoing and incoming e-mails. By replying to this e-mail you consent to such monitoring. This e-mail message and any attached files have been scanned for the presence of computer viruses. However, you are advised that you open attachments at your own risk. This email was sent either by Commerzbank AG, London Branch, or by Commerzbank Corporates & Markets, a division of Commerzbank. Commerzbank AG is a limited liability company incorporated in the Federal Republic of Germany. Registered Company Number in England BR001025. Our registered address in the UK is 60 Gracechurch Street, London, EC3V 0HR. We are regulated by the Financial Services Authority for the conduct of investment business in the UK and we appear on the FSA register under number 124920. ********************************************************************** |
From: Patrick F. <fin...@gm...> - 2007-07-12 14:42:00
|
On 12/07/07, Robinson, David <Dav...@co...> wrote: > > Patrick, > > On Solaris 10 TCL_CLASSPATH doesn't seem to like more than one jar (or > have > I got the separator wrong ?) : > > append x /apps/fidessa/top/commerzbank/lib/com.ibm.mq.jar: > append x /apps/fidessa/top/commerzbank/lib/com.ibm.mq_websphere.jar separator should be semi colon ";" append x $drive/IBM/WebSphereMQ/Java/lib/com.ibm.mq.jar\; append x $drive/IBM/WebSphereMQ/Tools/Java/base\; append x $drive/IBM/WebSphereMQ/Java/lib/com.ibm.mqjms.jar\; append x $drive/IBM/WebSphereMQ/Tools/Java/jms\; checkMQ > > java.lang.UnsatisfiedLinkError: no mqjbnd02 in java.library.path > while executing > "java::new MQQueueManager 1" > (procedure "checkMQ" line 14) > invoked from within > "checkMQ $QManager $CCSID $channel $hostname $queueName $port $traceFile > $msg" > (file ".//MQEx.tcl" line 124) On Windows............... "The *java.lang.UnsatisfiedLinkError* is encountered when the environment variable java.library.path is not set. Sounds like you need to set "-Djava.library.path=<path to mqjbnd02.dll" You can set the java options inside the tcl blend script using tclblend_init before calling "package require java". * manual page - http://tcljava.sourceforge.net/docs/TclJava/JavaPackage.html * e.g something like: *lappend optList "-Djava.naming.provider.url\=$NAMING_PROVIDER" lappend optList "-Djava.naming.factory.initial\=$NAMING_FACTORY" lappend optList $CLIENTSOAP lappend optList "-Dwas.install.root\=$WAS_HOME" lappend optList "-Dws.ext.dirs\=$WAS_EXT_DIRS" # set tracefile properties. lappend optList "-DtraceSettingsFile\=TraceSettings.properties" puts "\n java command line options list is:\n" foreach x $optList { puts [ format "%-5s %-50s" " " $x ] } set tclblend_init $optList # call java package package require java * Do you know which jar file on Solaris has this mqjbnd02 class ? > > I have my LD_LIBRARY_PATH and PATH set to where the com.ibm.mq.jar file > is. > > Thanks for your help. > > David For Solaris have a look at these links. Search for mqjbnd02.* http://www.mail-archive.com/mqs...@ak.../msg00242.html http://www.sjg-enterpriseintegration.com/websphere%20mq%20listserver%200105.asp * |
From: Mo D. <mo...@mo...> - 2007-07-13 23:08:27
|
Patrick Finnegan wrote: > > > On 12/07/07, *Robinson, David* <Dav...@co... > <mailto:Dav...@co...>> wrote: > > Patrick, > > On Solaris 10 TCL_CLASSPATH doesn't seem to like more than one jar > (or have > I got the separator wrong ?) : > > append x /apps/fidessa/top/commerzbank/lib/com.ibm.mq.jar: > append x /apps/fidessa/top/commerzbank/lib/com.ibm.mq_websphere.jar > > > > separator should be semi colon ";" > On Unix systems, one should use ':' and ';' should be used on Windows systems. It is very lame that Sun did not deal with this issue in the JDK, and left it to each application, but that is the way it is. cheers Mo DeJong |
From: Robinson, D. <Dav...@Co...> - 2007-07-12 16:17:13
|
Thanks for that but I'm still having problems : 1. If I try to put something else into java.library.path (ie lappend optList "-Djava.library.path\=/home/top_dev/tclblend" I then get : executing .//MQEx.tcl java command line options list is: -Djava.library.path=/home/top_dev/tclblend "XpUtils::iload -d /home/top_dev/tmp/opt/tclblend/lib/tcljava1.4.0 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 /home/top_dev/tmp/opt/tclblend/lib/tcljava1.4.0" ("package ifneeded" script) invoked from within "package require java" (file ".//MQEx.tcl" line 32) What is the default java.library.path ? 2. The ; separator does not work : append z /apps/fidessa/top/commerzbank/lib/com.ibm.mq.jar\; append z /apps/fidessa/top/commerzbank/lib/com.ibm.mq_websphere.jar set env(TCL_CLASSPATH) $z executing .//MQEx.tcl java command line options list is: -Djava.library.path= TCL_CLASSPATH = TCL_CLASSPATH {/apps/fidessa/top/commerzbank/lib/com.ibm.mq.jar;/apps/fidessa/top/commerzb ank/lib/com.ibm.mq_websphere.jar} checkMQ cannot import class "com.ibm.mq.MQC", it does not exist while executing "java::import com.ibm.mq.MQC" (procedure "checkMQ" line 6) invoked from within "checkMQ $QManager $CCSID $channel $hostname $queueName $port $traceFile $msg" (file ".//MQEx.tcl" line 137) Thanks David _____ From: tcl...@li... [mailto:tcl...@li...] On Behalf Of Patrick Finnegan Sent: Thursday, July 12, 2007 3:42 PM To: A list for users of tcljava Subject: Re: [tcljava-user] NoClassDefFound On 12/07/07, Robinson, David <Dav...@co... <mailto:Dav...@co...> > wrote: Patrick, On Solaris 10 TCL_CLASSPATH doesn't seem to like more than one jar (or have I got the separator wrong ?) : append x /apps/fidessa/top/commerzbank/lib/com.ibm.mq.jar: append x /apps/fidessa/top/commerzbank/lib/com.ibm.mq_websphere.jar separator should be semi colon ";" append x $drive/IBM/WebSphereMQ/Java/lib/com.ibm.mq.jar\; append x $drive/IBM/WebSphereMQ/Tools/Java/base\; append x $drive/IBM/WebSphereMQ/Java/lib/com.ibm.mqjms.jar\; append x $drive/IBM/WebSphereMQ/Tools/Java/jms\; checkMQ java.lang.UnsatisfiedLinkError : no mqjbnd02 in java.library.path while executing "java::new MQQueueManager 1" (procedure "checkMQ" line 14) invoked from within "checkMQ $QManager $CCSID $channel $hostname $queueName $port $traceFile $msg" (file ".//MQEx.tcl" line 124) On Windows............... "The java.lang.UnsatisfiedLinkError is encountered when the environment variable java.library.path is not set. Sounds like you need to set "-Djava.library.path=<path to mqjbnd02.dll" You can set the java options inside the tcl blend script using tclblend_init before calling "package require java". manual page - http://tcljava.sourceforge.net/docs/TclJava/JavaPackage.html <http://tcljava.sourceforge.net/docs/TclJava/JavaPackage.html> e.g something like: lappend optList "-Djava.naming.provider.url\=$NAMING_PROVIDER " lappend optList "-Djava.naming.factory.initial\=$NAMING_FACTORY" lappend optList $CLIENTSOAP lappend optList "-Dwas.install.root\=$WAS_HOME" lappend optList "-Dws.ext.dirs\=$WAS_EXT_DIRS " # set tracefile properties. lappend optList "-DtraceSettingsFile\=TraceSettings.properties" puts "\n java command line options list is:\n" foreach x $optList { puts [ format "%-5s %-50s" " " $x ] } set tclblend_init $optList # call java package package require java Do you know which jar file on Solaris has this mqjbnd02 class ? I have my LD_LIBRARY_PATH and PATH set to where the com.ibm.mq.jar file is. Thanks for your help. David For Solaris have a look at these links. Search for mqjbnd02. http://www.mail-archive.com/mqs...@ak.../msg00242.html <http://www.mail-archive.com/mqs...@ak.../msg00242.html> http://www.sjg-enterpriseintegration.com/websphere%20mq%20listserver%200105. asp <http://www.sjg-enterpriseintegration.com/websphere%20mq%20listserver%200105 .asp> ********************************************************************** This is a commercial communication from Commerzbank AG. This communication is confidential and is intended only for the person to whom it is addressed. If you are not that person you are not permitted to make use of the information and you are requested to notify <mailto:LON...@co...> immediately that you have received it and then destroy the copy in your possession. Commerzbank AG may monitor outgoing and incoming e-mails. By replying to this e-mail you consent to such monitoring. This e-mail message and any attached files have been scanned for the presence of computer viruses. However, you are advised that you open attachments at your own risk. This email was sent either by Commerzbank AG, London Branch, or by Commerzbank Corporates & Markets, a division of Commerzbank. Commerzbank AG is a limited liability company incorporated in the Federal Republic of Germany. Registered Company Number in England BR001025. Our registered address in the UK is 60 Gracechurch Street, London, EC3V 0HR. We are regulated by the Financial Services Authority for the conduct of investment business in the UK and we appear on the FSA register under number 124920. ********************************************************************** |
From: Patrick F. <pfi...@oz...> - 2007-07-12 18:14:29
|
On Thursday 12 July 2007 17:16, Robinson, David wrote: > Thanks for that but I'm still having problems : > Dave. I will email you direct tomorrow. Regards. Patrick. |
From: Robinson, D. <Dav...@Co...> - 2007-07-12 18:23:46
|
Actually, solved one problem - I found my default java.library.path from looking through config.log. The other one is still an issue, however also I have no mqjbnd02.so as the ibm MQ jar comes from an old Windows kit. I can only find a dll. Perhaps I need to find a different set of MQ libraries with a Solaris .so file ? David -----Original Message----- From: tcl...@li... [mailto:tcl...@li...] On Behalf Of Patrick Finnegan Sent: Thursday, July 12, 2007 7:28 PM To: A list for users of tcljava Subject: Re: [tcljava-user] NoClassDefFound On Thursday 12 July 2007 17:16, Robinson, David wrote: > Thanks for that but I'm still having problems : > Dave. I will email you direct tomorrow. Regards. Patrick. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ tcljava-user mailing list tcl...@li... https://lists.sourceforge.net/lists/listinfo/tcljava-user ********************************************************************** This is a commercial communication from Commerzbank AG. This communication is confidential and is intended only for the person to whom it is addressed. If you are not that person you are not permitted to make use of the information and you are requested to notify <mailto:LON...@co...> immediately that you have received it and then destroy the copy in your possession. Commerzbank AG may monitor outgoing and incoming e-mails. By replying to this e-mail you consent to such monitoring. This e-mail message and any attached files have been scanned for the presence of computer viruses. However, you are advised that you open attachments at your own risk. This email was sent either by Commerzbank AG, London Branch, or by Commerzbank Corporates & Markets, a division of Commerzbank. Commerzbank AG is a limited liability company incorporated in the Federal Republic of Germany. Registered Company Number in England BR001025. Our registered address in the UK is 60 Gracechurch Street, London, EC3V 0HR. We are regulated by the Financial Services Authority for the conduct of investment business in the UK and we appear on the FSA register under number 124920. ********************************************************************** |
From: Mo D. <mo...@mo...> - 2007-07-13 23:12:28
|
Robinson, David wrote: > Actually, solved one problem - I found my default java.library.path from > looking through config.log. > > The other one is still an issue, however also I have no mqjbnd02.so as the > ibm MQ jar comes from an old Windows kit. I can only find a dll. > > Perhaps I need to find a different set of MQ libraries with a Solaris .so > file ? > If this MQ library includes native code, then you will need a version with native code compiled for Solaris. Are you able to write a simple pure Java main class that loads this MQ library and opens a connection? If that does not even work, there is no point in trying to get it to load into Tcl Blend. cheers Mo DeJong |
From: Patrick F. <pfi...@oz...> - 2007-07-11 17:41:18
|
On Wednesday 11 July 2007 18:25, Robinson, David wrote: > Hi, I'm using tclblend for the first time. I have successfully compiled > some java classes that reference functions in an external MQSeries .jar > file which is in a non-standard directory. However, when I try to call the > class from jtclsh I get > See the examples at the Tcl Cookbook. http://aspn.activestate.com/ASPN/Cookbook/Tcl?kwd=TclBlend Specifically: http://aspn.activestate.com/ASPN/Cookbook/Tcl/Recipe/442320 Building the classpath. # build tcl classpath append x $drive/IBM/WebSphereMQ/Java/lib/com.ibm.mq.jar\; append x $drive/IBM/WebSphereMQ/Tools/Java/base\; append x $drive/IBM/WebSphereMQ/Java/lib/com.ibm.mqjms.jar\; append x $drive/IBM/WebSphereMQ/Tools/Java/jms\; append x $drive/IBM/WebSphereMQ/Java/lib/com.ibm.mqbind.jar\; set env(TCL_CLASSPATH) $x |