Hi!
I'm using the jaxb libraries from jwsdp-2.0. But it's not possible to instantiate the jaxbMarshaller bean.
I also wondering about the generated schema classes. My XSD specifies thisCode: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)
but the generated files doesn't have aCode:<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>
method, instead they have this setter method.Code:setFirstName(String firstName)
Any idea why? I doesn't want this JAXB dependency in my Endpoint class.Code:public void setFirstName(JAXBElement<String> value) { this.firstName = ((JAXBElement<String> ) value); }
Cheers,
Ingo


Reply With Quote