java - Configuring MOXy's @XmlPath with XML containing CDATA -


I am trying to map an XML document using XPath. But when the XML includes a CDATA tag, it has to be faced. Example:

    

I am using eclipselink-2.3.0 jar to get XPath mapping in my application. And JACAB I am creating a jaxb.properties file to use this implementation, which has the following:

  javax.xml.bind.context.factory = org .eclipse Persistence.jaxb.JAXBContextFactory   

XPath works only this way, otherwise the application annotation also does not raise @XmlPath .

Now while running and via XML and UnmashSherty method it throws a blank pointer error:

  java .lang.NullPointerException at org.eclipse.preistence oxm.record.UnmarshalRecord.startCDATA (UnmarshalRecord.java:1035) on org.eclipse.persistence.internal.oxm.record.XMLReader $ LexicalHandlerWrapper.startCDATA (XMLReader.java:226) on com.sun.org.apache.xerces. On internal.parsers.AbstractSAXParser.startCDATA com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument (XMLDocumentFragmentScannerImpl.java:487) (AbstractSAXParser.java:625) on com.sun.org.apache.xerces. Internal. On parsers.XML11Configuration.parse com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse (XML11Configuration.java:808) (XML11Configuration.java:737) on com.sun.org.apache.xerces.internal. Parsers.xmlParser.parse com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse at (XMLParser.java:119) (AbstractSAXParser.java:1205) com.sun.org.apache.xerces.internal. ORG on Jaxp.SAXParserImpl $ JAXPSAXParser.parse (SAXParserImpl.java) 226 at weblogic.xml.jaxp.WebLogicXMLReader.parse (webLogicXMLReader.java:133) weblogic.xml.jaxp.RegistryXMLReader.parse (RegistryXMLReader.java:173) on eclipse.persistence.internal.oxm.record.XMLReader.parse org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal (SAXUnmarshaller.java:713) (XMLReader.java:147) on org.eclipse.persistence. on internal.oxm.record.SAXUnmarshaller.unmarshal org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal (SAXUnmarshaller.java:260) (SAXUnmarshaller.java:286) Ernal.oxm on org.eclipse.persistence.int .record.SAXUnmarshaller.unmarshal (SAXUnmarshaller.java:505) org.eclipse.persistence.oxm.xmlUnmarshaller.unmarshal at (XMLUnmarshaller.java:594) org.eclipse.persistence.jaxb.JAXBUnmarshaller.unmarshal (JAXBUnmarshaller.java: 26 9) at com.jbhunt.lib.mgintegrationutils.utils.JAXBUtils.unmarshal (JAXBUtils.java:67) Com.jbhunt.biz.mgarListener.mq.converter.MgarListenerMQMessageParser.getMasterARStagingVo at (MgarListenerMQMessageParser.java:51) com on .jbhunt.biz.mgarListener.mq.MgarListenerMessageConsumerImpl.onMessage com.jbhunt.biz.mgarListener.mq.JMSMessageProcessor.receiveAndProcessMessage (JMSMessageProcessor.java:106) mail com.jbhunt.Maj.MgarListener.mq.J on com.jbhunt.biz.mgarListener.thread (MgarListenerMessageConsumerImpl.java:62) on Java.lang.Thread.run (Thredkjawa : 662) Message on    

UPDATE

Hi Blaze, I updated the eclipse version to 2.4.1 And this CDATA issue I was facing now it's all good.

I am glad that everything is working now. Below is an article about what's new in MOXy in Eclipse Linked 2.4:


  • Since you have Eclipse Linki 2.3.0 You are using, I believe that you kill the following bug which was corrected in Eclipse Link 2.3.1.

  • EclipseLink is currently at version 2.4.1, I recommend upgrading to it if you can:



Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -