Hi All,
I have recently been moving a project of mine from local builds (windows) to Jenkins (ubuntu).
Everything builds fine on my local machine but when I try to build on Jenkins the build fails with the following diff in build-report.txt.
/dist/dojo/dojo.js:. OPTIMIZER FAILED: JavaException: java.lang.RuntimeException: Exception parsing "dojo.js.uncompressed.js"
I beleive this is the closure compiler having an exception:
Has anyone else had this issue?
Is there a way to get more verbose logging from the closure compiler?
Is the something else I may be able to do to find the cause of this issue?
Cheers,
Jethro
P.S. FYI
Jenkins:
ubuntu@ip-xxx-xx-x-xxx:~$ java -version
openjdk version "1.8.0_292"
OpenJDK Runtime Environment (build 1.8.0_292-8u292-b10-0ubuntu1~18.04-b10)
OpenJDK 64-Bit Server VM (build 25.292-b10, mixed mode)
ubuntu@ip-xxx-xx-x-xxx:~$ npm -v
7.15.1
ubuntu@ip-xxx-xx-x-xxx:~$ node -v
v16.2.0
Local:
C:\DEV2021\OctonionDojo>java -version
java version "1.8.0_241"
Java(TM) SE Runtime Environment (build 1.8.0_241-b07)
Java HotSpot(TM) 64-Bit Server VM (build 25.241-b07, mixed mode)
C:\DEV2021\OctonionDojo>npm -v
7.15.1
C:\DEV2021\OctonionDojo>node -v
v12.16.2
Solved! Go to Solution.
I added:
export _JAVA_OPTIONS=-Xmx2048m
to my build script and it seems to be working
My app is based off https://github.com/Esri/jsapi-resources/tree/master/4.x/amd/dojo
Hi @JethroLeevers since it is a parse error, one thing is to make sure you have this set: https://github.com/Esri/jsapi-resources/blob/master/4.x/amd/dojo/build.profile.js#L491
Yes, I already have these set
> Is there a way to get more verbose logging from the closure compiler?
Besides the build-report.txt, the regular console output can sometimes show more details.
Since the only difference appears to be the OS, try to look for any issues like paths used in Windows vs. Linux.
Digging furthur into this issue, the problem seems to be related to the jvm heap size being exceeded when processing dojo.js.uncompressed.js
That being said, is there a way to control the jvm stack size from the build scripts or should I be looking at a build environment setting?
I added:
export _JAVA_OPTIONS=-Xmx2048m
to my build script and it seems to be working