Announcement Announcement Module
Collapse
No announcement yet.
Dynamic WSDL generation error for Echo Sample Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Dynamic WSDL generation error for Echo Sample

    Hi,

    I am facing a problem reconfiguring the Echo sample in a Spring MVC project via Eclipse currently, and everything builds fine, except for the XsdBasedSoap11Wsdl4jDefinitionBuilder.

    I get the error below:
    2007-03-01 18:15:30,814 ERROR [org.springframework.ws.transport.http.MessageDispa tcherServlet] - Context initialization failed
    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'echo' defined in ServletContext resource [/WEB-INF/echo-servlet.xml]: Cannot create inner bean 'org.springframework.ws.wsdl.wsdl11.builder.XsdBas edSoap11Wsdl4jDefinitionBuilder#31b5d7' while setting bean property 'builder'; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.springframework.ws.wsdl.wsdl11.builder.XsdBas edSoap11Wsdl4jDefinitionBuilder#31b5d7' defined in ServletContext resource [/WEB-INF/echo-servlet.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: javax/wsdl/Definition
    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.springframework.ws.wsdl.wsdl11.builder.XsdBas edSoap11Wsdl4jDefinitionBuilder#31b5d7' defined in ServletContext resource [/WEB-INF/echo-servlet.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: javax/wsdl/Definition
    java.lang.NoClassDefFoundError: javax/wsdl/Definition
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.ja va:1655)
    at java.lang.Class.getDeclaredMethods(Class.java:1139 )
    at java.beans.Introspector$1.run(Introspector.java:12 66)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.beans.Introspector.getPublicDeclaredMethods(I ntrospector.java:1264)
    at java.beans.Introspector.getTargetMethodInfo(Intros pector.java:1129)
    at java.beans.Introspector.getBeanInfo(Introspector.j ava:379)
    at java.beans.Introspector.getBeanInfo(Introspector.j ava:153)
    at java.beans.Introspector.getBeanInfo(Introspector.j ava:214)
    at java.beans.Introspector.<init>(Introspector.java:3 60)
    at java.beans.Introspector.getBeanInfo(Introspector.j ava:153)
    at java.beans.Introspector.getBeanInfo(Introspector.j ava:214)
    at java.beans.Introspector.<init>(Introspector.java:3 60)
    at java.beans.Introspector.getBeanInfo(Introspector.j ava:153)
    at java.beans.Introspector.getBeanInfo(Introspector.j ava:214)
    at java.beans.Introspector.<init>(Introspector.java:3 60)
    at java.beans.Introspector.getBeanInfo(Introspector.j ava:153)
    at org.springframework.beans.CachedIntrospectionResul ts.<init>(CachedIntrospectionResults.java:150)
    at org.springframework.beans.CachedIntrospectionResul ts.forClass(CachedIntrospectionResults.java:87)
    at org.springframework.beans.BeanWrapperImpl.setIntro spectionClass(BeanWrapperImpl.java:237)
    at org.springframework.beans.BeanWrapperImpl.setWrapp edInstance(BeanWrapperImpl.java:195)
    at org.springframework.beans.BeanWrapperImpl.setWrapp edInstance(BeanWrapperImpl.java:179)
    at org.springframework.beans.BeanWrapperImpl.<init>(B eanWrapperImpl.java:132)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.instantiateBean(Abstrac tAutowireCapableBeanFactory.java:487)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:362)
    at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveInnerBeanDefinition(Bea nDefinitionValueResolver.java:151)
    at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveValueIfNecessary(BeanDe finitionValueResolver.java:97)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.applyPropertyValues(Abs tractAutowireCapableBeanFactory.java:1046)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.populateBean(AbstractAu towireCapableBeanFactory.java:857)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:378)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:233)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:145)
    at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:283)
    at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:313)
    at org.springframework.web.context.support.AbstractRe freshableWebApplicationContext.refresh(AbstractRef reshableWebApplicationContext.java:139)
    at org.springframework.web.servlet.FrameworkServlet.c reateWebApplicationContext(FrameworkServlet.java:3 06)
    at org.springframework.web.servlet.FrameworkServlet.i nitWebApplicationContext(FrameworkServlet.java:251 )
    at org.springframework.web.servlet.FrameworkServlet.i nitServletBean(FrameworkServlet.java:220)
    at org.springframework.web.servlet.HttpServletBean.in it(HttpServletBean.java:112)
    at javax.servlet.GenericServlet.init(GenericServlet.j ava:258)
    at weblogic.servlet.internal.ServletStubImpl$ServletI nitAction.run(ServletStubImpl.java:1094)
    at weblogic.security.acl.internal.AuthenticatedSubjec t.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Se curityManager.java:121)
    at weblogic.servlet.internal.ServletStubImpl.createSe rvlet(ServletStubImpl.java:970)
    at weblogic.servlet.internal.ServletStubImpl.createIn stances(ServletStubImpl.java:949)
    at weblogic.servlet.internal.ServletStubImpl.prepareS ervlet(ServletStubImpl.java:888)
    at weblogic.servlet.internal.WebAppServletContext.pre loadServlet(WebAppServletContext.java:3430)
    at weblogic.servlet.internal.WebAppServletContext.pre loadServlets(WebAppServletContext.java:3375)
    at weblogic.servlet.internal.WebAppServletContext.pre loadResources(WebAppServletContext.java:3356)
    at weblogic.servlet.internal.WebAppServletContext.set Started(WebAppServletContext.java:6208)
    at weblogic.servlet.internal.WebAppModule.start(WebAp pModule.java:864)
    at weblogic.j2ee.J2EEApplicationContainer.start(J2EEA pplicationContainer.java:2134)
    at weblogic.j2ee.J2EEApplicationContainer.activate(J2 EEApplicationContainer.java:2175)
    at weblogic.management.deploy.slave.SlaveDeployer$Com ponentActivateTask.activateContainer(SlaveDeployer .java:2520)
    at weblogic.management.deploy.slave.SlaveDeployer$Act ivateTask.doCommit(SlaveDeployer.java:2438)
    at weblogic.management.deploy.slave.SlaveDeployer$Tas k.commit(SlaveDeployer.java:2155)
    at weblogic.management.deploy.slave.SlaveDeployer$Tas k.checkAutoCommit(SlaveDeployer.java:2254)
    at weblogic.management.deploy.slave.SlaveDeployer$Tas k.prepare(SlaveDeployer.java:2149)
    at weblogic.management.deploy.slave.SlaveDeployer$Act ivateTask.prepare(SlaveDeployer.java:2401)
    at weblogic.management.deploy.slave.SlaveDeployer.pro cessPrepareTask(SlaveDeployer.java:883)
    at weblogic.management.deploy.slave.SlaveDeployer.pre pareDelta(SlaveDeployer.java:591)
    at weblogic.management.deploy.slave.SlaveDeployer.pre pareUpdate(SlaveDeployer.java:500)
    at weblogic.drs.internal.SlaveCallbackHandler$1.execu te(SlaveCallbackHandler.java:25)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThrea d.java:224)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.ja va:183)



    The following is the bean declaration for the in the servlet xml file, which is almost the same as in the sample except for the server port:
    <bean id="echo" class="org.springframework.ws.wsdl.wsdl11.DynamicW sdl11Definition">
    <property name="builder">
    <bean class="org.springframework.ws.wsdl.wsdl11.builder. XsdBasedSoap11Wsdl4jDefinitionBuilder">
    <property name="schema" value="/WEB-INF/echo.xsd"/>
    <property name="portTypeName" value="Echo"/>
    <property name="locationUri" value="http://localhost:7001/echo/services"/>
    </bean>
    </property>
    </bean>

    The echo.xsd file is in the correct location, which only leaves the portTypeName or the locationUri being the mistake.

    I'm trying to deploy the application on a weblogic server, could that be an issue?

    Hope someone might be able to help.

  • #2
    Is WSDL4J (wsdl4j-1.6.1.jar) on your classpath? That jar contains javax.wsdl.Definition, etc.

    Comment


    • #3
      No, I haven't included it in.
      I haven't got the dependancies from Maven in the Project as well.

      This is my first time working with Maven, and was having trouble getting the related libraries downloaded.

      Will try it out. Thanks

      Comment

      Working...
      X