Results 1 to 5 of 5

Thread: jwsdp-2.0 compatible?

  1. #1
    Join Date
    Mar 2006
    Location
    Germany, Karlsruhe
    Posts
    157

    Question jwsdp-2.0 compatible?

    Hi!

    I'm using the jaxb libraries from jwsdp-2.0. But it's not possible to instantiate the jaxbMarshaller bean.
    Code:
    1722 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] ERROR context.ContextLoader  - Context initialization failed
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'getAddressEndpoint' defined in ServletContext resource [/WEB-INF/applicationContext-ws.xml]: Cannot resolve reference to bean 'jaxbMarshaller' while setting bean property 'marshaller'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jaxbMarshaller' defined in ServletContext resource [/WEB-INF/applicationContext-ws.xml]: Invocation of init method failed; nested exception is java.lang.UnsupportedOperationException
    Caused by: 
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jaxbMarshaller' defined in ServletContext resource [/WEB-INF/applicationContext-ws.xml]: Invocation of init method failed; nested exception is java.lang.UnsupportedOperationException
    Caused by: 
    java.lang.UnsupportedOperationException
    	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.setValidating(UnmarshallerImpl.java:453)
    	at org.springframework.oxm.jaxb.JaxbMarshaller.afterPropertiesSet(JaxbMarshaller.java:112)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:877)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:846)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:419)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:241)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:152)
    	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:219)
    	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:115)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:781)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:572)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:415)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:241)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:152)
    	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:253)
    	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:331)
    	at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:155)
    	at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
    	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
    	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
    	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3729)
    	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4187)
    	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
    	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
    	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
    	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:809)
    	at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:698)
    	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
    	at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1190)
    	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:292)
    	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    	at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1305)
    	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1569)
    	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1578)
    	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1558)
    	at java.lang.Thread.run(Unknown Source)
    I also wondering about the generated schema classes. My XSD specifies this
    Code:
    <complexType name="AddressObject">
      <sequence>
        <element name="key" 		type="long"		nillable="false" minOccurs="1" maxOccurs="1"/>
        <element name="firstName"	type="string"	nillable="true"	 minOccurs="0" maxOccurs="1"/>
        <element name="lastName"	type="string"	nillable="true"	 minOccurs="0" maxOccurs="1"/>
      </sequence>
    </complexType>
    but the generated files doesn't have a
    Code:
    setFirstName(String firstName)
    method, instead they have this setter method.
    Code:
    public void setFirstName(JAXBElement<String> value) {
      this.firstName = ((JAXBElement<String> ) value);
    }
    Any idea why? I doesn't want this JAXB dependency in my Endpoint class.

    Cheers,

    Ingo
    Last edited by res1st; Jun 1st, 2006 at 05:46 AM.

  2. #2
    Join Date
    Jul 2005
    Location
    Rotterdam, the Netherlands
    Posts
    1,562

    Default

    Quote Originally Posted by res1st
    Hi!

    I'm using the jaxb libraries from jwsdp-2.0. But it's not possible to instantiate the jaxbMarshaller bean.
    Code:
    1722 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] ERROR context.ContextLoader  - Context initialization failed
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'getAddressEndpoint' defined in ServletContext resource [/WEB-INF/applicationContext-ws.xml]: Cannot resolve reference to bean 'jaxbMarshaller' while setting bean property 'marshaller'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jaxbMarshaller' defined in ServletContext resource [/WEB-INF/applicationContext-ws.xml]: Invocation of init method failed; nested exception is java.lang.UnsupportedOperationException
    Caused by: 
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jaxbMarshaller' defined in ServletContext resource [/WEB-INF/applicationContext-ws.xml]: Invocation of init method failed; nested exception is java.lang.UnsupportedOperationException
    Caused by: 
    java.lang.UnsupportedOperationException
    	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.setValidating(UnmarshallerImpl.java:453)
    	at org.springframework.oxm.jaxb.JaxbMarshaller.afterPropertiesSet(JaxbMarshaller.java:112)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:877)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:846)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:419)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:241)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:152)
    	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:219)
    	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:115)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:781)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:572)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:415)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:241)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:152)
    	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:253)
    	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:331)
    	at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:155)
    	at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
    	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
    	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
    	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3729)
    	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4187)
    	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
    	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
    	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
    	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:809)
    	at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:698)
    	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
    	at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1190)
    	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:292)
    	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    	at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1305)
    	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1569)
    	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1578)
    	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1558)
    	at java.lang.Thread.run(Unknown Source)
    Try the snapshort available here. JAXB 2.0 had some breaking api changes, so I had to split up the JaxbMarshalller into a Jaxb1Marshaller and a Jaxb2Marshaller. The one in jwsdp 2.0 is a jaxb 2 marshaller.
    Arjen Poutsma

    Spring Web Services Dev Lead
    Please read the FAQ

  3. #3
    Join Date
    Mar 2006
    Location
    Germany, Karlsruhe
    Posts
    157

    Default

    wow, you were too fast for my edit.
    ok, i'll try it.

    what do you think about jaxb 2?
    It it better, faster, ... or is it just an "annotations version"?

    Ingo
    Last edited by res1st; Jun 1st, 2006 at 05:52 AM.

  4. #4
    Join Date
    Jul 2005
    Location
    Rotterdam, the Netherlands
    Posts
    1,562

    Default

    Quote Originally Posted by res1st
    wow, you were too fast for my edit.
    ok, i'll try it.

    what do you think about jaxb 2?
    It it better, faster, ... or is it just an "annotations version"?
    It produces less files, so I think that's good. I haven't done any tests with it performance wise. However, there is a project which focusses on this stuff here.

    And with regard to your other JAXBElement<> question, i honestly have no idea. Try looking at the JAXB 2 samples, maybe that will show you why.

    Cheers,
    Arjen Poutsma

    Spring Web Services Dev Lead
    Please read the FAQ

  5. #5
    Join Date
    Mar 2006
    Location
    Germany, Karlsruhe
    Posts
    157

    Default

    I think the main change of jaxb2 is the annotation thing. I'm no big fan of annotations, that's why i stick with jax 1.6 at the moment. It's working wonderful.
    But the binding benchmark project is very interessting for me. Thank you!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •