How to enable the Java verbose class logging option for RSA Identity Governance & Lifecycle
2 years ago
Originally Published: 2021-11-22
Article Number
000063613
Applies To
RSA Product Set: RSA Identity Governance & Lifecycle
RSA Version/Condition: 7.2.1, 7.5.0
 
Issue

The RSA Identity Governance & Lifecycle product displays a java.lang.NoClassDefFoundError.  This error may occur in any of the log files including but not limited to aveksaServer.log file, stdout.log file, or one of the AFX log files.

The error message will list the class that is not found in a message similar (but not necessarily exactly the same) to the following:

Exception handling request to /aveksa/main: java.lang.NoClassDefFoundError: Could not initialize class net.sf.jasperreports.engine.util.JRStyledTextParser

This issue typically occurs when the Java classpath includes more than one jar file that contains similar classes but where one jar file is a different version of the other.  The error indicates that although the jar has been loaded, the particular class is not in the specific jar file that was loaded.  Since the Java classloader loads jars in the order the classes are requested it is possible for this issue to appear to occur intermittently depending on the order that classes are loaded.
Tasks

In order to troubleshoot this type of issue, it is often useful to enable the verbose class loading feature of Java.   This will display detailed information about each Java class that is loaded and the name of the jar file where the class was loaded from.

Warning:  The verbose Java class loading feature generates a large output and is very processor intensive. This should only be enabled for troubleshooting and should be disabled as soon as the artifacts are obtained. This is best done on a TEST system and not in PRODUCTION.

In order to enable the verbose class loading feature, you must modify the commands passed to Java on startup.  The file that must be edited to enable this feature depends on where the failure is occurring.
 

On 7.5.2 and later For the core ACM instance deployed on WildFly and Collectors: 
Under investigation: this feature is depricated.

  • Edit the file /etc/init.d/aveksa_server
  • Identify the following line in the file at (around) line number 515:
JAVA_OPTS="${JAVA_OPTS} -Djava.awt.headless=true"
  • Insert the following line immediately after the above line in the file:
JAVA_OPTS="$JAVA_OPTS -verbose:class"
 
  • Save the file and restart acm.
  • Recreate the situation (e.g., test the collector) that caused the error.
  • Examine the stdout.log file for the detailed verbose class loader information. This is included in the Log Artifacts or at a location similar (but not identical) to: /home/oracle/wildfly-10.1.0.Final/standalone/log/stdout.log
  • Compare and contrast to a working example.
  • This is an example of the detailed output:
[Loaded org.apache.xerces.impl.XMLEntityScanner$1 from jar:file:/home/oracle/wildfly/modules/system/layers/base/org/apache/xerces/main/xercesImpl-2.11.0.SP4.jar!/]



On 7.5.0 and earlier. For the core ACM instance deployed on WildFly and Collectors:

  • Edit the file /etc/init.d/aveksa_server
  • Identify the following line in the file at (around) line number 388:
JAVA_OPTS="$JAVA_OPTS -XX:+AlwaysPreTouch -XX:+UseG1GC -XX:+ExplicitGCInvokesConcurrent -XX:+ParallelRefProcEnabled -XX:+UseStringDeduplication"
  • Insert the following line immediately after the above line in the file:
JAVA_OPTS="$JAVA_OPTS -verbose:class"
  • Save the file and restart acm.
  • Recreate the situation (e.g., test the collector) that caused the error.
  • Examine the stdout.log file for the detailed verbose class loader information. This is included in the Log Artifacts or at a location similar (but not identical) to: /home/oracle/wildfly-10.1.0.Final/standalone/log/stdout.log
  • Compare and contrast to a working example.
  • This is an example of the detailed output:
[Loaded org.apache.xerces.impl.XMLEntityScanner$1 from jar:file:/home/oracle/wildfly/modules/system/layers/base/org/apache/xerces/main/xercesImpl-2.11.0.SP4.jar!/]


For AFX Connectors:

  • Edit the file /home/oracle/AFX/esb/conf/wrapper.conf 
  • Identify the following line in the file at (around) line number 24:
wrapper.java.additional.8=-Djdk.security.allowNonCaAnchor=true
  • Insert the following line immediately after the above line in the file. Use a number that is incremental to the last line in this section of the file.  For example, if the previous additional item was item #8, use item #9.
wrapper.java.additional.9=-verbose:class
  • Save the file and restart AFX Server.
  • Recreate the situation (e.g., test the connector) that caused the error.
  • Examine the following log file for the detailed verbose class loader information: /home/oracle/AFX/esb/logs/mule_ee.log
  • Compare and contrast to a working example.
  • This is an example of the detailed output:
[Loaded org.apache.cxf.configuration.spring.StringBeanDefinitionParser from file:/home/oracle/AFX/esb/lib/opt/cxf-core-3.3.0.jar]
  
Resolution
To resolve this issue you must identify the conflicting jar files that have different versions of the same java library and then remove the duplicate version. If the duplicate is between a customer supplied externally loaded jar file and an internal jar file inside the RSA Identity Governance & Lifecycle application, you should remove the external jar file. If the external jar file cannot be removed then you should open an RSA Customer Support Case and request assistance.