2 Replies Latest reply: Feb 28, 2012 10:06 AM by Sanne Grinovero RSS

parsing jgroups.xml with open JDK8

craig bomba Novice

Has anyone tried to parse the jgroups.xml with open jdk 8? 

 

Getting the following exception:

 

  1. java.io.IOException: unexpected element (uri:"urn:infinispan:config:4.2", local:"property"). Expected elements are <{}entry>

        at org.infinispan.config.InfinispanConfiguration.newInfinispanConfiguration(InfinispanConfiguration.java:264)

        at org.infinispan.config.InfinispanConfiguration.newInfinispanConfiguration(InfinispanConfiguration.java:282)

        at org.infinispan.config.InfinispanConfiguration.newInfinispanConfiguration(InfinispanConfiguration.java:136)

        at org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:243)

        at org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:229)

        at TestJax.getCacheManager(TestJax.java:15)

        at TestJax.main(TestJax.java:31)

Caused by: javax.xml.bind.UnmarshalException: unexpected element (uri:"urn:infinispan:config:4.2", local:"property"). Expected elements are <{}entry>

        at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingContext.java:650)

        at com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:243)

        at com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:238)

        at com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChildElement(Loader.java:105)

        at com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader.childElement(Loader.java:90)

        at com.sun.xml.internal.bind.v2.runtime.property.SingleMapNodeProperty$1.childElement(SingleMapNodeProperty.java:180)

        at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(UnmarshallingContext.java:483)

        at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingContext.java:465)

        at com.sun.xml.internal.bind.v2.runtime.unmarshaller.ValidatingUnmarshaller.startElement(ValidatingUnmarshaller.java:87)

        at com.sun.xml.internal.bind.v2.runtime.unmarshaller.SAXConnector.startElement(SAXConnector.java:135)

        at org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:551)

        at org.infinispan.config.parsing.NamespaceFilter.startElement(NamespaceFilter.java:29)

        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:506)

        at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:182)

        at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:353)

        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2715)

        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:607)

        at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116)

        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:488)

        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:835)

        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)

        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)

        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1210)

        at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:357)

        at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:203)

        at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:175)

        at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:140)

        at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:123)

        at org.infinispan.config.InfinispanConfiguration.newInfinispanConfiguration(InfinispanConfiguration.java:256)

        ... 6 more

  • 1. Re: parsing jgroups.xml with open JDK8
    craig bomba Novice

    More details (and a bit of a correction as well).  The parsing error occured on the Infinispan xml and not the jgroups xml.  This was on 4.2.0.FINAL.  And, it seems the specific area of the xml that is causing an issue is with the property entries for the asyncTransportExecutor.  Here is a portion of that xml:

     

      <asyncTransportExecutor factory="org.infinispan.executors.DefaultExecutorFactory">
              <properties>
                        <property name="maxThreads" value="1"/>
                        <property name="threadNamePrefix" value="AsyncSerializationThread"/>
              </properties>
      </asyncTransportExecutor>
  • 2. Re: parsing jgroups.xml with open JDK8
    Sanne Grinovero Master

    Hi Craig,

    You mean a Infinispan configuration file right? Not JGroups ...

     

    Since Infinispan 5.1 we use a brand new configuration parser which avoids JAXB, and I don't think anyone tested 4.2 on JDK8, so if you need that JDK you should really move to latest versions.