res1st
Jun 1st, 2006, 05:35 AM
Hi!
I'm using the jaxb libraries from jwsdp-2.0. But it's not possible to instantiate the jaxbMarshaller bean.
1722 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] ERROR context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationExce ption: 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.BeanCreationExce ption: 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.BeanCreationExce ption: 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.Unmarshal lerImpl.setValidating(UnmarshallerImpl.java:453)
at org.springframework.oxm.jaxb.JaxbMarshaller.afterP ropertiesSet(JaxbMarshaller.java:112)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.invokeInitMethods(Abstr actAutowireCapableBeanFactory.java:877)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:846)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:419)
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:241)
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:152)
at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveReference(BeanDefinitio nValueResolver.java:219)
at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveValueIfNecessary(BeanDe finitionValueResolver.java:115)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.applyPropertyValues(Abs tractAutowireCapableBeanFactory.java:781)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.populateBean(AbstractAu towireCapableBeanFactory.java:572)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:415)
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:241)
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:152)
at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:253)
at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:331)
at org.springframework.web.context.support.AbstractRe freshableWebApplicationContext.refresh(AbstractRef reshableWebApplicationContext.java:155)
at org.springframework.web.context.ContextLoader.crea teWebApplicationContext(ContextLoader.java:246)
at org.springframework.web.context.ContextLoader.init WebApplicationContext(ContextLoader.java:184)
at org.springframework.web.context.ContextLoaderListe ner.contextInitialized(ContextLoaderListener.java: 49)
at org.apache.catalina.core.StandardContext.listenerS tart(StandardContext.java:3729)
at org.apache.catalina.core.StandardContext.start(Sta ndardContext.java:4187)
at org.apache.catalina.core.ContainerBase.addChildInt ernal(ContainerBase.java:759)
at org.apache.catalina.core.ContainerBase.addChild(Co ntainerBase.java:739)
at org.apache.catalina.core.StandardHost.addChild(Sta ndardHost.java:524)
at org.apache.catalina.startup.HostConfig.deployWAR(H ostConfig.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(HostC onfig.java:1190)
at org.apache.catalina.startup.HostConfig.lifecycleEv ent(HostConfig.java:292)
at org.apache.catalina.util.LifecycleSupport.fireLife cycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.backgroundP rocess(ContainerBase.java:1305)
at org.apache.catalina.core.ContainerBase$ContainerBa ckgroundProcessor.processChildren(ContainerBase.ja va:1569)
at org.apache.catalina.core.ContainerBase$ContainerBa ckgroundProcessor.processChildren(ContainerBase.ja va:1578)
at org.apache.catalina.core.ContainerBase$ContainerBa ckgroundProcessor.run(ContainerBase.java:1558)
at java.lang.Thread.run(Unknown Source)
I also wondering about the generated schema classes. My XSD specifies this
<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
setFirstName(String firstName)
method, instead they have this setter method.
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
I'm using the jaxb libraries from jwsdp-2.0. But it's not possible to instantiate the jaxbMarshaller bean.
1722 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] ERROR context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationExce ption: 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.BeanCreationExce ption: 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.BeanCreationExce ption: 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.Unmarshal lerImpl.setValidating(UnmarshallerImpl.java:453)
at org.springframework.oxm.jaxb.JaxbMarshaller.afterP ropertiesSet(JaxbMarshaller.java:112)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.invokeInitMethods(Abstr actAutowireCapableBeanFactory.java:877)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:846)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:419)
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:241)
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:152)
at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveReference(BeanDefinitio nValueResolver.java:219)
at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveValueIfNecessary(BeanDe finitionValueResolver.java:115)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.applyPropertyValues(Abs tractAutowireCapableBeanFactory.java:781)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.populateBean(AbstractAu towireCapableBeanFactory.java:572)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:415)
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:241)
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:152)
at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:253)
at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:331)
at org.springframework.web.context.support.AbstractRe freshableWebApplicationContext.refresh(AbstractRef reshableWebApplicationContext.java:155)
at org.springframework.web.context.ContextLoader.crea teWebApplicationContext(ContextLoader.java:246)
at org.springframework.web.context.ContextLoader.init WebApplicationContext(ContextLoader.java:184)
at org.springframework.web.context.ContextLoaderListe ner.contextInitialized(ContextLoaderListener.java: 49)
at org.apache.catalina.core.StandardContext.listenerS tart(StandardContext.java:3729)
at org.apache.catalina.core.StandardContext.start(Sta ndardContext.java:4187)
at org.apache.catalina.core.ContainerBase.addChildInt ernal(ContainerBase.java:759)
at org.apache.catalina.core.ContainerBase.addChild(Co ntainerBase.java:739)
at org.apache.catalina.core.StandardHost.addChild(Sta ndardHost.java:524)
at org.apache.catalina.startup.HostConfig.deployWAR(H ostConfig.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(HostC onfig.java:1190)
at org.apache.catalina.startup.HostConfig.lifecycleEv ent(HostConfig.java:292)
at org.apache.catalina.util.LifecycleSupport.fireLife cycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.backgroundP rocess(ContainerBase.java:1305)
at org.apache.catalina.core.ContainerBase$ContainerBa ckgroundProcessor.processChildren(ContainerBase.ja va:1569)
at org.apache.catalina.core.ContainerBase$ContainerBa ckgroundProcessor.processChildren(ContainerBase.ja va:1578)
at org.apache.catalina.core.ContainerBase$ContainerBa ckgroundProcessor.run(ContainerBase.java:1558)
at java.lang.Thread.run(Unknown Source)
I also wondering about the generated schema classes. My XSD specifies this
<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
setFirstName(String firstName)
method, instead they have this setter method.
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