We have an event listener that listens to a xml file created under a folder. JAXB is used to convert that XML to a class. It keeps failing with error
s/metadata/95308.xml] org.apache.sling.commons.classloader.impl.ClassLoaderFacade Dynamic class loader has already been deactivated.
08.01.2016 14:02:10.538 *ERROR* [JobHandler: /etc/workflow/instances/2016-01-08/model_5139962994559875:/content/imf/boarddocuments/metadata/95308.xml] org.apache.sling.commons.classloader.impl.ClassLoaderFacade Dynamic class loader has already been deactivated.
08.01.2016 14:02:10.538 *ERROR* [JobHandler: /etc/workflow/instances/2016-01-08/model_5139962994559875:/content/imf/boarddocuments/metadata/95308.xml] org.imf.imfconnect.tgs.workflow.BoardDocumentsProcessorV2 Board document import job failed. Metadata Path = /content/imf/boarddocuments/metadata/95308.xml, Document Path = , Exception = null javax.xml.bind.JAXBException
- with linked exception:
[java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory]
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:227)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:445)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:637)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:584)
at org.imf.imfconnect.tgs.workflow.BoardDocumentsProcessorV2.execute(BoardDocumentsProcessorV2.java:111)
where line 111 is the line where we are parsing into the class.
Funny thing is, next time it's run, it works. But then we have to manually recreate the xml.
Any ideas? We need a resolution fairly urgently. I read a similar thread that this has been fixed in AEM 6.0 SP1 here.
http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manage...
we have 5.6.1. How can this be fixed???
------------------------------
logger.info("Processing XML : "+path);
metadataPath = path;
adminResolver = resolverFactory.getAdministrativeResourceResolver(null);
adminSession = adminResolver.adaptTo(Session.class);
Node ntFileNode = adminResolver.getResource(path).adaptTo(Node.class);
Node ntResourceNode = ntFileNode.getNode(JcrConstants.JCR_CONTENT);
is = ntResourceNode.getProperty(JcrConstants.JCR_DATA).getBinary().getStream();
JAXBContext jaxbContext = JAXBContext.newInstance(BoardDocuments.class);
Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller();