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.

Apache's JIRA Issue Tracker | Aaron Zeckoski | 7 years ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    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

    Apache's JIRA Issue Tracker | 7 years ago | Aaron Zeckoski
    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.
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    How to parse XML SOAP element from SOAP response as an object?

    Stack Overflow | 1 year ago | syam houng
    javax.xml.stream.XMLStreamException: java.net.MalformedURLException: no protocol: %3C?xml%20version=%221.0%22%20encoding=%22UTF-8%22?%3E%3Csoap:Envelope%20xmlns:soap=%22http://schemas.xmlsoap.org/soap/envelope/%22%20xmlns:xsi=%22http://www.w3.org/2001/XMLSchema-instance%22%20xmlns:xsd=%22http://www.w3.org/2001/XMLSchema%22%3E%3Csoap:Body%3E%3CVerifyEmailResponse%20xmlns=%22http://ws.cdyne.com/%22%3E%3CVerifyEmailResult%3E%3CResponseText%3EUser%20Not%20Found%3C/ResponseText%3E%3CResponseCode%3E4%3C/ResponseCode%3E%3CLastMailServer%3Egmail-smtp-in.l.google.com%3C/LastMailServer%3E%3CGoodEmail%3Efalse%3C/GoodEmail%3E%3C/VerifyEmailResult%3E%3C/VerifyEmailResponse%3E%3C/soap:Body%3E%3C/soap:Envelope%3E Response SOAP Message = at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.setInputSource(XMLStreamReaderImpl.java:217)

    3 unregistered visitors

    Root Cause Analysis

    1. java.net.MalformedURLException

      No message provided

      at java.net.URL.<init>()
    2. Java RT
      XMLInputFactoryImpl.createXMLStreamReader
      1. java.net.URL.<init>(URL.java:601)
      2. java.net.URL.<init>(URL.java:464)
      3. java.net.URL.<init>(URL.java:413)
      4. com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:650)
      5. com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:1315)
      6. com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDocumentEntity(XMLEntityManager.java:1267)
      7. com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.setInputSource(XMLDocumentScannerImpl.java:281)
      8. com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.setInputSource(XMLStreamReaderImpl.java:204)
      9. com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.<init>(XMLStreamReaderImpl.java:189)
      10. com.sun.xml.internal.stream.XMLInputFactoryImpl.createXMLStreamReader(XMLInputFactoryImpl.java:145)
      10 frames
    3. Apache CXF Core
      TunedDocumentLoader.loadDocument
      1. org.apache.cxf.staxutils.StaxUtils.createXMLStreamReader(StaxUtils.java:940)
      2. org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:357)
      3. org.apache.cxf.bus.spring.TunedDocumentLoader.loadDocument(TunedDocumentLoader.java:113)
      3 frames
    4. Spring Beans
      XmlBeanDefinitionReader.doLoadBeanDefinitions
      1. org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
      1 frame
    5. Apache CXF Core
      ControlledValidationXmlBeanDefinitionReader.doLoadBeanDefinitions
      1. org.apache.cxf.bus.spring.ControlledValidationXmlBeanDefinitionReader.doLoadBeanDefinitions(ControlledValidationXmlBeanDefinitionReader.java:109)
      1 frame
    6. Spring Beans
      XmlBeanDefinitionReader.loadBeanDefinitions
      1. org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
      1 frame
    7. Apache CXF Core
      ControlledValidationXmlBeanDefinitionReader.loadBeanDefinitions
      1. org.apache.cxf.bus.spring.ControlledValidationXmlBeanDefinitionReader.loadBeanDefinitions(ControlledValidationXmlBeanDefinitionReader.java:131)
      1 frame
    8. Spring Beans
      AbstractBeanDefinitionReader.loadBeanDefinitions
      1. org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
      2. org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
      2 frames
    9. Spring Context
      AbstractXmlApplicationContext.loadBeanDefinitions
      1. org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:109)
      1 frame
    10. Apache CXF Core
      BusApplicationContext.loadBeanDefinitions
      1. org.apache.cxf.bus.spring.BusApplicationContext.loadBeanDefinitions(BusApplicationContext.java:263)
      1 frame
    11. Spring Context
      AbstractApplicationContext.refresh
      1. org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
      2. org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)
      3. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
      3 frames
    12. Apache CXF Core
      AbstractEndpointFactory.getBus
      1. org.apache.cxf.bus.spring.BusApplicationContext.<init>(BusApplicationContext.java:91)
      2. org.apache.cxf.bus.spring.SpringBusFactory.createApplicationContext(SpringBusFactory.java:102)
      3. org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:93)
      4. org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:86)
      5. org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:64)
      6. org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:53)
      7. org.apache.cxf.BusFactory.getDefaultBus(BusFactory.java:69)
      8. org.apache.cxf.BusFactory.getThreadDefaultBus(BusFactory.java:106)
      9. org.apache.cxf.BusFactory.getThreadDefaultBus(BusFactory.java:97)
      10. org.apache.cxf.endpoint.AbstractEndpointFactory.getBus(AbstractEndpointFactory.java:73)
      10 frames
    13. Apache CXF Runtime Simple Frontend
      ServerFactoryBean.create
      1. org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.initializeServiceFactory(AbstractWSDLBasedEndpointFactory.java:231)
      2. org.apache.cxf.frontend.ServerFactoryBean.initializeServiceFactory(ServerFactoryBean.java:164)
      3. org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:100)
      4. org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:118)
      4 frames
    14. org.apache.cxf
      Activator.start
      1. org.apache.cxf.dosgi.dsw.handlers.HttpServiceConfigurationTypeHandler.createServer(HttpServiceConfigurationTypeHandler.java:124)
      2. org.apache.cxf.dosgi.dsw.hooks.ServiceHookUtils.createServer(ServiceHookUtils.java:86)
      3. org.apache.cxf.dosgi.dsw.hooks.CxfPublishHook.createServer(CxfPublishHook.java:106)
      4. org.apache.cxf.dosgi.dsw.hooks.CxfPublishHook.publishEndpoint(CxfPublishHook.java:80)
      5. org.apache.cxf.dosgi.dsw.Activator.checkExistingServices(Activator.java:151)
      6. org.apache.cxf.dosgi.dsw.Activator.start(Activator.java:81)
      6 frames
    15. Apache Felix Framework
      StartLevelImpl.run
      1. org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:667)
      2. org.apache.felix.framework.Felix.activateBundle(Felix.java:1699)
      3. org.apache.felix.framework.Felix.startBundle(Felix.java:1621)
      4. org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1076)
      5. org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
      5 frames
    16. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:637)
      1 frame