Announcement Announcement Module
Collapse
No announcement yet.
Error creating bean 'org.springframework.xml.xsd.commons.CommonsXsdSch emaCollection' Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error creating bean 'org.springframework.xml.xsd.commons.CommonsXsdSch emaCollection'

    Hi,

    I was trying to deploy the the sample code "echo" service given in the Spring-WS 2.1.2 release.

    The spring-ws.xml has the below configuration to create dynamic wsdl

    <sws:dynamic-wsdl id="echo" portTypeName="echo" locationUri="/echo/" targetNamespace="http://www.springframework.org/spring-ws/samples/echo">
    <sws:xsd location="/WEB-INF/echo.xsd"/>
    </sws:dynamic-wsdl>

    The code gets deplyed successfully on WAS 7 but when I hit the wsdl URL the below errors are thrown.
    WSDL URL which I am using : http://localhost:9080/echo/echo.wsdl

    I tried adding xmlschema-core-sources.jar to solve the below error, but it doesn't get solved.

    Could you please help me with the below error?

    3/21/13 17:26:03:531 IST] 0000001f MessageDispat E org.springframework.web.servlet.FrameworkServlet initServletBean Context initialization failed
    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.springframework.xml.xsd.commons.CommonsXsdSch emaCollection#0': Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org/apache/ws/commons/schema/XmlSchemaCollection.read(Lorg/xml/sax/InputSourceLorg/apache/ws/commons/schema/XmlSchema;
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1420)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:519)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:456)
    at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 93)
    at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:222)
    at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:290 )
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:192)
    at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:585)
    at org.springframework.context.support.AbstractApplic ationContext.finishBeanFactoryInitialization(Abstr actApplicationContext.java:895)
    at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:425)
    at org.springframework.web.servlet.FrameworkServlet.c reateWebApplicationContext(FrameworkServlet.java:4 67)
    at org.springframework.web.servlet.FrameworkServlet.c reateWebApplicationContext(FrameworkServlet.java:4 83)
    at org.springframework.web.servlet.FrameworkServlet.i nitWebApplicationContext(FrameworkServlet.java:358 )
    at org.springframework.web.servlet.FrameworkServlet.i nitServletBean(FrameworkServlet.java:325)
    at org.springframework.web.servlet.HttpServletBean.in it(HttpServletBean.java:127)
    at javax.servlet.GenericServlet.init(GenericServlet.j ava:241)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.ini t(ServletWrapper.java:358)
    at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl .init(ServletWrapperImpl.java:169)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.han dleRequest(ServletWrapper.java:739)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.han dleRequest(ServletWrapper.java:502)
    at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl .handleRequest(ServletWrapperImpl.java:179)
    at com.ibm.ws.webcontainer.webapp.WebApp.handleReques t(WebApp.java:3933)
    at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequ est(WebGroup.java:276)
    at com.ibm.ws.webcontainer.WebContainer.handleRequest (WebContainer.java:931)
    at com.ibm.ws.webcontainer.WSWebContainer.handleReque st(WSWebContainer.java:1583)
    at com.ibm.ws.webcontainer.channel.WCChannelLink.read y(WCChannelLink.java:186)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLi nk.handleDiscrimination(HttpInboundLink.java:452)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLi nk.handleNewRequest(HttpInboundLink.java:511)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLi nk.processRequest(HttpInboundLink.java:305)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLi nk.ready(HttpInboundLink.java:276)
    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialRe adCallback.sendToDiscriminators(NewConnectionIniti alReadCallback.java:214)
    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialRe adCallback.complete(NewConnectionInitialReadCallba ck.java:113)
    at com.ibm.ws.tcp.channel.impl.AioReadCompletionListe ner.futureCompleted(AioReadCompletionListener.java :165)
    at com.ibm.io.async.AbstractAsyncFuture.invokeCallbac k(AbstractAsyncFuture.java:217)
    at com.ibm.io.async.AsyncChannelFuture.fireCompletion Actions(AsyncChannelFuture.java:161)
    at com.ibm.io.async.AsyncFuture.completed(AsyncFuture .java:138)
    at com.ibm.io.async.ResultHandler.complete(ResultHand ler.java:204)
    at com.ibm.io.async.ResultHandler.runEventProcessingL oop(ResultHandler.java:775)
    at com.ibm.io.async.ResultHandler$2.run(ResultHandler .java:905)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.j ava:1604)
    Caused by: java.lang.NoSuchMethodError: org/apache/ws/commons/schema/XmlSchemaCollection.read(Lorg/xml/sax/InputSourceLorg/apache/ws/commons/schema/XmlSchema;
    at org.springframework.xml.xsd.commons.CommonsXsdSche maCollection.afterPropertiesSet(CommonsXsdSchemaCo llection.java:137)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.invokeInitMethods(Abstr actAutowireCapableBeanFactory.java:1477)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1417)
    ... 39 more



    Regards,
    Sona

  • #2
    Please use [ code][/code ] tags when posting code/xml/stacktraces... That way it remains readable...

    I tried adding xmlschema-core-sources.jar to solve the below error, but it doesn't get solved.
    Why would adding source jars to the classpath help?!

    Judging from the stacktrace WebSphere ships its own, older?, version of xmlschema. Change classloading settings to parent-last for your application, also make sure you don't have multiple versions of sax on your classpath as that also might lead to these issues.

    Comment

    Working...
    X