2010-09-27 5 views
1

Je développe une application utilisant Hibernate, Spring et JaxWS.Webservices avec Maven, Spring et Hibernate

j'utilisais 2.1 JAXWS et tout était bon fonctionnement ..

je dois passer à JAXWS 2.2 afin que je puisse utiliser l'annotation @XmlElement pour exiger un paramètre @XmlElement (obligatoire = true) ..

Je mis à jour mon fichier pom

<!-- 
    <dependency> 
     <groupId>com.sun.xml.ws</groupId> 
     <artifactId>jaxws-rt</artifactId> 
     <version>2.1.4</version> 
    </dependency> 
    --> 
    <dependency> 
     <groupId>com.sun.xml.ws</groupId> 
     <artifactId>jaxws-rt</artifactId> 
     <version>2.2.1</version> 
    </dependency> 
    <!-- 
    <dependency> 
     <groupId>javax.xml.bind</groupId> 
     <artifactId>jaxb-api</artifactId> 
     <version>2.1</version> 
     <scope>provided</scope> 
    </dependency> 
    --> 
    <dependency> 
     <groupId>javax.xml.bind</groupId> 
     <artifactId>jaxb-api</artifactId> 
     <version>2.2.1</version> 
    </dependency> 


    <!-- 
    <dependency> 
     <groupId>com.sun.xml.bind</groupId> 
     <artifactId>jaxb-impl</artifactId> 
     <version>2.1.7</version> 
     <scope>provided</scope> 
    </dependency> 
    --> 
    <dependency> 
     <groupId>com.sun.xml.bind</groupId> 
     <artifactId>jaxb-impl</artifactId> 
     <version>2.2.1</version> 
    </dependency> 

    <!-- 
    <dependency> 
     <groupId>javax.xml.ws</groupId> 
     <artifactId>jaxws-api</artifactId> 
     <version>2.1-1</version> 
    </dependency> 
    --> 

    <dependency> 
     <groupId>javax.xml.ws</groupId> 
     <artifactId>jaxws-api</artifactId> 
     <version>2.2</version> 
    </dependency> 

maintenant, j'obtiens cette erreur StackTrace:

SEVERE: WSSERVLET11: failed to parse runtime descriptor: javax.xml.ws.WebServiceException: Unable to create JAXBContext 
at com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:166) 
at com.sun.xml.ws.model.AbstractSEIModelImpl.postProcess(AbstractSEIModelImpl.java:94) 
at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:258) 
at com.sun.xml.ws.server.EndpointFactory.createSEIModel(EndpointFactory.java:338) 
at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:201) 
at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:505) 
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(DeploymentDescriptorParser.java:253) 
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(DeploymentDescriptorParser.java:147) 
at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:124) 
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135) 
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630) 
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) 
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) 
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546) 
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637) 
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563) 
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498) 
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277) 
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321) 
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) 
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) 
at org.apache.catalina.core.StandardHost.start(StandardHost.java:785) 
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) 
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445) 
at org.apache.catalina.core.StandardService.start(StandardService.java:519) 
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) 
at org.apache.catalina.startup.Catalina.start(Catalina.java:581) 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
at java.lang.reflect.Method.invoke(Method.java:597) 
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) 
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) 
Caused by: java.security.PrivilegedActionException: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 7 counts of IllegalAnnotationExceptions 
transaction.dao.AbstractSpringDao does not have a no-arg default constructor. 
    this problem is related to the following location: 
     at transaction.dao.AbstractSpringDao 
     at transaction.dao.CardTypeDao 
     at public transaction.dao.CardTypeDao transaction.logic.TransactionLogic.getCardTypeDao() 
     at transaction.logic.TransactionLogic 
     at public transaction.logic.TransactionLogic transaction.ws.jaxws.SetTransactionLogic.arg0 
     at transaction.ws.jaxws.SetTransactionLogic 
org.hibernate.Interceptor is an interface, and JAXB can't handle interfaces. 
    this problem is related to the following location: 
     at org.hibernate.Interceptor 
     at public org.hibernate.Interceptor org.springframework.orm.hibernate3.HibernateAccessor.getEntityInterceptor() throws java.lang.IllegalStateException,org.springframework.beans.BeansException 
     at org.springframework.orm.hibernate3.HibernateAccessor 
     at org.springframework.orm.hibernate3.HibernateTemplate 
     at public final org.springframework.orm.hibernate3.HibernateTemplate org.springframework.orm.hibernate3.support.HibernateDaoSupport.getHibernateTemplate() 
     at org.springframework.orm.hibernate3.support.HibernateDaoSupport 
     at transaction.dao.AbstractSpringDao 
     at transaction.dao.CardTypeDao 
     at public transaction.dao.CardTypeDao transaction.logic.TransactionLogic.getCardTypeDao() 
     at transaction.logic.TransactionLogic 
     at public transaction.logic.TransactionLogic transaction.ws.jaxws.SetTransactionLogic.arg0 
     at transaction.ws.jaxws.SetTransactionLogic 
org.hibernate.Interceptor does not have a no-arg default constructor. 
    this problem is related to the following location: 
     at org.hibernate.Interceptor 
     at public org.hibernate.Interceptor org.springframework.orm.hibernate3.HibernateAccessor.getEntityInterceptor() throws java.lang.IllegalStateException,org.springframework.beans.BeansException 
     at org.springframework.orm.hibernate3.HibernateAccessor 
     at org.springframework.orm.hibernate3.HibernateTemplate 
     at public final org.springframework.orm.hibernate3.HibernateTemplate org.springframework.orm.hibernate3.support.HibernateDaoSupport.getHibernateTemplate() 
     at org.springframework.orm.hibernate3.support.HibernateDaoSupport 
     at transaction.dao.AbstractSpringDao 
     at transaction.dao.CardTypeDao 
     at public transaction.dao.CardTypeDao transaction.logic.TransactionLogic.getCardTypeDao() 
     at transaction.logic.TransactionLogic 
     at public transaction.logic.TransactionLogic transaction.ws.jaxws.SetTransactionLogic.arg0 
     at transaction.ws.jaxws.SetTransactionLogic 
org.springframework.jdbc.support.SQLExceptionTranslator is an interface, and JAXB can't handle interfaces. 
    this problem is related to the following location: 
     at org.springframework.jdbc.support.SQLExceptionTranslator 
     at public org.springframework.jdbc.support.SQLExceptionTranslator org.springframework.orm.hibernate3.HibernateAccessor.getJdbcExceptionTranslator() 
     at org.springframework.orm.hibernate3.HibernateAccessor 
     at org.springframework.orm.hibernate3.HibernateTemplate 
     at public final org.springframework.orm.hibernate3.HibernateTemplate org.springframework.orm.hibernate3.support.HibernateDaoSupport.getHibernateTemplate() 
     at org.springframework.orm.hibernate3.support.HibernateDaoSupport 
     at transaction.dao.AbstractSpringDao 
     at transaction.dao.CardTypeDao 
     at public transaction.dao.CardTypeDao transaction.logic.TransactionLogic.getCardTypeDao() 
     at transaction.logic.TransactionLogic 
     at public transaction.logic.TransactionLogic transaction.ws.jaxws.SetTransactionLogic.arg0 
     at transaction.ws.jaxws.SetTransactionLogic 
org.springframework.jdbc.support.SQLExceptionTranslator does not have a no-arg default constructor. 
    this problem is related to the following location: 
     at org.springframework.jdbc.support.SQLExceptionTranslator 
     at public org.springframework.jdbc.support.SQLExceptionTranslator org.springframework.orm.hibernate3.HibernateAccessor.getJdbcExceptionTranslator() 
     at org.springframework.orm.hibernate3.HibernateAccessor 
     at org.springframework.orm.hibernate3.HibernateTemplate 
     at public final org.springframework.orm.hibernate3.HibernateTemplate org.springframework.orm.hibernate3.support.HibernateDaoSupport.getHibernateTemplate() 
     at org.springframework.orm.hibernate3.support.HibernateDaoSupport 
     at transaction.dao.AbstractSpringDao 
     at transaction.dao.CardTypeDao 
     at public transaction.dao.CardTypeDao transaction.logic.TransactionLogic.getCardTypeDao() 
     at transaction.logic.TransactionLogic 
     at public transaction.logic.TransactionLogic transaction.ws.jaxws.SetTransactionLogic.arg0 
     at transaction.ws.jaxws.SetTransactionLogic 
org.hibernate.SessionFactory is an interface, and JAXB can't handle interfaces. 
    this problem is related to the following location: 
     at org.hibernate.SessionFactory 
     at public org.hibernate.SessionFactory org.springframework.orm.hibernate3.HibernateAccessor.getSessionFactory() 
     at org.springframework.orm.hibernate3.HibernateAccessor 
     at org.springframework.orm.hibernate3.HibernateTemplate 
     at public final org.springframework.orm.hibernate3.HibernateTemplate org.springframework.orm.hibernate3.support.HibernateDaoSupport.getHibernateTemplate() 
     at org.springframework.orm.hibernate3.support.HibernateDaoSupport 
     at transaction.dao.AbstractSpringDao 
     at transaction.dao.CardTypeDao 
     at public transaction.dao.CardTypeDao transaction.logic.TransactionLogic.getCardTypeDao() 
     at transaction.logic.TransactionLogic 
     at public transaction.logic.TransactionLogic transaction.ws.jaxws.SetTransactionLogic.arg0 
     at transaction.ws.jaxws.SetTransactionLogic 
org.hibernate.SessionFactory does not have a no-arg default constructor. 
    this problem is related to the following location: 
     at org.hibernate.SessionFactory 
     at public org.hibernate.SessionFactory org.springframework.orm.hibernate3.HibernateAccessor.getSessionFactory() 
     at org.springframework.orm.hibernate3.HibernateAccessor 
     at org.springframework.orm.hibernate3.HibernateTemplate 
     at public final org.springframework.orm.hibernate3.HibernateTemplate org.springframework.orm.hibernate3.support.HibernateDaoSupport.getHibernateTemplate() 
     at org.springframework.orm.hibernate3.support.HibernateDaoSupport 
     at transaction.dao.AbstractSpringDao 
     at transaction.dao.CardTypeDao 
     at public transaction.dao.CardTypeDao transaction.logic.TransactionLogic.getCardTypeDao() 
     at transaction.logic.TransactionLogic 
     at public transaction.logic.TransactionLogic transaction.ws.jaxws.SetTransactionLogic.arg0 
     at transaction.ws.jaxws.SetTransactionLogic 

    at java.security.AccessController.doPrivileged(Native Method) 
    at com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:153) 
    ... 32 more 
Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 7 counts of IllegalAnnotationExceptions 
transaction.dao.AbstractSpringDao does not have a no-arg default constructor. 
    this problem is related to the following location: 
     at transaction.dao.AbstractSpringDao 
     at transaction.dao.CardTypeDao 
     at public transaction.dao.CardTypeDao transaction.logic.TransactionLogic.getCardTypeDao() 
     at transaction.logic.TransactionLogic 
     at public transaction.logic.TransactionLogic transaction.ws.jaxws.SetTransactionLogic.arg0 
     at transaction.ws.jaxws.SetTransactionLogic 
org.hibernate.Interceptor is an interface, and JAXB can't handle interfaces. 
    this problem is related to the following location: 
     at org.hibernate.Interceptor 
     at public org.hibernate.Interceptor org.springframework.orm.hibernate3.HibernateAccessor.getEntityInterceptor() throws java.lang.IllegalStateException,org.springframework.beans.BeansException 
     at org.springframework.orm.hibernate3.HibernateAccessor 
     at org.springframework.orm.hibernate3.HibernateTemplate 
     at public final org.springframework.orm.hibernate3.HibernateTemplate org.springframework.orm.hibernate3.support.HibernateDaoSupport.getHibernateTemplate() 
     at org.springframework.orm.hibernate3.support.HibernateDaoSupport 
     at transaction.dao.AbstractSpringDao 
     at transaction.dao.CardTypeDao 
     at public transaction.dao.CardTypeDao transaction.logic.TransactionLogic.getCardTypeDao() 
     at transaction.logic.TransactionLogic 
     at public transaction.logic.TransactionLogic transaction.ws.jaxws.SetTransactionLogic.arg0 
     at transaction.ws.jaxws.SetTransactionLogic 
org.hibernate.Interceptor does not have a no-arg default constructor. 
    this problem is related to the following location: 
     at org.hibernate.Interceptor 
     at public org.hibernate.Interceptor org.springframework.orm.hibernate3.HibernateAccessor.getEntityInterceptor() throws java.lang.IllegalStateException,org.springframework.beans.BeansException 
     at org.springframework.orm.hibernate3.HibernateAccessor 
     at org.springframework.orm.hibernate3.HibernateTemplate 
     at public final org.springframework.orm.hibernate3.HibernateTemplate org.springframework.orm.hibernate3.support.HibernateDaoSupport.getHibernateTemplate() 
     at org.springframework.orm.hibernate3.support.HibernateDaoSupport 
     at transaction.dao.AbstractSpringDao 
     at transaction.dao.CardTypeDao 
     at public transaction.dao.CardTypeDao transaction.logic.TransactionLogic.getCardTypeDao() 
     at transaction.logic.TransactionLogic 
     at public transaction.logic.TransactionLogic transaction.ws.jaxws.SetTransactionLogic.arg0 
     at transaction.ws.jaxws.SetTransactionLogic 
org.springframework.jdbc.support.SQLExceptionTranslator is an interface, and JAXB can't handle interfaces. 
    this problem is related to the following location: 
     at org.springframework.jdbc.support.SQLExceptionTranslator 
     at public org.springframework.jdbc.support.SQLExceptionTranslator org.springframework.orm.hibernate3.HibernateAccessor.getJdbcExceptionTranslator() 
     at org.springframework.orm.hibernate3.HibernateAccessor 
     at org.springframework.orm.hibernate3.HibernateTemplate 
     at public final org.springframework.orm.hibernate3.HibernateTemplate org.springframework.orm.hibernate3.support.HibernateDaoSupport.getHibernateTemplate() 
     at org.springframework.orm.hibernate3.support.HibernateDaoSupport 
     at transaction.dao.AbstractSpringDao 
     at transaction.dao.CardTypeDao 
     at public transaction.dao.CardTypeDao transaction.logic.TransactionLogic.getCardTypeDao() 
     at transaction.logic.TransactionLogic 
     at public transaction.logic.TransactionLogic transaction.ws.jaxws.SetTransactionLogic.arg0 
     at transaction.ws.jaxws.SetTransactionLogic 
org.springframework.jdbc.support.SQLExceptionTranslator does not have a no-arg default constructor. 
    this problem is related to the following location: 
     at org.springframework.jdbc.support.SQLExceptionTranslator 
     at public org.springframework.jdbc.support.SQLExceptionTranslator org.springframework.orm.hibernate3.HibernateAccessor.getJdbcExceptionTranslator() 
     at org.springframework.orm.hibernate3.HibernateAccessor 
     at org.springframework.orm.hibernate3.HibernateTemplate 
     at public final org.springframework.orm.hibernate3.HibernateTemplate org.springframework.orm.hibernate3.support.HibernateDaoSupport.getHibernateTemplate() 
     at org.springframework.orm.hibernate3.support.HibernateDaoSupport 
     at transaction.dao.AbstractSpringDao 
     at transaction.dao.CardTypeDao 
     at public transaction.dao.CardTypeDao transaction.logic.TransactionLogic.getCardTypeDao() 
     at transaction.logic.TransactionLogic 
     at public transaction.logic.TransactionLogic transaction.ws.jaxws.SetTransactionLogic.arg0 
     at transaction.ws.jaxws.SetTransactionLogic 
org.hibernate.SessionFactory is an interface, and JAXB can't handle interfaces. 
    this problem is related to the following location: 
     at org.hibernate.SessionFactory 
     at public org.hibernate.SessionFactory org.springframework.orm.hibernate3.HibernateAccessor.getSessionFactory() 
     at org.springframework.orm.hibernate3.HibernateAccessor 
     at org.springframework.orm.hibernate3.HibernateTemplate 
     at public final org.springframework.orm.hibernate3.HibernateTemplate org.springframework.orm.hibernate3.support.HibernateDaoSupport.getHibernateTemplate() 
     at org.springframework.orm.hibernate3.support.HibernateDaoSupport 
     at transaction.dao.AbstractSpringDao 
     at transaction.dao.CardTypeDao 
     at public transaction.dao.CardTypeDao transaction.logic.TransactionLogic.getCardTypeDao() 
     at transaction.logic.TransactionLogic 
     at public transaction.logic.TransactionLogic transaction.ws.jaxws.SetTransactionLogic.arg0 
     at transaction.ws.jaxws.SetTransactionLogic 
org.hibernate.SessionFactory does not have a no-arg default constructor. 
    this problem is related to the following location: 
     at org.hibernate.SessionFactory 
     at public org.hibernate.SessionFactory org.springframework.orm.hibernate3.HibernateAccessor.getSessionFactory() 
     at org.springframework.orm.hibernate3.HibernateAccessor 
     at org.springframework.orm.hibernate3.HibernateTemplate 
     at public final org.springframework.orm.hibernate3.HibernateTemplate org.springframework.orm.hibernate3.support.HibernateDaoSupport.getHibernateTemplate() 
     at org.springframework.orm.hibernate3.support.HibernateDaoSupport 
     at transaction.dao.AbstractSpringDao 
     at transaction.dao.CardTypeDao 
     at public transaction.dao.CardTypeDao transaction.logic.TransactionLogic.getCardTypeDao() 
     at transaction.logic.TransactionLogic 
     at public transaction.logic.TransactionLogic transaction.ws.jaxws.SetTransactionLogic.arg0 
     at transaction.ws.jaxws.SetTransactionLogic 

    at com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnnotationsException.java:102) 
    at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:472) 
    at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:302) 
    at com.sun.xml.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1140) 
    at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:154) 
    at com.sun.xml.bind.api.JAXBRIContext.newInstance(JAXBRIContext.java:106) 
    at com.sun.xml.ws.developer.JAXBContextFactory$1.createJAXBContext(JAXBContextFactory.java:109) 
    at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:161) 
    at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:154) 
    ... 34 more 

Quelqu'un sait-il ce qui ne va pas exactement? Je ne sais pas pourquoi sa production tant d'erreurs, même si tout fonctionne très bien avec JAXWS 2.1

Répondre

Questions connexes