Sponsored Content
Operating Systems AIX executable problems with shell script in IBM servers Post 302918858 by poojagupta on Thursday 25th of September 2014 09:37:24 PM
Old 09-25-2014
executable problems with shell script in IBM servers

We have a java stand alone application running currently on sun Solaris system. The java application runs on Jdk 1.4.

We are reshooting this java application to new Ibm servers.

There are 10 unix scripts for this application. All scripts works well except one shell script,

This shell script execute one java file where we are setting a properties file in the java options with -D configfiles.ini .

This properties in turn has entry for some other ini files. Ex. XMLgenerator.ini

XMLgenerator.ini has key key value pair something like filename = punches.txt.

This property of filename is required by the java class to process further.

When we execute this script file on new ibm server- the configfiles.ini is properly set and the values are properly read. But, the moment we start the execution of the java class - the property value of filename in XMLgenerator.ini comes out null.

I have something like this in my shell script


Code:
/usr/java14/bin/java \
\
-DWindowsFileFactory.bufferSize.StagedPunches=102400 \
-DWindowsFileFactory.bufferSize.XmlPunches=102400 \
-DWindowsFileFactory.fullFileName.StagedPunches=/usr/local/apps/workbrain/data/punches/staged/punches.txt \
-DPropertiesFileNames=config/ssc/workbrain/punches/xmlgenerator/ConfigFiles.ini \
-Djava.util.logging.config.file=${logprop} \
\
-classpath ${CLASSPATH} \
\
com.cvs.ssc.workbrain.punches.XMLGenerator


 
statusCode=$?
if [[ $statusCode != 0 ]]; then
FormatMsg -u2 -p${PGM} -l $LINENO "$prgToRun JOB FAILED. Job Return Code: [$statusCode]."
echo "Ran with CLASSPATH[$CLASSPATH]"
return 16
fi

Output in the Logs
==============

Code:
2014.09.25 12:54:33.328 - 10 (FINE   ) main:ConfigProperties.getPropertiesFileNames - fileNames=,config/ssc/workbrain/configXML/XML.ini
,config/ssc/workbrain/punches/xmlgenerator/Lookup.ini
,override.ini
main:ConfigProperties.<init> - ConfigProperties:
    Lookup.PunchCd.Type.F=01
   ,Lookup.PunchCd.Type.O=02
   ,Lookup.PunchCd.Type.R=01
   ,Lookup.PunchCd.Type.T=07
   ,PropertiesFileNames=config/ssc/workbrain/punches/xmlgenerator/ConfigFiles.ini
   ,Standard Edition
   ,WindowsFileFactory.append.ErroredPunches=false
   ,WindowsFileFactory.append.XmlPunches=false
   ,WindowsFileFactory.bufferSize.StagedPunches=102400
   ,WindowsFileFactory.bufferSize.XmlPunches=102400
   ,WindowsFileFactory.fullFileName.ErroredPunches=/usr/local/apps/workbrain/data/punches/staged/punches.err
   ,WindowsFileFactory.fullFileName.StagedPunches=/usr/local/apps/workbrain/data/punches/staged/punches.txt
   ,WindowsFileFactory.fullFileName.XmlPunches=/usr/local/apps/workbrain/data/punches/staged/punches.xml
