powershell java invalid thread stack size error -
i'm tasked converting windows scripts powershell versions. conversion going except minor issues. top issue involves java call use query database , generate xml or html files. when run windows script no problem:
java -xss1m -cp ../lib/;../lib/jtds-1.3.1.jar;../lib/ojdbc6.jar dbdownloader tmpdbname ../sql/mtd_mttr_detail_v7.sql ../out/drilldown/%filename1% >> ..\logs\mtd.log 2>&1
but when run powershell script error:
lastexitcode:1 error: not create java virtual machine. error: fatal exception has occurred. program exit. invalid thread stack size: -xss1m -cp
the call made using & call operator. wrote library function script use , make call similar following:
*$output = [string] (& $jvapp $jvarg1 $jvarg2 $jvarg3 $dbarg $sqlarg $lastarg >> $logarg 2>&1)
the args call following:
sqlname: mtd_mttr_detail_v7
jvarg1: -xss1m -cp
jvarg2: ../lib/;../lib/jtds-1.3.1.jar;../lib/ojdbc6.jar
jvarg3: dbdownloader
dbarg: tmpdbname
sqlarg: ..\sql\mtd_mttr_detail_v7.sql
lastarg: ..\out\drilldown\mtd_mttr_detail.xml
logarg: ..\logs\mtd.log
i set these environment variables:
env:path: c:\program files\java\jre8\bin;...
env:java_home: c:\program files\java\jre8\;
env:classpath: c:\program files\java\jre8\lib;
what weird call work , produce xml or html file if take out stack size argument. i've tried several smaller stack size settings down 128k no luck.
while call works without setting, i'm concerned may fail in future. believe put due complex sql statement used large amounts of data querying , processing.
any ideas?
solved: when split 2 args in jvarg1 2 different variables java call worked no stack size error. guess java reading first arg 1 big string , space in between didn't matter. must have thought -cp part of stack size argument.
Comments
Post a Comment