tcljava-user Mailing List for Tcl/Java (Page 24)
Brought to you by:
mdejong
You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(23) |
Dec
(9) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(12) |
Feb
(10) |
Mar
(16) |
Apr
(10) |
May
(40) |
Jun
(13) |
Jul
(18) |
Aug
(4) |
Sep
(6) |
Oct
(3) |
Nov
|
Dec
(3) |
2002 |
Jan
(15) |
Feb
(19) |
Mar
(1) |
Apr
(11) |
May
(12) |
Jun
(10) |
Jul
(2) |
Aug
(22) |
Sep
|
Oct
(3) |
Nov
(9) |
Dec
(20) |
2003 |
Jan
(32) |
Feb
(5) |
Mar
(26) |
Apr
(30) |
May
(10) |
Jun
(8) |
Jul
(17) |
Aug
(7) |
Sep
(24) |
Oct
(7) |
Nov
(6) |
Dec
|
2004 |
Jan
(5) |
Feb
|
Mar
|
Apr
(7) |
May
(8) |
Jun
(12) |
Jul
(3) |
Aug
(11) |
Sep
(8) |
Oct
(4) |
Nov
(2) |
Dec
(6) |
2005 |
Jan
(8) |
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
(19) |
Jul
(8) |
Aug
(22) |
Sep
(12) |
Oct
(35) |
Nov
(12) |
Dec
(4) |
2006 |
Jan
(20) |
Feb
(14) |
Mar
(23) |
Apr
(10) |
May
(11) |
Jun
(1) |
Jul
(1) |
Aug
(1) |
Sep
|
Oct
(4) |
Nov
(17) |
Dec
(10) |
2007 |
Jan
(41) |
Feb
(6) |
Mar
(23) |
Apr
(15) |
May
(34) |
Jun
(5) |
Jul
(18) |
Aug
(13) |
Sep
(8) |
Oct
(9) |
Nov
(7) |
Dec
(2) |
2008 |
Jan
|
Feb
(1) |
Mar
(18) |
Apr
(1) |
May
(1) |
Jun
(10) |
Jul
(3) |
Aug
|
Sep
(10) |
Oct
(3) |
Nov
(13) |
Dec
(3) |
2009 |
Jan
(4) |
Feb
(10) |
Mar
(1) |
Apr
(11) |
May
(3) |
Jun
(7) |
Jul
(4) |
Aug
(9) |
Sep
(16) |
Oct
(3) |
Nov
(5) |
Dec
(2) |
2010 |
Jan
(3) |
Feb
|
Mar
|
Apr
(7) |
May
(1) |
Jun
|
Jul
|
Aug
(3) |
Sep
(3) |
Oct
(1) |
Nov
(1) |
Dec
|
2011 |
Jan
(3) |
Feb
|
Mar
(2) |
Apr
(17) |
May
(4) |
Jun
(17) |
Jul
(5) |
Aug
(7) |
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
(12) |
Mar
|
Apr
(1) |
May
(1) |
Jun
(1) |
Jul
|
Aug
(3) |
Sep
(2) |
Oct
(6) |
Nov
|
Dec
(2) |
2013 |
Jan
|
Feb
(1) |
Mar
|
Apr
(1) |
May
(8) |
Jun
(1) |
Jul
|
Aug
(3) |
Sep
|
Oct
(3) |
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
(2) |
Apr
(2) |
May
(1) |
Jun
(3) |
Jul
(3) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
(1) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
2018 |
Jan
|
Feb
(1) |
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
(1) |
Sep
(2) |
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2021 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: <wiw...@dc...> - 2006-01-18 14:54:38
|
When enabling debugging I get the following output: TCLBLEND_DEBUG: JNI_CreateJavaVM TCLBLEND_DEBUG: JavaInitEnv returning successfully TCLBLEND_DEBUG: initializing jcache TCLBLEND_DEBUG: JavaSetupJava returning successfully TCLBLEND_DEBUG: Now to create Interp object TCLBLEND_DEBUG: Checking Tcl_GetNameOfExecutable() TCLBLEND_DEBUG: Executable name is already known TCLBLEND_DEBUG: called JavaInitBlend Exception in thread "main" java.lang.NullPointerException: Invalid interpreter. at tcl.lang.Interp.getCommand(Native Method) at tcl.lang.BlendExtension.init(BlendExtension.java:37) TCLBLEND_DEBUG: Exception in init() method TCLBLEND_DEBUG: JavaInitBlend returning TCLBLEND_DEBUG: Tclblend_Init finished TCLBLEND_DEBUG: JavaInitBlend returned TCL_ERROR "package require java" failed with the following error "XpUtils::iload -d /usr/local/lib/tcljava1.3.2 tclblend" failed: java.lang.NullPointerException: Invalid interpreter. TCLBLEND_DEBUG: called FreeJavaCache TCLBLEND_DEBUG: called DestroyJVM The error is from the file javaCmd.c: somewhere in /* * Associate the interpreter data with the interp object. */ Tcl_SetAssocData(interp, "java", JavaInterpDeleted, (ClientData)interpObj); /* * Initialize the BlendExtension. */ blend = (*env)->NewObject(env, jcache->BlendExtension, jcache->blendC); (*env)->CallVoidMethod(env, blend, jcache->init, interpObj); if (exception = (*env)->ExceptionOccurred(env)) { (*env)->ExceptionDescribe(env); (*env)->ExceptionClear(env); obj = Tcl_GetObjResult(interp); ToString(env, obj, exception); (*env)->DeleteLocalRef(env, exception); something goes wrong. Unfortunatly I do not understand the code well enough to further investigate. Has anyone a clue for me? Thanks, wiwo |
From: Sheelu_George <She...@Sa...> - 2006-01-18 14:16:37
|
=20 =20 =20 Hi, Am trying to install tclBlend in Linux fedora core 3 machine.i had downloaded tcl8.4 and had run the 'configure' scripts by typing "./configure". When this was done I typed "make" to create the tclblend.jar and tcljava.jar as per the instructions given in README.tclblend. so to test the tclblend I typed "package require java" but I got the following exceptions: =20 =20 [root@localhost unix]# make shell LD_LIBRARY_PATH=3D`pwd`:${LD_LIBRARY_PATH}; export LD_LIBRARY_PATH; \ TCL_LIBRARY=3D"/root/tcl8.4.12/library"; export TCL_LIBRARY; \ ./tclsh % package require java can't find package java % =20 Please help me to sort out this problem. =20 Thanks in advance =20 She...@sa... =20 =20 =20 DISCLAIMER: This email (including any attachments) is intended for the sole use of = the intended recipient/s and may contain material that is CONFIDENTIAL = AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or = copying or distribution or forwarding of any or all of the contents in = this message is STRICTLY PROHIBITED. If you are not the intended = recipient, please contact the sender by email and delete all copies; = your cooperation in this regard is appreciated. |
From: Sheelu_George <She...@Sa...> - 2006-01-18 14:09:17
|
=20 =20 Hi, Am trying to install tclBlend in Linux fedora core 3 machine.i had downloaded tcl8.4 and had run the 'configure' scripts by typing "./configure". When this was done I typed "make" to create the tclblend.jar and tcljava.jar as per the instructions given in README.tclblend. so to test the tclblend I typed "package require java" but I got the following exceptions: =20 =20 [root@localhost unix]# make shell LD_LIBRARY_PATH=3D`pwd`:${LD_LIBRARY_PATH}; export LD_LIBRARY_PATH; \ TCL_LIBRARY=3D"/root/tcl8.4.12/library"; export TCL_LIBRARY; \ ./tclsh % package require java can't find package java % =20 Please help me to sort out this problem. =20 Thanks in advance =20 She...@sa... =20 =20 =20 DISCLAIMER: This email (including any attachments) is intended for the sole use of = the intended recipient/s and may contain material that is CONFIDENTIAL = AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or = copying or distribution or forwarding of any or all of the contents in = this message is STRICTLY PROHIBITED. If you are not the intended = recipient, please contact the sender by email and delete all copies; = your cooperation in this regard is appreciated. |
From: <wiw...@dc...> - 2006-01-16 16:03:28
|
Hi! I'm trying to build tclBlend1.3.2 with tcl 8.4.12 and thread2.6.2 ./configure --with-tcl=../tcl8.4.12 --with-thread=../thread2.6.2/ --with-jdk=/usr/lib/j2se/1.4/ When I'm trying to load the package "java" i get the following error: % package require java Exception in thread "main" java.lang.NullPointerException: Invalid interpreter. at tcl.lang.Interp.getCommand(Native Method) at tcl.lang.BlendExtension.init(BlendExtension.java:39) "XpUtils::iload -d /root/download/tcl/tclBlend1.3.2 tclblend" failed: java.lang.NullPointerException: Invalid interpreter. I've already tried tcl 8.4.11 and java 1.5.0_10 with the same result. My Linux installation is a MEPIS. It works fine on SuSE Linux 9.2. Thanks for your help, wiwo |
From: Tom P. <tpo...@ny...> - 2005-12-22 15:48:20
|
On Wed, Dec 21, 2005 at 11:49:13AM -0800, Mo DeJong wrote: > Tis the season for giving and because Jacl users have been > very good this year, the gift of a shiny new compiler is > now available via the tcljava CVS. The compiler is Saaaaweeett! And mostly implemeted in Tcl, no less. Many thanks to you, Mo, and well as Bruce (OMS), AMD, New Iron. -- Tom Poindexter tpo...@ny... |
From: Mo D. <md...@un...> - 2005-12-21 19:45:00
|
Ho Ho Ho! Tis the season for giving and because Jacl users have been very good this year, the gift of a shiny new compiler is now available via the tcljava CVS. The compiler is named TJC, which stands for Tcl to Java Compiler. The TJC compiler accepts Tcl source code as input and compiles Tcl procs into executable Java code stored in a Jar file. The compiler is accessed via a startup script named tjc. The TJC compiler is ready for evaluation by early adopters looking for significant performance improvements for Jacl scripts. Currently, scripts can be compiled ahead of time but there is no support for compilation of Tcl procs at runtime. A simple example showing how to use the TJC compiler is appended to this email. Many thanks got to AMD, New Iron Systems, and One Moon Scientific for funding this project. cheers Mo DeJong SIMPLE TJC EXAMPLE: In the following example, a TJC module containing a single Tcl script file and a single compiled proc will be created and loaded into the Jacl shell. This example makes use of the tjc executable and the TJC::package command. In this example, the Tcl source file used as input to the TJC compiler is defined as follows: $ cat simple.tcl proc simple {} { return "SIMPLE" } The user will now need to create a TJC module file for the TJC package. The name of the module file will be simple.tjc. The name of the Java package will also be "simple", this is the same package name that will later be passed to the TJC::package command. The SOURCE and INIT_SOURCE declarations will list only the simple.tcl file. $ cat simple.tjc PACKAGE simple SOURCE simple.tcl INIT_SOURCE simple.tcl OPTIONS Assuming that the tjc executable is already on the PATH, the TJC compiler is invoke via: $ tjc simple.tjc If no error is generated, then nothing is printed and the files simple.jar and simplesrc.jar are created in the current directory. Note that simple.jar contains both the compiled version of the proc simple and the script simple.tcl. This TJC package can be loaded into a Jacl shell by adding simple.jar to the CLASSPATH and invoking Jacl. $ export CLASSPATH=${CLASSPATH}:`pwd`/simple.jar $ java tcl.lang.Shell At the Jacl shell prompt the following Tcl commands would be entered to load the TJC package and init the simple package. % package require TJC 1.0 % TJC::package simple % simple SIMPLE The example above shows how a compiled version of the Tcl proc named "simple" is loaded into the Jacl shell and executed. The results returned by the compiled "simple" command are the same as would be returned by the Tcl version of the command. |
From: Patrick F. <pfi...@oz...> - 2005-12-13 12:22:38
|
The following scripts log WAS performance data to a Cloudscape database. WebSphere - log WAS SESSION performance data to a cloudscape database. This script logs the WAS SESSION PMI performance data to a Cloudscape database. http://aspn.activestate.com/ASPN/Cookbook/Tcl/Recipe/464560 WebSphere - log WAS JDBC performance data to a cloudscape database. This script logs the WAS JDBC PMI performance data to a Cloudscape database. http://aspn.activestate.com/ASPN/Cookbook/Tcl/Recipe/464546 WebSphere - log WAS JVM performance data to a cloudscape database. This script logs the WAS JVM PMI performance data to a Cloudscape database. http://aspn.activestate.com/ASPN/Cookbook/Tcl/Recipe/464545 Regards. PATRICK FINNEGAN. |
From: Patrick F. <pfi...@oz...> - 2005-12-11 05:17:51
|
Scripted Cloudscape. The following scripts use Tclblend to leverage the power of the Cloudscape Java API in a dynamic language environment. They are particularly suitable for "Cloudscape DBAs" and WebSphere Admins who may have to manage Cloudscape databases running in network server mode. Requires Tclblend. Tclblend: http://tcljava.sourceforge.net/docs/website/index.html. Tclblend Windows Build Instructions: http://wiki.tcl.tk/9993 Start and monitor Cloudscape network server. http://aspn.activestate.com/ASPN/Cookbook/Tcl/Recipe/461728 Stop a Cloudscape Network Server. http://aspn.activestate.com/ASPN/Cookbook/Tcl/Recipe/461729 Backup a Cloudscape Database in a network server multiuser environment. http://aspn.activestate.com/ASPN/Cookbook/Tcl/Recipe/461730 Create a cloudscape database. http://aspn.activestate.com/ASPN/Cookbook/Tcl/Recipe/461731 Run DDL against a Cloudscape database using batchupdate SQL. http://aspn.activestate.com/ASPN/Cookbook/Tcl/Recipe/461732 Get network server runtime info. http://aspn.activestate.com/ASPN/Cookbook/Tcl/Recipe/461733 List tables and schemas in a database. http://aspn.activestate.com/ASPN/Cookbook/Tcl/Recipe/461734 Lock a cloudscape database for read only. http://aspn.activestate.com/ASPN/Cookbook/Tcl/Recipe/461735 Unlock a cloudscape database that has been locked for readonly access. http://aspn.activestate.com/ASPN/Cookbook/Tcl/Recipe/461736 Regards. PATRICK FINNEGAN. |
From: Patrick F. <pfi...@oz...> - 2005-11-21 12:57:12
|
Thanks for the tip Mo. The class is loaded but I now get an SQL error. "set c [ java::field ClientDriver class ]" This loads the class but the subsequent call to "DriverManager" generates a "no suitable driver sql error". I am trying to emulate the JDBC load database driver using the Class forName technique explained here: http://www.jguru.com/faq/view.jsp?EID=11164 Class.forName("org.apache.derby.jdbc.EmbeddedDriver"); Connection conn = DriverManager.getConnection( "jdbc:derby:mynewDB", p); In JACL the method call fails with a class not found error. "java::call Class forName org.apache.derby.jdbc.ClientDriver" "set ConnectionI [ java::call DriverManager getConnection $url ]" I had another look at the Class API and added the tcl class loader as the loader parameter. set c [ java::field ClientDriver class ] set classLoader [ $c getClassLoader ] In this case the classloader is " tcl.lang.TclClassLoader" because the jar file containing "ClientDriver" is specified using the tcl_classpath variable. "java::call Class forName org.apache.derby.jdbc.ClientDriver true $classLoader" Class.forName now loads ClientDriver but I still get "java.sql.SQLException: No suitable driver" on the call to DriveManager. It does look like a classloader issue. The work around is to add the Derby database jar files to the system classpath. set CLASSPATH=%CLASSPATH%;C:\IBM\Cloudscape_10.1\lib\derby.jar set CLASSPATH=%CLASSPATH%;C:\IBM\Cloudscape_10.1\lib\derbyclient.jar set CLASSPATH=%CLASSPATH%;C:\IBM\Cloudscape_10.1\lib\derbynet.jar set CLASSPATH=%CLASSPATH%;C:\IBM\Cloudscape_10.1\lib\derbytools.jar c:\tclblendSun\bin\jtclsh.bat C:\CvsSandbox\FITZROY\FM\SCRIPTS\TCL\JACL\cloudscape\createCloudScapeDB.tcl When the foloowng statements are executed................... set c [ java::field ClientDriver class ] set classLoader [ $c getClassLoader ] the classloader for ClientDriver is now "sun.misc.Launcher$AppClassLoader" and the call to DriveManager succeeds. So it would seem that the process that the database driver class uses to register the driver with the DriveManager only works if it's loaded with the same class loader as the DriveManager. "The specified driver must implement the Driver interface. A class initializer (static code block) within the OracleDriver class registers the driver with the DriverManager". Regards. Patrick. |
From: Mo D. <md...@un...> - 2005-11-19 22:40:18
|
On Sat, 19 Nov 2005 20:06:56 +0800 Patrick Finnegan <pfi...@hb...> wrote: > The TclBlend configure script generates a bat file which denotes the > location of the system JVM and sets classpath variables. I need a > tclblend exe that does not rely on a bat file. Can the configure script > be changed so that tclblend will find the JDK without the batch file > assuming the JDK is always in the same place? No. You could take a look at some of the example code in unix/custom.c and unix/custom2.c to see how you might compile your own .exe for Tcl Blend with hard coded paths. There are makefile rules to build both of these executables. cheers Mo DeJong |
From: Mo D. <md...@un...> - 2005-11-19 22:37:05
|
On Sat, 19 Nov 2005 20:06:04 +0800 Patrick Finnegan <pfi...@hb...> wrote: > The following code is executed inside a proc. The "EmbeddedDriver" class > is imported successfully but attempts to instantiate the object generate a class not > found error. > java::call Class forName org.apache.derby.jdbc.EmbeddedDriver ... > java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver You can't just call class.forName() like that. Depending on how the classloader is implemented in the JVM, it may not work. If you want to get a ref to a java.lang.Class for a specific named class, use the class field of the object. % set c [java::field java.util.Hashtable class] java0x2 % $c toString class java.util.Hashtable cheers Mo DeJong |
From: Patrick F. <pfi...@hb...> - 2005-11-19 12:07:09
|
The TclBlend configure script generates a bat file which denotes the location of the system JVM and sets classpath variables. I need a tclblend exe that does not rely on a bat file. Can the configure script be changed so that tclblend will find the JDK without the batch file assuming the JDK is always in the same place? |
From: Patrick F. <pfi...@hb...> - 2005-11-19 12:06:20
|
The following code is executed inside a proc. The "EmbeddedDriver" class is imported successfully but attempts to instantiate the object generate a class not found error. # import required classes java::import org.apache.derby.jdbc.EmbeddedDriver java::import org.apache.derby.drda.NetworkServerControl java::import org.apache.derby.jdbc.ClientDriver java::import java.sql.Connection java::import java.sql.DriverManager java::import java.sql.ResultSet java::import java.sql.SQLWarning java::import java.sql.Statement java::import java.sql.ResultSetMetaData puts "\nimported classes are:\n" foreach i [java::import] { puts [ format "%-5s %-50s" " " $i ] } This generates ==> imported classes are: org.apache.derby.drda.NetworkServerControl java.sql.DriverManager org.apache.derby.jdbc.ClientDriver java.sql.ResultSetMetaData java.sql.Statement org.apache.derby.jdbc.EmbeddedDriver java.sql.ResultSet java.sql.Connection java.sql.SQLWarning The JAVA call fails. java::call Class forName org.apache.derby.jdbc.EmbeddedDriver *** Stack trace is: java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver at java.net.URLClassLoader.findClass(URLClassLoader.java:375) at java.lang.ClassLoader.loadClass(ClassLoader.java:562) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:442) at java.lang.ClassLoader.loadClass(ClassLoader.java:494) at java.lang.Class.forName1(Native Method) at java.lang.Class.forName(Class.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:85) |
From: Mo D. <md...@un...> - 2005-11-17 19:10:01
|
On Thu, 17 Nov 2005 12:42:25 +0800 <PFi...@hb...> wrote: > The following code is executed inside a proc. Patrick, you are going to need to get another email acount to post from. Your messages include fictional contract claims that are in violation of the Terms of Use for this mailing list. http://tcljava.sourceforge.net/docs/website/mail.html Mo DeJong |
From: <PFi...@hb...> - 2005-11-17 06:40:29
|
I can get around this problem by putting the appropriate jar file on the system class path. But it;s strange that the "java::import" finds " EmbeddedDriver" but the "java::call" fails unless the class is on the system class path. The tcl classpath is set as follows. lappend x C:\\IBM\\Cloudscape_10.1\\lib\\derby.jar lappend x C:\\IBM\\Cloudscape_10.1\\lib\\derbyclient.jar lappend x C:\\IBM\\Cloudscape_10.1\\lib\\derbynet.jar lappend x C:\\IBM\\Cloudscape_10.1\\lib\\derbytools.jar set env(TCL_CLASSPATH) $x I tried various forward and back slash combinations. None of then worked. I also tried modifying the classpath variable within the script but that did not work either. set CLASSPATHList [ split [ lindex [ array get env CLASSPATH ] 1 ] ";" ] lappend CLASSPATHList $x set env(CLASSPATH) $CLASSPATHList puts "\nNew CLASSPATH is...............\n" foreach i [ split [ lindex [ array get env CLASSPATH ] 1 ] ";" ] { puts [ format "%-5s %-50s" " " $i ] } Has anyone else had issues like this on Windows XP. I really don't want to have to put all the required jar files on the system class path. Regards. PATRICK FINNEGAN. WebSphere Consultant. HBF Web Master LDAP Administrator. <PFi...@hb...> Sent by: tcl...@li... 17/11/2005 12:42 PM Please respond to tcl...@li... To <tcl...@li...> cc Subject [tcljava-user] Class not found after successful class import. The following code is executed inside a proc. The "EmbeddedDriver" class is imported successfully but attempts to call it generate a class not found error. # import required classes java::import org.apache.derby.jdbc.EmbeddedDriver java::import org.apache.derby.drda.NetworkServerControl java::import org.apache.derby.jdbc.ClientDriver java::import java.sql.Connection java::import java.sql.DriverManager java::import java.sql.ResultSet java::import java.sql.SQLWarning java::import java.sql.Statement java::import java.sql.ResultSetMetaData puts "\nimported classes are:\n" foreach i [java::import] { puts [ format "%-5s %-50s" " " $i ] } This generates ==> imported classes are: org.apache.derby.drda.NetworkServerControl java.sql.DriverManager org.apache.derby.jdbc.ClientDriver java.sql.ResultSetMetaData java.sql.Statement org.apache.derby.jdbc.EmbeddedDriver java.sql.ResultSet java.sql.Connection java.sql.SQLWarning The JAVA call fails. java::call Class forName org.apache.derby.jdbc.EmbeddedDriver *** Stack trace is: java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver at java.net.URLClassLoader.findClass(URLClassLoader.java:375) at java.lang.ClassLoader.loadClass(ClassLoader.java:562) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:442) at java.lang.ClassLoader.loadClass(ClassLoader.java:494) at java.lang.Class.forName1(Native Method) at java.lang.Class.forName(Class.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:85) ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click _______________________________________________ tcljava-user mailing list tcl...@li... https://lists.sourceforge.net/lists/listinfo/tcljava-user =================================================== HBF Health Funds Inc. a registered organisation under the National Health Act HBF Insurance Pty Ltd ACN 009 268 277 This email is a confidential communication intended only for the named Addressee(s). If you are not that person any disclosure, copying, distribution or use of this email or the information in it is prohibited. Please notify us immediately by telephone, (+61) 08 9265 6111 or return email and delete this email. The views in this email may be personal to the author and not those of HBF. |
From: <PFi...@hb...> - 2005-11-17 04:41:31
|
The following code is executed inside a proc. The "EmbeddedDriver" class is imported successfully but attempts to call it generate a class not found error. # import required classes java::import org.apache.derby.jdbc.EmbeddedDriver java::import org.apache.derby.drda.NetworkServerControl java::import org.apache.derby.jdbc.ClientDriver java::import java.sql.Connection java::import java.sql.DriverManager java::import java.sql.ResultSet java::import java.sql.SQLWarning java::import java.sql.Statement java::import java.sql.ResultSetMetaData puts "\nimported classes are:\n" foreach i [java::import] { puts [ format "%-5s %-50s" " " $i ] } This generates ==> imported classes are: org.apache.derby.drda.NetworkServerControl java.sql.DriverManager org.apache.derby.jdbc.ClientDriver java.sql.ResultSetMetaData java.sql.Statement org.apache.derby.jdbc.EmbeddedDriver java.sql.ResultSet java.sql.Connection java.sql.SQLWarning The JAVA call fails. java::call Class forName org.apache.derby.jdbc.EmbeddedDriver *** Stack trace is: java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver at java.net.URLClassLoader.findClass(URLClassLoader.java:375) at java.lang.ClassLoader.loadClass(ClassLoader.java:562) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:442) at java.lang.ClassLoader.loadClass(ClassLoader.java:494) at java.lang.Class.forName1(Native Method) at java.lang.Class.forName(Class.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:85) Regards. PATRICK FINNEGAN. WebSphere Consultant. HBF Web Master LDAP Administrator. =================================================== HBF Health Funds Inc. a registered organisation under the National Health Act HBF Insurance Pty Ltd ACN 009 268 277 This email is a confidential communication intended only for the named Addressee(s). If you are not that person any disclosure, copying, distribution or use of this email or the information in it is prohibited. Please notify us immediately by telephone, (+61) 08 9265 6111 or return email and delete this email. The views in this email may be personal to the author and not those of HBF. |
From: <PFi...@hb...> - 2005-11-15 07:43:59
|
The TclBlend configure script generates a bat file which denotes the location of the system JVM and sets classpath variables. I need a tclblend exe that does not rely on a bat file. Can the configure script be changed so that tclblend will find the JDK without the batch file assuming the JDK is always in the same place? Regards. PATRICK FINNEGAN. WebSphere Consultant. HBF Web Master LDAP Administrator. =================================================== HBF Health Funds Inc. a registered organisation under the National Health Act HBF Insurance Pty Ltd ACN 009 268 277 This email is a confidential communication intended only for the named Addressee(s). If you are not that person any disclosure, copying, distribution or use of this email or the information in it is prohibited. Please notify us immediately by telephone, (+61) 08 9265 6111 or return email and delete this email. The views in this email may be personal to the author and not those of HBF. |
From: <PFi...@hb...> - 2005-11-11 04:58:12
|
This script extracts the PMI JVM performance metrics from a WAS 5.1 application server running under ND and writes the data to a Cloudscape database. See link for details. http://aspn.activestate.com/ASPN/Cookbook/Tcl/Recipe/444767 Regards. PATRICK FINNEGAN. WebSphere Consultant. =================================================== HBF Health Funds Inc. a registered organisation under the National Health Act HBF Insurance Pty Ltd ACN 009 268 277 This email is a confidential communication intended only for the named Addressee(s). If you are not that person any disclosure, copying, distribution or use of this email or the information in it is prohibited. Please notify us immediately by telephone, (+61) 08 9265 6111 or return email and delete this email. The views in this email may be personal to the author and not those of HBF. |
From: <PFi...@hb...> - 2005-11-08 07:09:41
|
The IBM JACL implementation does not pick up the TCL_CLASSPATH variable. For example; adding the Derby java database jars. lappend x C:/IBM/Cloudscape_10.1/lib/derby.jar lappend x C:/IBM/Cloudscape_10.1/lib/derbyclient.jar lappend x C:/IBM/Cloudscape_10.1/lib/derbynet.jar lappend x C:/IBM/Cloudscape_10.1/lib/derbytools.jar set env(TCL_CLASSPATH) $x The jacl command "java::import org.apache.derby.jdbc.EmbeddedDriver" generates WASX7017E: Exception received while running file "c:\scripts\websphere\jacl\getJ VMINFO.tcl"; exception information: com.ibm.bsf.BSFException: error while eval'i ng Jacl expression: can not import class "org.apache.derby.jdbc.EmbeddedDriver", it does not exist The work around is to add the required jar files to the WAS_CLASSPATH in the WSADMIN bat file. .................... .................... :runcmd set WAS_CLASSPATH=C:\IBM\Cloudscape_10.1\lib\derby.jar;%WAS_CLASSPATH% "%JAVA_HOME%\bin\java" %javaoption% %CONSOLE_ENCODING% %DEBUG% "%CLIENTSOAP%" "%CLIENTSAS%" "-Dcom.ibm.ws.scripting.wsadminprops=%WSADMIN_PROPERTIES%" -Dcom.ibm.ws.management.standalone=true "-Duser.install.root=%USER_INSTALL_ROOT%" "-Dwas.install.root=%WAS_HOME%" "-Dwas.repository.root=%CONFIG_ROOT%" "-Dserver.root=%WAS_HOME%" "-Dlocal.cell=%WAS_CELL%" "-Dlocal.node=%WAS_NODE%" "-Dcom.ibm.itp.location=%WAS_HOME%\bin" "-classpath" "%WAS_CLASSPATH%;%WAS_HOME%\lib\jython.jar" "-Dws.ext.dirs=%WAS_EXT_DIRS%" com.ibm.ws.bootstrap.WSLauncher com.ibm.ws.scripting.WasxShell %* ............... ............... This allows use of the Derby database for WAS performance data logging. Regards. PATRICK FINNEGAN. WebSphere Consultant. =================================================== HBF Health Funds Inc. a registered organisation under the National Health Act HBF Insurance Pty Ltd ACN 009 268 277 This email is a confidential communication intended only for the named Addressee(s). If you are not that person any disclosure, copying, distribution or use of this email or the information in it is prohibited. Please notify us immediately by telephone, (+61) 08 9265 6111 or return email and delete this email. The views in this email may be personal to the author and not those of HBF. |
From: <PFi...@hb...> - 2005-11-01 08:31:08
|
JAVA Code. ************** "MBeanLevelSpec[] mlss = (MBeanLevelSpec[])ac.invoke(perfMbean, "getInstrumentationLevel", params, signatures);" The results of "ac.invoke" are casted to MBeanLevelSpec[]" JACL Code. ************** "set il [ $AdminClientI invoke $perfMbean "getInstrumentationLevel" $parramsArray $signaturesArray ]" "set mBeanLevelSpec [ java::cast {MBeanLevelSpec[]} $il ]" The cast generates: unknown class "MBeanLevelSpec" while executing "java::cast {MBeanLevelSpec[]} $il " Changed code to: "set mBeanLevelSpec [ java::cast MBeanLevelSpec $il ]" This generates: could not cast from com.ibm.websphere.pmi.stat.MBeanLevelSpec[] to com.ibm.websp here.pmi.stat.MBeanLevelSpec It seems the usage of "[]" in the cast statement invalidates the signature name. What is the proper usage of java::cast if the signature is an array? Regards. PATRICK FINNEGAN. =================================================== HBF Health Funds Inc. a registered organisation under the National Health Act HBF Insurance Pty Ltd ACN 009 268 277 This email is a confidential communication intended only for the named Addressee(s). If you are not that person any disclosure, copying, distribution or use of this email or the information in it is prohibited. Please notify us immediately by telephone, (+61) 08 9265 6111 or return email and delete this email. The views in this email may be personal to the author and not those of HBF. |
From: <PFi...@hb...> - 2005-10-31 08:22:22
|
Yeah you are right. It's possible to iterate and cast in one line. set serverSet [ $AdminClientI queryNames $ObjectNameI $nullI ] set serverMbean [ java::cast ObjectName [ [ $serverSet iterator ] next ] ] Regards. Patrick. =================================================== HBF Health Funds Inc. a registered organisation under the National Health Act HBF Insurance Pty Ltd ACN 009 268 277 This email is a confidential communication intended only for the named Addressee(s). If you are not that person any disclosure, copying, distribution or use of this email or the information in it is prohibited. Please notify us immediately by telephone, (+61) 08 9265 6111 or return email and delete this email. The views in this email may be personal to the author and not those of HBF. |
From: <PFi...@hb...> - 2005-10-31 03:50:28
|
Tried that but got: "error in procedure java::call: expected object of type javax.management.Notifica tionListener but got "java0x3" (com.ibm.websphere.management.AdminClient)" AdminClient is created using AdminClientFactory "set AdminClientI [ java::call AdminClientFactory createAdminClient $PropertiesI ]" The notification listener is created using "AdminClientI addNotificationListener $nodeAgentBean this $nullI $nullI" The addNotificationListener method takes a NotificationListener object argument which is denoted by the "this" keyword in the statement above. I suppose this acts recursively. public void addNotificationListener(javax.management.ObjectName name, javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback) throws javax.management.InstanceNotFoundException, ConnectorException NotificationListener is an interface with no static methods so I cannot create it outside of an addNotificationListener method. If you are interested the javadoc for the IBM WebSphere Application ServerTM, Release 5 API Specification is at: http://publib.boulder.ibm.com/infocenter/wasinfo/v5r0/index.jsp?topic=/com.ibm.websphere.base.doc/info/aes/javadoc/ae/index.html The javadoc for NotificationListener is: javax.management Interface NotificationListener Method Summary void handleNotification(Notification notification, java.lang.Object handback) Invoked when a JMX notification occurs. Method Detail handleNotification public void handleNotification(Notification notification, java.lang.Object handback) Invoked when a JMX notification occurs. The implementation of this method should return as soon as possible, to avoid blocking its notification broadcaster. Parameters: notification - The notification. handback - An opaque object which helps the listener to associate information regarding the MBean emitter. This object is passed to the MBean during the addListener call and resent, without modification, to the listener. The MBean object should not use or modify the object. Regards. Patrick. =================================================== HBF Health Funds Inc. a registered organisation under the National Health Act HBF Insurance Pty Ltd ACN 009 268 277 This email is a confidential communication intended only for the named Addressee(s). If you are not that person any disclosure, copying, distribution or use of this email or the information in it is prohibited. Please notify us immediately by telephone, (+61) 08 9265 6111 or return email and delete this email. The views in this email may be personal to the author and not those of HBF. |
From: Tom P. <tpo...@ny...> - 2005-10-28 15:41:46
|
On Fri, Oct 28, 2005 at 04:53:19PM +0800, PFi...@hb... wrote: > The java.util.Set interface does not have an array signature. I converted > the Set collection to an array using the Set.toArray method and accessed > the array with the javaArrayObjcommand set. > > Is there an easy way of converting a java array to a tcl array that can be > used with lsearch. > > For example: > > set iteratorI [ $serverSet iterator ] > set arrayI [ $serverSet toArray ] > > puts "\n serverSet array length [ $arrayI length ] \n" > > *** set tclList [ convert $arrayI ] > > Then use regular tcl commands. > > lsearch $tclArray xxx > > foreach i $tclArray { puts $i } probably: set tclList [list] set arrayI [ $serverSet toArray ] foreach obj [$arrayI getrange] { lappend tclList $obj # or maybe: lappend tclList [$obj toString] # depending on what kind of objects are in your Set } instead of converting to an array, you could also just use the iterator, it's a little less messy: set tclList [list] set set iteratorI [ $serverSet iterator ] while {[$iteratorI hasNext]} { lappend tclList [$iteratorI next] # may have to cast your object from the iterator, or toString as above, # again depending on what objects you have in your Set. # lappend tclList [java::cast xxx.yyy.YourObject [$iteratorI next]] # lappend tclList [[$iteratorI next] toString] } (I *love* the 'java' package in Jacl!) -- Tom Poindexter tpo...@ny... http://www.nyx.net/~tpoindex/ |
From: Tom P. <tpo...@ny...> - 2005-10-28 15:26:06
|
On Fri, Oct 28, 2005 at 11:22:52AM +0800, PFi...@hb... wrote: > How do I code the java keyword "this" in JACL? > > JAVA Code. > > adminClient.addNotificationListener(nodeAgent, this, null, null); > > JACL Code. > > $AdminClientI addNotificationListener $nodeAgent this $nullI $nullI > Wouldn't you just just $AdminClientI, as in: $AdminClientI addNotificationListener $nodeAgent $AdminClientI $nullI $null -- Tom Poindexter tpo...@ny... http://www.nyx.net/~tpoindex/ |
From: <PFi...@hb...> - 2005-10-28 08:52:39
|
The java.util.Set interface does not have an array signature. I converted the Set collection to an array using the Set.toArray method and accessed the array with the javaArrayObjcommand set. Is there an easy way of converting a java array to a tcl array that can be used with lsearch. For example: set iteratorI [ $serverSet iterator ] set arrayI [ $serverSet toArray ] puts "\n serverSet array length [ $arrayI length ] \n" *** set tclList [ convert $arrayI ] Then use regular tcl commands. lsearch $tclArray xxx foreach i $tclArray { puts $i } Regards. PATRICK FINNEGAN. =================================================== HBF Health Funds Inc. a registered organisation under the National Health Act HBF Insurance Pty Ltd ACN 009 268 277 This email is a confidential communication intended only for the named Addressee(s). If you are not that person any disclosure, copying, distribution or use of this email or the information in it is prohibited. Please notify us immediately by telephone, (+61) 08 9265 6111 or return email and delete this email. The views in this email may be personal to the author and not those of HBF. |