I was using gradle 1.7. Now to support java 11, I have moved to Gradle 6.1.1.
After building the jar, when I run the jar, I get below exception.
Let me tell you, the file “com.ptc.windchill.install.framework.frameworkResource” is present in the jar file which I am executing.
java.util.MissingResourceException: Can’t find resource for bundle com.ptc.windchill.install.framework.frameworkResource_en, key 1
java.util.MissingResourceException: Can’t find resource for bundle com.ptc.windchill.install.framework.frameworkResource_en, key 1
at java.base/java.util.ResourceBundle.getObject(ResourceBundle.java:564)
at java.base/java.util.ResourceBundle.getString(ResourceBundle.java:521)
<<<<<<<<<<<<<<<<<<
The build,gradle file is as follows. The “com.ptc.windchill.install.framework.frameworkResource” file is present in InstallerSupport.jar file.
=============================================================
println “Project directory name: $name”
FileCollection ia_task_lib = files( “$install_anywhere_home/resource/build/iaant.jar” )
FileCollection runtime_inclusions = files ( “$rootDir/…/lib/log4j.jar”,
“$rootDir/…/lib/CommonCore.jar”,
“$rootDir/…/lib/InstallerSupport.jar”,
“$rootDir/…/lib/InstallUtil.jar”,
“$rootDir/…/lib/mksapi.jar”,
“$rootDir/…/lib/com.dynatrace.diagnostics.sdk.jar”,
“$rootDir/…/lib/OracleThinDrivers.jar”,
“$rootDir/…/lib/sqljdbc4.jar”,
“$rootDir/…/lib/ucp.jar”,
“$rootDir/…/lib/WtLogR.jar”,
“$rootDir/…/lib/PSMJavaValidation.jar”,
“$rootDir/…/lib/json-20160212.jar”,
“$rootDir/…/lib/jackson-databind-2.6.1.jar”)
configurations {
antcp
inclusionary
}
dependencies {
compile project(‘:PSMInstallationBundle’)
compile project(‘:PAAgentConfig’)
antcp ia_task_lib
inclusionary runtime_inclusions
testCompile files(
“$rootDir/…/lib/PAAgentConfig/testng-6.9.10.jar”,
“$rootDir/…/lib/PAAgentConfig/jcommander-1.48.jar”)
}
jar {
dependsOn configurations.inclusionary
from { configurations.inclusionary.collect { it.isDirectory() ? it : zipTree(it) } }
}
task ia_builder(type:Exec) {
workingDir “$projectDir”
//on windows:
commandLine “$install_anywhere_home/build.exe”, “$projectDir/PSM_IA.iap_xml”, ‘-all’
//store the output instead of printing to the console:
standardOutput = new ByteArrayOutputStream()
//extension method stopTomcat.output() can be used to obtain the output:
ext.output = {
return standardOutput.toString()
}
}
Could you please suggest what might be going wrong.
Thanks,
Anirudha