XML Export Error
Summary
This error is shown because there is a missing argument within the JavaAgent arguments which can be found within the setenv.sh file. This missing argument will cause specific features to fail as JEMH is unable to create a serialise the Profile whilst saving and exporting the Profile.
Error message:
The missing argument (com.sun.xml.bind
) causes the below error message to be shown when attempting to create, export, delete and save a Profile.
java.lang.NoClassDefFoundError: com/sun/xml/bind/DatatypeConverterImpl
at com.javahollic.jira.emh.api.export.beans.ProfileBean_JaxbXducedAccessor_version.print(TransducedAccessor_method_Integer.java:68) [?:?]
at com.javahollic.jira.emh.api.export.beans.ProfileBean_JaxbXducedAccessor_version.print(TransducedAccessor_method_Integer.java:66) [?:?]
at com.sun.xml.bind.v2.runtime.property.AttributeProperty.serializeAttributes(AttributeProperty.java:101) [jaxb-impl-2.3.0.jar:2.3.0]
at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeAttributes(ClassBeanInfoImpl.java:383) [jaxb-impl-2.3.0.jar:2.3.0]
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsSoleContent(XMLSerializer.java:591) [jaxb-impl-2.3.0.jar:2.3.0]
at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeRoot(ClassBeanInfoImpl.java:341) [jaxb-impl-2.3.0.jar:2.3.0]
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.java:494) [jaxb-impl-2.3.0.jar:2.3.0]
at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:328) [jaxb-impl-2.3.0.jar:2.3.0]
at com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:256) [jaxb-impl-2.3.0.jar:2.3.0]
at javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:131) [jaxb-api-2.3.0.jar:2.3.0]
Solution:
The solution is to add
com.sun.xml.bind
to the list of JavaAgent arguments which are defined within the setenv.sh file.You may also need to change
-Datlassian.org.osgi.framework.bootdelegation
as this is a unsupported argument and is known to stop scripting features from working. This would need to be change the following supported argument-Datlassian.org.osgi.framework.bootdelegation.extra
. More information about this can be found on the following page: Install a Scripting runtime Engine (Nashorn, Groovy, Graal) | Compatibility with JavaAgent:
Below is a fully working list of arguments that is used with the AppDynamics JavaAgent.
JVM_SUPPORT_RECOMMENDED_ARGS="-Datlassian.org.osgi.framework.bootdelegation.extra=META-INF.services,com.yourkit,jdk.internal.reflect,jdk.internal.reflect.*,com.singularity.*,com.jprofiler,com.jprofiler.*,org.apache.xerces,org.apache.xerces.*,org.apache.xalan,org.apache.xalan.*,sun.*,com.sun.jndi,com.icl.saxon,com.icl.saxon.*,javax.servlet,javax.servlet.*,com.sun.xml.bind,com.sun.xml.bind.*"