# Google Analytics

ClassLoader error when importing or exporting BPMN diagrams with WebLogic

Compatible Application Servers

Oracle WebLogic Server is no longer supported as an application server for the iGrafx Platform as of version 17.7. Oracle WebLogic Server 12c does not support the 17.7 prerequisite of Java 11. Please note, even though Oracle WebLogic Server 14 is slated to support Java 11, the iGrafx Platform will no longer support any version of Oracle WebLogic Server as of version 17.7.

Problem

Under some circumstances, when importing or exporting a BPMN file using WebLogic, you may run into ClassLoader errors. You may get an error similar to:

ClassLoader error
2018-05-24 10:24:25 ERROR GlobalExceptionResolver - Handler dispatch 
failed; nested exception is java.lang.LinkageError: loader constraint 
violation in interface itable initialization: when resolving method 
"org.apache.xpath.jaxp.XPathImpl.getNamespaceContext()Ljavax/xml/namespace/NamespaceContext;"
 the class loader (instance of 
weblogic/utils/classloaders/ChangeAwareClassLoader) of the current 
class, org/apache/xpath/jaxp/XPathImpl, and the class loader (instance 
of <bootloader>) for interface javax/xml/xpath/XPath have 
different Class objects for the type 
javax/xml/namespace/NamespaceContext used in the signature

org.springframework.web.util.NestedServletException: Handler dispatch 
failed; nested exception is java.lang.LinkageError: loader constraint 
violation in interface itable initialization: when resolving method 
"org.apache.xpath.jaxp.XPathImpl.getNamespaceContext()Ljavax/xml/namespace/NamespaceContext;"
 the class loader (instance of 
weblogic/utils/classloaders/ChangeAwareClassLoader) of the current 
class, org/apache/xpath/jaxp/XPathImpl, and the class loader (instance 
of <bootloader>) for interface javax/xml/xpath/XPath have 
different Class objects for the type 
javax/xml/namespace/NamespaceContext used in the signature
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1006)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:925)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:974)
	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:866)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:851)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)

Solution

Because of the classloader issues the following files will need to be removed from the iGrafxWebApp.war file that is located inside the EAR file:

WEB-INF/lib/stax-api.jar