cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

We are happy to announce the new Windchill Customization board! Learn more.

Loadfileset is not giving any exit code even if its failed while loading loadfiles or template

MaheshPawar
2-Guest

Loadfileset is not giving any exit code even if its failed while loading loadfiles or template

Hi,We are loading Loadfiles through "Loadfileset" using below command.

 

wt.load.LoadFileSet -file ${wt.home}${file.separator}src${file.separator}loadFiles${file.separator}template${file.separator}FileSet${file.separator}fileSet.xml -Unattended -u ${wt.user} -p ${wt.pass} -NoServerStop"/>

 

We are creating fileset.xml for loading the loadfiles.
Please check the below fileset.xml template

 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE loadFileList SYSTEM "/wt/load/windchillLoad.dtd">
-<loadFileList>
<loadFile filename="C:\ptc\Windchill_11.2\Windchill\src\loadFiles\template\NPD Template.xml"/>
</loadFileList>

 

We are using ANT for loading the loadfiles using ANT target

 

<target name="Loadtemplate" description="running LoadFromFile utility loads all files listed in LoadileList" if="checktemplate">
<echo>loading Template files</echo>
<exec failonerror="true" executable="${wt.bin}/windchill.exe">
<arg line="wt.load.LoadFileSet -file ${wt.home}${file.separator}src${file.separator}loadFiles${file.separator}template${file.separator}FileSet${file.separator}fileSet.xml -Unattended -u ${wt.user} -p ${wt.pass} -NoServerStop"/>
</exec>
<echo>end loading Template files</echo>
</target>

 

It is working as expected, but if something wrong with loadfile it is not giving any exit code because of that our tools (Jenkins,Azure pipeline) not able to detect the error and jobs are passing even if something wrong with the load file.

 

loadfile failed error log:

 

LoadService exception attempting import: java.lang.NullPointerException
2022-03-30T13:36:33.9410077Z [exec] An error occurred while importing data from the C:\ptc\Windchill_11.2\Windchill\src\loadFiles\template\NPD Template.jar file. The import processing stopped at line 1. Check the method server log for more information. Error loading data from file.
2022-03-30T13:36:33.9411091Z [exec] data file = <C:\ptc\Windchill_11.2\Windchill\src\loadFiles\template\NPD Template.jar,C:\ptc\Windchill_11.2\Windchill\src\loadFiles\template\NPD Template.jar>
2022-03-30T13:36:33.9411724Z [exec] map file = <C:\ptc\Windchill_11.2\Windchill\loadFiles\csvmapfile.txt,C:\ptc\Windchill_11.2\Windchill\loadFiles\csvmapfile.txt>
2022-03-30T13:36:33.9412172Z [exec] token separator = <,,,>
2022-03-30T13:36:33.9412458Z [exec] method = <create,create>
2022-03-30T13:36:33.9412820Z [exec] user = <***>
2022-03-30T13:36:33.9413144Z [exec] Command line = <{UAOps=-UAOps, NoServerStop=}>

 

When this error come script need to be give Exit code 1, but its not giving any exit code.
Could you please look into it and suggest the solution for giving exit code for the same.

0 REPLIES 0
Top Tags