2014.09.25 12:54:33.849 - 10 (WARNING) main:XMLGenerator.logStats - ElapsedTime=535,StagedCount=0,XmlCount=0,ErroredCount=0
2014.09.25 12:54:33.849 - 10 (WARNING) main:XMLGenerator.main - 
2014.09.25 12:54:33.849 - 10 (WARNING) main:XMLGenerator.main - 2014.09.25 12:54:33.849 - 10 (WARNING) main:XMLGenerator.main - <<com.cvs.components.fileio.FileIOException:fileName=StagedPunches>>
2014.09.25 12:54:33.849 - 10 (WARNING) main:XMLGenerator.main - caused by: 
2014.09.25 12:54:33.849 - 10 (WARNING) main:XMLGenerator.main - <<java.lang.NullPointerException:null>>
2014.09.25 12:54:33.849 - 10 (WARNING) main:XMLGenerator.main - java.io.FileInputStream.<init>(FileInputStream.java:126)
2014.09.25 12:54:33.849 - 10 (WARNING) main:XMLGenerator.main - java.io.FileReader.<init>(FileReader.java:76)
2014.09.25 12:54:33.849 - 10 (WARNING) main:XMLGenerator.main - com.cvs.components.fileio.SequentialFile.getReader(SequentialFile.java:276)
2014.09.25 12:54:33.849 - 10 (WARNING) main:XMLGenerator.main - com.cvs.components.fileio.SequentialFile.readNext(SequentialFile.java:354)
2014.09.25 12:54:33.849 - 10 (WARNING) main:XMLGenerator.main - com.cvs.components.fileio.SequentialFile.read(SequentialFile.java:136)
2014.09.25 12:54:33.849 - 10 (WARNING) main:XMLGenerator.main - com.cvs.ssc.workbrain.punches.XMLGenerator.writeClockElements(XMLGenerator.java:146)
2014.09.25 12:54:33.849 - 10 (WARNING) main:XMLGenerator.main - com.cvs.ssc.workbrain.punches.XMLGenerator.processFile(XMLGenerator.java:100)
2014.09.25 12:54:33.849 - 10 (WARNING) main:XMLGenerator.main - com.cvs.ssc.workbrain.punches.XMLGenerator.main(XMLGenerator.java:80)
12:54:33 | 704536 | 0 | midp010d_punches_process.sh | 27 | com.cvs.ssc.workbrain.punches.XMLGenerator JOB FAILED. Job Return Code: [16].
Ran with CLASSPATH[:/usr/local/apps/workbrain/etc:/usr/local/apps/workbrain/lib/ssc_workbrain.jar:/usr/local/apps/workbrain/lib/jtpe_cor.jar:/usr/local/apps/workbrain/lib/componts.jar:/usr/local/apps/workbrain/lib/cvsimage.jar:/usr/local/apps/workbrain/lib/utils.jar:/usr/local/apps/workbrain/lib/xalan.jar:/usr/local/apps/workbrain/lib/xerces.jar:/usr/local/apps/workbrain/lib/xml-apis.jar]
+ statusCode=16

Please help what could be the problem .


Moderator's Comments:
Mod Comment Please wrap CODE tags around code, files, input & output/errors.
It makes them far easier to read and preserves the spacing

Last edited by rbatte1; 09-26-2014 at 01:24 PM.. Reason: Added CODE tags
 

6 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

HP-UX 10.2 servers interoperability with IBM mass storage devices

Does anyone have succesfully interconnected HP-UX 10.2 HP 9000 K370 servers with A6885A HBA's, with an IBM Fastt storage server? I need to replace integrate both platforms. Interoperability matrices from manufacturers do not certified such integration. Thanks for anybody's help. (0 Replies)
Discussion started by: raltmannr
0 Replies

2. UNIX for Dummies Questions & Answers

running command prompt executable file in shell script

hi i have file extentioned with test.vbs. i am able to run this file n execute through command promt but i dont know how to run in shell script example: file name is test.vbs which contains strSoundFile = "C:\windows\Media\Notify.wav" Set objShell = CreateObject("Wscript.Shell") strCommand... (5 Replies)
Discussion started by: atl@mav
5 Replies

3. Shell Programming and Scripting

convert shell script into a binary executable

Hello every one, i want to convert my shell script into a binary executable a .exe file , is it possible to do that if so are there any tools . Would the script take off when the arguments are parsed. Thanks Venu (13 Replies)
Discussion started by: venu
13 Replies

4. AIX

IBM Servers Documentation

Hello dear friends, I wanrt to document our servers configuration but have no Idea which softweare should I use for documenting server environment.. maybe anyone can suggest me which software should I use.. thanks in Advance (2 Replies)
Discussion started by: Vit0_Corleone
2 Replies

5. Shell Programming and Scripting

Issue while executing C executable with argument in shell script

Hi All, I am new to this forum and also shell script :) My task is I have to read CSV file get the data from the file and use the data to call c executable with data as argument.And the output from c executable should be stored to new CSV file Please find below my code testfunction() {... (14 Replies)
Discussion started by: ravjot28
14 Replies

6. Shell Programming and Scripting

Shell script to encrypt the xls file using executable jar in Linux SUSE 11.4

Dear Experts, I am an ERP consultant and would like to learn shell script. We are working on Linux SUSE 11.4 and I am very new to shell scripting. We can manually encrypt an excel file using "executable jar" through command prompt by placing the jar file & the file to be encrypted on a physical... (1 Reply)
Discussion started by: nithin226
1 Replies
All times are GMT -4. The time now is 01:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy