Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

java.lang.ClassCastException: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl cannot be cast to javax.xml.parsers.DocumentBuilderFactory

Avatar

Level 1

Hi,

We are upgrading from LiveCycle 7 (I assume it's pre-ES) to ES4 (On Jboss AS 5) and only has a minimal time.

And we're having issues with

2014-10-02 08:10:50,110 ERROR [org.apache.axis.utils.XMLUtils] (http-0.0.0.0-80-1) Exception:

java.lang.ClassCastException: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl cannot be cast to javax.xml.parsers.DocumentBuilderFactory

  at javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown Source)

  at org.apache.axis.utils.XMLUtils.getDOMFactory(XMLUtils.java:221)

  at org.apache.axis.utils.XMLUtils.<clinit>(XMLUtils.java:83)

  at org.apache.axis.configuration.FileProvider.configureEngine(FileProvider.java:179)

  at org.apache.axis.AxisEngine.init(AxisEngine.java:172)

  at org.apache.axis.AxisEngine.<init>(AxisEngine.java:156)

  at org.apache.axis.client.AxisClient.<init>(AxisClient.java:52)

  at org.apache.axis.client.Service.getAxisClient(Service.java:104)

  at org.apache.axis.client.Service.<init>(Service.java:113)

  at org.apache.axis.client.Call.<init>(Call.java:344)

A solution that we found in the installation manual is caused by different version of xercesImpl with JBoss AS 5 and suppose to use classloader.

We use classloader as

<?xml version="1.0" encoding="UTF-8"?>

<classloading xmlns="urn:jboss:classloading:1.0"

name="FOFMS_MNT.war"

domain="FOFMS_MNT"

export-all="NON_EMPTY"

import-all="true">

</classloading>

and now we're getting

(http-0.0.0.0-80-1) FormRenderObject: urlSpec = contentrooturi=file:///D:/FOFMS_Form_Templates/MNT_FormTemplates&applicationwebroot=http://desphapp044.development.local:80/FOFMS_MNT&baseurl=file:///D:/FOFMS_Form_Templates/MNT_FormTe... Form&FormTemplate=Base_Review_Template.xdp&FormFormat=PDFForm&FormVersion=1.6

2014-10-02 11:12:23,466 ERROR [STDERR] (http-0.0.0.0-80-1) com.adobe.livecycle.formsservice.exception.RenderFormException: ALC-DSC-099-000: com.adobe.idp.dsc.DSCRuntimeException: org.apache.axis.AxisFault: (404)Not Found

2014-10-02 11:12:23,466 ERROR [STDERR] (http-0.0.0.0-80-1) at com.adobe.livecycle.formsservice.client.FormsServiceClient.renderPDFForm(FormsServiceClient.java:272)

2014-10-02 11:12:23,466 ERROR [STDERR] (http-0.0.0.0-80-1) at com.indigo.FOFMS.FormRenderObject.getOutputContext(FormRenderObject.java:474)

2014-10-02 11:12:23,466 ERROR [STDERR] (http-0.0.0.0-80-1) at com.indigo.FOFMS.FormRenderObject.getOutputContext(FormRenderObject.java:239)

2014-10-02 11:12:23,466 ERROR [STDERR] (http-0.0.0.0-80-1) at com.indigo.FOFMS.FormRenderObject.render(FormRenderObject.java:114)

2014-10-02 11:12:23,466 ERROR [STDERR] (http-0.0.0.0-80-1) at com.indigo.FOFMS.GetForm.handleRequest(GetForm.java:106)

.

What's the correct way to resolve this issue? As without classloader we are getting the xercesImpl and xml-apis conflict which we need both of them. Thus xercesImpl is removed from the lib.

thanks

yodeny

3 Replies

Avatar

Employee Advisor

Test your form using Forms IVS to make sure there are no server side rendering issues : Forms IVS – A Form-tastic Development and Testing Tool

Also, make sure all the required client jar are included in the WAR lib.

-Wasil

Avatar

Level 1

Hi Wasil,

Thanks so much for this info. I've been looking for a tool to test the server that they just installed. I'll definitely try this when I'm back to the office.

On other side, all the required jars are already in the WAR lib. Except that I can't include the xercesImpl.jar as it causes conflict the xml-apis.jar (which is more needed, and xml-apis also bundled with xerces classes).

I'm using SOAP to connect to the server:

es4prop.setProperty(ServiceClientFactoryProperties.DSC_DEFAULT_SOAP_ENDPOINT, serverurl);

es4prop.setProperty(ServiceClientFactoryProperties.DSC_TRANSPORT_PROTOCOL,ServiceClientFactoryProperties.DSC_SOAP_PROTOCOL);          

es4prop.setProperty(ServiceClientFactoryProperties.DSC_SERVER_TYPE,serverType);

es4prop.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_USERNAME, username);

es4prop.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_PASSWORD, password);

I don't quite understand the error log, but I don't think this 404 caused by SOAP connection issue though.

I'm thinking the error caused by the classloader failed to load the lib from the custom context and I'm trying to find a way to test it.

I'll definitely test the the FORM IVS to make sure the server indeed correctly installed.

Kind regards,

yodeny

Avatar

Level 1

Hi Wasil,

The IVS really helpful tool for me to test the integrity of the server installed as well as showing the connection details used.

I can straightly point out the wrong connection detail provided.

All is good, the classloader working fine and I'm able to make connection with the correct connection string and we have form rendered correctly.

Thanks again,

yodeny