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

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


    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="">
    <sws:xsd location="/WEB-INF/echo.xsd"/>

    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/;
    at AutowireCapableBeanFactory.initializeBean(Abstract
    at AutowireCapableBeanFactory.doCreateBean(AbstractAu
    at AutowireCapableBeanFactory.createBean(AbstractAuto
    at BeanFactory$1.getObject( 93)
    at ingletonBeanRegistry.getSingleton(DefaultSingleton
    at BeanFactory.doGetBean( )
    at BeanFactory.getBean(
    at istableBeanFactory.preInstantiateSingletons(Defaul
    at ationContext.finishBeanFactoryInitialization(Abstr
    at ationContext.refresh(AbstractApplicationContext.ja va:425)
    at org.springframework.web.servlet.FrameworkServlet.c reateWebApplicationContext( 67)
    at org.springframework.web.servlet.FrameworkServlet.c reateWebApplicationContext( 83)
    at org.springframework.web.servlet.FrameworkServlet.i nitWebApplicationContext( )
    at org.springframework.web.servlet.FrameworkServlet.i nitServletBean(
    at it(
    at javax.servlet.GenericServlet.init(GenericServlet.j ava:241)
    at t(
    at .init(
    at dleRequest(
    at dleRequest(
    at .handleRequest(
    at t(
    at est(
    at (
    at st(
    at y(
    at nk.handleDiscrimination(
    at nk.handleNewRequest(
    at nk.processRequest(
    at nk.ready(
    at adCallback.sendToDiscriminators(NewConnectionIniti
    at adCallback.complete(NewConnectionInitialReadCallba
    at ner.futureCompleted( :165)
    at k(
    at Actions(
    at .java:138)
    at oop(
    at$ .java:905)
    at$ ava:1604)
    Caused by: java.lang.NoSuchMethodError: org/apache/ws/commons/schema/;
    at org.springframework.xml.xsd.commons.CommonsXsdSche maCollection.afterPropertiesSet(CommonsXsdSchemaCo
    at AutowireCapableBeanFactory.invokeInitMethods(Abstr
    at AutowireCapableBeanFactory.initializeBean(Abstract
    ... 39 more


  • #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.