-
1. Re: Custom XML External Entities
cfang Sep 1, 2016 6:34 PM (in response to richardmoore)[JBERET-139] Implement XMLResolver for Job XML parsing - JBoss Issue Tracker
Just remove aalto.jar from your classpath, and let JBeret use the default xml parser in Java SE.
Or you can use woodstox xml parser, which is also from com.fasterxml (the same org as aalto xml ).
-
2. Re: Custom XML External Entities
richardmoore Sep 2, 2016 10:24 AM (in response to cfang)I got past the first exception with the removal of the aalto jar but now I am getting -
Exception in thread "main" java.lang.NullPointerException
at com.sun.xml.internal.stream.StaxEntityResolverWrapper.resolveEntity(StaxEntityResolverWrapper.java:62)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.resolveEntityAsPerStax(XMLEntityManager.java:990)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:1213)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEntityReference(XMLDocumentFragmentScannerImpl.java:1909)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3064)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:118)
at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(XMLStreamReaderImpl.java:553)
at org.jberet.job.model.JobParser.parseStep(JobParser.java:164)
at org.jberet.job.model.JobParser.parseJob(JobParser.java:75)
at com.awginc.batch.JobAuditor.<init>(JobAuditor.java:21)
at com.awginc.batch.JobAuditor.main(JobAuditor.java:14)
-
3. Re: Custom XML External Entities
cfang Sep 2, 2016 10:45 AM (in response to richardmoore)1 of 1 people found this helpfulthe above test class does the similar as you would: load a job and verify certain elements. It also uses external entities to hold common segments. It calls ArchiveXmlLoader.loadJobXml(...) to load the job.xml, which is at a higher lever than JobParser.