Sponsored Content
Full Discussion: Java to tuxedo through cron
Top Forums Shell Programming and Scripting Java to tuxedo through cron Post 302128658 by charu on Thursday 26th of July 2007 12:50:40 AM
Old 07-26-2007
Quote:
Originally Posted by charu
Hi,

I am kind of new to both tuxedo and cron. I am trying to run a java program, which will talk to middleware tuxedo. When I run the java program from command line, it is working fine. However, when I try to run the same program from cron, it is giving me an exception as stated below:

Exception in thread "main" java.lang.ExceptionInInitializerError
at java.lang.J9VMInternals.initialize(J9VMInternals.java:195)
at com.csgsystems.aruba.connection.ConnectionFactory.createConnection(ConnectionFactory.java:45)
at QueryBalance.getBalance(QueryBalance.java:47)
at ExpBalCust.RetExpBalCust(ExpBalCust.java:63)
at ExpBalCust.main(ExpBalCust.java:237)
Caused by: terrapin.tuxedo.FmlError:
at terrapin.tuxedo.Fml32.Fldid(Native Method)
at com.csgsystems.aruba.connection.Connection.<clinit>(Connection.java:60)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:177)
... 4 more


In the script which will run the java program from cron, I am setting the CLASSPATH, PATH and LIBPATH env varibales correctly.

Please help me.

Thanks in advance.
At times, I am getting this exception as well...

Exception in thread "main" java.lang.UnsatisfiedLinkError: tti_tuxedo_wsc (A file or directory in the path name does not exis
t.)
at java.lang.ClassLoader.loadLibraryWithPath(ClassLoader.java:953)
at java.lang.ClassLoader.loadLibraryWithClassLoader(ClassLoader.java:922)
at java.lang.System.loadLibrary(System.java:451)
at terrapin.tuxedo.TuxLoaderWsc.<clinit>(TuxLoaderWsc.java:8)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:177)
at java.lang.Class.forNameImpl(Native Method)
at java.lang.Class.forName(Class.java:131)
at com.csgsystems.aruba.connection.PoolableATMI.<clinit>(PoolableATMI.java:29)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:177)
at java.lang.Class.forNameImpl(Native Method)
at java.lang.Class.forName(Class.java:131)
at com.csgsystems.aruba.connection.Connection.class$(Connection.java:57)
at com.csgsystems.aruba.connection.Connection.<clinit>(Connection.java:57)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:177)
at com.csgsystems.aruba.connection.ConnectionFactory.createConnection(ConnectionFactory.java:45)
at PrepaidBalanceQuery.getBalance(PrepaidBalanceQuery.java:44)
at ARLowBalCust.insertLowBalCust(ARLowBalCust.java:59)
at ARLowBalCust.main(ARLowBalCust.java:202)
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

java errors when calling from cron

I am more or less new to using cron, and I am trying to automate a log cleaning system I have made. The system basically cleans through WWW logs that are mounted on an NFS and creates text files for entry into a local PostgreSQL DB. For the past year I have been running the various scripts and... (3 Replies)
Discussion started by: mntamago
3 Replies

2. Shell Programming and Scripting

Running java class with a cron

Hello everybody, I have a problem about running a java class with a cron : I have Cron.txt file which has : 0,5,10,15,20,25,30,35,40,45,50,55 * * * * CronJava.txt I have CronJava.txt wihich has : cd ias/j2ee/SapAktarim/applications/SapAktarim/SapAktarim/WEB-INF/classes/;java -classpath... (3 Replies)
Discussion started by: UBGandalf
3 Replies

3. UNIX for Dummies Questions & Answers

Tuxedo for MQ???

Hi, I am new to the UNIX environment so putting this query here. Was working with mainframes till now. The UNIX system i am working on uses MQ series along with Tuxedo for communicating with mainframes. I want to know why is Tuxedo required in order to use MQ on the unix side? On mainframes... (1 Reply)
Discussion started by: pav001
1 Replies

4. Programming

Re : Pass parameters from Cron job to Java code

Hello All, Hope all is fine. I am newbie to Unix. I am using Bourne Shell (sh). One of the question I have is that I am trying to read XML file and based on reading that XML file I want to run same java programs at different hours. When I run the Java code, I wanted to pass parameters to my... (1 Reply)
Discussion started by: samshaw
1 Replies

5. UNIX and Linux Applications

Parsing Tuxedo Logs

Right now I am parsing Tuxedo logs to calculate response times for various services. I was hoping to find a log tool that had support for Tuxedo and would generate drill down html reports. ---------- Post updated at 02:35 PM ---------- Previous update was at 02:33 PM ---------- I just wanted... (0 Replies)
Discussion started by: Lurch
0 Replies

6. Shell Programming and Scripting

Please help on tuxedo linking problem

Dear Unixians, I have try to link my libraries with tuxedo that showing following errors, ] My make file few lines: .... actual linking Please help on this. Thanks,KKL. (1 Reply)
Discussion started by: kkl
1 Replies

7. UNIX and Linux Applications

tuxedo information

Hi, Anyone know about tuxedo middleware tool. If you aware please guild me. 1) where will i get information about it ? 2) What kind of the basis issue ? I am new in tuxedo, I would like to aware before start my job. Thanks & Regards, Mani (1 Reply)
Discussion started by: Mani_apr08
1 Replies

8. Infrastructure Monitoring

Tuxedo Query

Hi , The tuxedo is installed in solaris server. I would like to grab one particular tuxedo service from solaris command line. Note: I would like to grab only for service related line. Thank & Regards, Mani (2 Replies)
Discussion started by: Mani_apr08
2 Replies

9. Shell Programming and Scripting

Shell script with Java code in Cron

Dear All, I have a shell script which has JAVA code inside it runs perfectly on command line. But while I set it on cron, all rest of the script runs but Java code doesnt. java -cp... (3 Replies)
Discussion started by: Deei
3 Replies
JAVA-WRAPPERS(7)						   Java wrappers						  JAVA-WRAPPERS(7)

NAME
java-wrappers - capacities shared by java wrapper scripts DESCRIPTION
Most Java programs are not run directly, but through small shell scripts that take care of various things, such as finding a suitable java environment and looking for libraries. To ease the task of the maintainers, they rely on a library providing runtime detection, library detection and other features. This manual page describes the common features of all those scripts, and to which point you can configure them. This is mainly done via environment variables. ENVIRONMENT VARIABLES
java-wrappers understands some environment variables: JAVA_CMD The java command that will be run. If this variable is set, it disables all lookup for a java runtime. JAVA_BINDIR Specifies a directory that will be looked for a java or a jdb executable (depending on the setting of JAVA_DEBUGGER). It has prece- dence over JAVA_HOME but not over JAVA_CMD. JAVA_HOME A path to a java runtime. If this variable is set, all lookup for a java runtime is disabled, except that if no java executable is found in the path, the command java is used. JAVA_FLAVOR A probably more easy-to-use version of the JAVA_HOME variable: instead of specifying the full path of the java runtime, you name it. List of available flavors can be found in the file /usr/lib/java-wrappers/jvm-list.sh. See examples below. JAVA_DEBUGGER If this is set, the wrapper will try to pick up a java debugger rather than a java interpreter. This will fail if the jbd of the runtime found is a stub. JAVA_CLASSPATH Additional classpath, will have priority over the one found by the wrapper. JAVA_ARGS Additional arguments to the java command. They will come before all other arguments. FORCE_CLASSPATH If this variable is set, it will be the only classpath. You'd better know what you are doing. DEBUG_WRAPPER This is probably the most important variable; if it set, the wrapper will print out useful information as it goes by its business, such as which runtime it did find, and which command is run eventually. JAVA_JARPATH The path where the wrappers will go looking for jar archives. If not set, the wrapper will look into the default directory, /usr/share/java. Warning : the wrapper will not look anywhere else than in JAVA_JARPATH. Setting it incorrectly will most probably result in early crashes. EXAMPLES
The examples all rely on rasterizer(1), from the package libbatik-java, but they really apply to all scripts that use java-wrappers. Print out debugging information: DEBUG_WRAPPER=1 rasterizer Limit rasterizer's memory to 80 MB: JAVA_ARGS=-Xmx80m rasterizer Force rasterizer to run with kaffe(1): JAVA_HOME=/usr/lib/kaffe rasterizer The same, but using JAVA_BINDIR: JAVA_BINDIR=/usr/lib/kaffe/bin rasterizer Force rasterizer to run with openjdk: JAVA_FLAVOR=openjdk rasterizer Debug rasterizer with Sun's debugger, while printing debugging information from the wrapper: DEBUG_WRAPPER=1 JAVA_CMD=/usr/lib/jvm/java-6-sun/bin/jdb rasterizer BUGS
Care has been taken to make the wrappers bug-free. If that was not the case, please file a bug report against the java-wrappers package. If you wish to submit any problem with a java executable relying on java-wrappers, please also submit the output of the command run with DEBUG_WRAPPER=1. It will save one mail exchange and therefore potentially reduce the time it takes to fix the bug. DEVELOPERS
There is currently no documentation about writing a wrapper script save the comments in /usr/lib/java-wrappers/java-wrappers.sh. If you have to write one, we suggest you base yourself upon, for instance, the rasterizer wrapper script, or any other one (just pick up any direct reverse dependency of java-wrappers and look for scripts). SEE ALSO
java(1), jdb(1) /usr/lib/java-wrappers/java-wrappers.sh AUTHOR
java-wrappers and its documentation were written by Vincent Fourmond <fourmond@debian.org> Version 0.1.16 2010-05-04 JAVA-WRAPPERS(7)
All times are GMT -4. The time now is 09:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy