Clarity PPM hits java.lang.ArrayIndexOutOfBoundsException: Index 2048 out of bounds
searchcancel
Clarity PPM hits java.lang.ArrayIndexOutOfBoundsException: Index 2048 out of bounds
book
Article ID: 199872
calendar_today
Updated On: 07-01-2024
Products
Clarity PPM On PremiseClarity PPM SaaS
Issue/Introduction
Clarity Error java.lang.ArrayIndexOutOfBoundsException: Index 2048 out of bounds for length 2048
thrown during upgrade or
during service deploy
Error in logs example:
9/14/20 10:44 AM (ExecTask) Copying 10 files to d:\clarity\tomcat-app-deploy\conf 9/14/20 10:44 AM (ExecTask) java.lang.ArrayIndexOutOfBoundsException: Index 2048 out of bounds for length 2048 9/14/20 10:44 AM (ExecTask) at org.apache.xerces.impl.XMLEntityScanner.skipSpaces(Unknown Source) 9/14/20 10:44 AM (ExecTask) at org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dispatch(Unknown Source) 9/14/20 10:44 AM (ExecTask) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) 9/14/20 10:44 AM (ExecTask) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) 9/14/20 10:44 AM (ExecTask) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) 9/14/20 10:44 AM (ExecTask) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) 9/14/20 10:44 AM (ExecTask) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) 9/14/20 10:44 AM (ExecTask) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) 9/14/20 10:44 AM (ExecTask) at org.jdom.input.SAXBuilder.build(SAXBuilder.java:453) 9/14/20 10:44 AM (ExecTask) at com.niku.tools.taskdefs.XPath.execute(XPath.java:385)
Environment
Release : Any
Cause
This is not a problem with a port, this is an old bug with XPath.
It can happen on any xml file, it's usually a rare occurrence
If the JVM parameter has additional parameter this can happen, default parameters are below
-Xms512m -Xmx2048m -XX:-UseGCOverheadLimit -DforceMemorySettings=false -XX:MaxMetaspaceSize=300m (memory sizing can be based on the environment but other parameters should be consistent)
Resolution
Determine which file causes the problem from the error stack
If the error is happening during service deploy, the file affected may be : deploy.xml or server.xml - this can be determined from the exact stack trace of the error and the line number
For error during upgrade it's typically properties.xml file
Once you determine the file you could update the file to edit any value to bypass the error
Modify any value in the affected file to make sure it does not hit this exact size.
Virtually any change should work as long as the file size changes (comments etc).
Example: remove GC logging from JVM parameters in properties.xml or add any word in comments