Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-2447

Invalid paths used in CXF for the xml files results in failures in java 6

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.3
    • 2.1.7, 2.2.4
    • Configuration, Core
    • None
    • Moderate

    Description

      CXF 2.3.0-SNAPSHOT is failing to parse xml files in java 6. Things work fine for java 5. The error we see on startup of any bundles which use CXF is:

      [FelixStartLevel] WARN org.apache.cxf.bus.spring.SpringBusFactory - Initial attempt to crate application context was unsuccessful.
      org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [META-INF/cxf/cxf.xml]; nested exception is java.lang.RuntimeException: Couldn't parse stream.
      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:420)
      at org.apache.cxf.bus.spring.ControlledValidationXmlBeanDefinitionReader.doLoadBeanDefinitions(ControlledValidationXmlBeanDefinitionReader.java:109)
      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
      at org.apache.cxf.bus.spring.ControlledValidationXmlBeanDefinitionReader.loadBeanDefinitions(ControlledValidationXmlBeanDefinitionReader.java:131)
      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
      at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
      at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:109)
      at org.apache.cxf.bus.spring.BusApplicationContext.loadBeanDefinitions(BusApplicationContext.java:263)
      at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
      at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
      at org.apache.cxf.bus.spring.BusApplicationContext.<init>(BusApplicationContext.java:91)
      at org.apache.cxf.bus.spring.SpringBusFactory.createApplicationContext(SpringBusFactory.java:102)
      at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:93)
      at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:86)
      at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:64)
      at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:53)
      at org.apache.cxf.BusFactory.getDefaultBus(BusFactory.java:69)
      at org.apache.cxf.BusFactory.getThreadDefaultBus(BusFactory.java:106)
      at org.apache.cxf.BusFactory.getThreadDefaultBus(BusFactory.java:97)
      at org.apache.cxf.endpoint.AbstractEndpointFactory.getBus(AbstractEndpointFactory.java:73)
      at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.initializeServiceFactory(AbstractWSDLBasedEndpointFactory.java:231)
      at org.apache.cxf.frontend.ServerFactoryBean.initializeServiceFactory(ServerFactoryBean.java:164)
      at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:100)
      at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:118)
      at org.apache.cxf.dosgi.dsw.handlers.HttpServiceConfigurationTypeHandler.createServer(HttpServiceConfigurationTypeHandler.java:124)
      at org.apache.cxf.dosgi.dsw.hooks.ServiceHookUtils.createServer(ServiceHookUtils.java:86)
      at org.apache.cxf.dosgi.dsw.hooks.CxfPublishHook.createServer(CxfPublishHook.java:106)
      at org.apache.cxf.dosgi.dsw.hooks.CxfPublishHook.publishEndpoint(CxfPublishHook.java:80)
      at org.apache.cxf.dosgi.dsw.Activator.checkExistingServices(Activator.java:151)
      at org.apache.cxf.dosgi.dsw.Activator.start(Activator.java:81)
      at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:667)
      at org.apache.felix.framework.Felix.activateBundle(Felix.java:1699)
      at org.apache.felix.framework.Felix.startBundle(Felix.java:1621)
      at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1076)
      at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
      at java.lang.Thread.run(Thread.java:637)
      Caused by: java.lang.RuntimeException: Couldn't parse stream.
      at org.apache.cxf.staxutils.StaxUtils.createXMLStreamReader(StaxUtils.java:945)
      at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:357)
      at org.apache.cxf.bus.spring.TunedDocumentLoader.loadDocument(TunedDocumentLoader.java:113)
      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
      ... 36 more
      Caused by: javax.xml.stream.XMLStreamException: java.net.MalformedURLException
      at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.setInputSource(XMLStreamReaderImpl.java:217)
      at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.<init>(XMLStreamReaderImpl.java:189)
      at com.sun.xml.internal.stream.XMLInputFactoryImpl.createXMLStreamReader(XMLInputFactoryImpl.java:145)
      at org.apache.cxf.staxutils.StaxUtils.createXMLStreamReader(StaxUtils.java:940)
      ... 39 more
      Caused by: java.net.MalformedURLException
      at java.net.URL.<init>(URL.java:601)
      at java.net.URL.<init>(URL.java:464)
      at java.net.URL.<init>(URL.java:413)
      at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:650)
      at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:1315)
      at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDocumentEntity(XMLEntityManager.java:1267)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.setInputSource(XMLDocumentScannerImpl.java:281)
      at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.setInputSource(XMLStreamReaderImpl.java:204)
      ... 42 more

      Attachments

        Activity

          People

            dkulp Daniel Kulp
            azeckoski Aaron Zeckoski
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: