Announcement Announcement Module
Collapse
No announcement yet.
jwsdp-2.0 compatible? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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, 06:46 AM.

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

    Comment


    • #3
      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, 06:52 AM.

      Comment


      • #4
        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,

        Comment


        • #5
          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!

          Comment

          Working...
          X