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
/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
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 .