[RESOLU] EBJ3 + Webservice + Jboss

EBJ3 + Webservice + Jboss [RESOLU] - Java - Programmation

Marsh Posté le 28-02-2008 à 13:51:16    

Bonjour,
 
je développe actuellement un webservice sous eclipse en utilisant des EJB3. Lorsque je déploie mon webservice voici l'erreur que j'ai :

Code :
  1. 12:38:18,218 ERROR [MainDeployer] Could not start deployment: file:/C:/*******/jboss-4.2.2.GA/server/default/deploy/Serveur.jar
  2. java.lang.IllegalStateException: Cannot build JAXB context
  3. at org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilder.createJAXBContext(JAXWSMetaDataBuilder.java:925)
  4. at org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilder.buildWebServiceMetaData(JAXWSWebServiceMetaDataBuilder.java:146)
  5. at org.jboss.ws.metadata.builder.jaxws.JAXWSServerMetaDataBuilder.setupProviderOrWebService(JAXWSServerMetaDataBuilder.java:50)
  6. at org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilderEJB3.buildMetaData(JAXWSMetaDataBuilderEJB3.java:78)
  7. at org.jboss.wsf.stack.jbws.UnifiedMetaDataDeploymentAspect.create(UnifiedMetaDataDeploymentAspect.java:71)
  8. at org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl.deploy(DeploymentAspectManagerImpl.java:115)
  9. at org.jboss.wsf.container.jboss42.ArchiveDeployerHook.deploy(ArchiveDeployerHook.java:97)
  10. at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:90)
  11. at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
  12. at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
  13. at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  14. at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  15. at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  16. at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  17. at $Proxy34.start(Unknown Source)
  18. at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
  19. at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
  20. at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
  21. at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
  22. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  23. at java.lang.reflect.Method.invoke(Method.java:597)
  24. at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  25. at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  26. at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
  27. at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  28. at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
  29. at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  30. at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  31. at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  32. at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  33. at $Proxy9.deploy(Unknown Source)
  34. at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
  35. at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
  36. at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
  37. at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
  38. at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
  39. at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
  40. at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
  41. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  42. at java.lang.reflect.Method.invoke(Method.java:597)
  43. at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  44. at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  45. at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
  46. at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  47. at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  48. at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
  49. at $Proxy0.start(Unknown Source)
  50. at org.jboss.system.ServiceController.start(ServiceController.java:417)
  51. at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
  52. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  53. at java.lang.reflect.Method.invoke(Method.java:597)
  54. at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  55. at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  56. at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
  57. at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  58. at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  59. at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  60. at $Proxy4.start(Unknown Source)
  61. at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
  62. at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
  63. at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
  64. at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
  65. at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
  66. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  67. at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  68. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  69. at java.lang.reflect.Method.invoke(Method.java:597)
  70. at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  71. at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  72. at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
  73. at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  74. at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
  75. at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  76. at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  77. at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  78. at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  79. at $Proxy5.deploy(Unknown Source)
  80. at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
  81. at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
  82. at org.jboss.Main.boot(Main.java:200)
  83. at org.jboss.Main$1.run(Main.java:508)
  84. at java.lang.Thread.run(Thread.java:619)
  85. Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions
  86. java.util.Collection is an interface, and JAXB can't handle interfaces.
  87. this problem is related to the following location:
  88.  at java.util.Collection
  89. java.util.Collection does not have a no-arg default constructor.
  90. this problem is related to the following location:
  91.  at java.util.Collection


 
Donc ce qu'il faut je pense retenir de cette erreur est :

Code :
  1. Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions
  2. java.util.Collection is an interface, and JAXB can't handle interfaces.
  3. this problem is related to the following location:
  4.  at java.util.Collection
  5. java.util.Collection does not have a no-arg default constructor.
  6. this problem is related to the following location:
  7.  at java.util.Collection


 
Voila, quelqu'un peut-il m'aider ?


Message édité par hacksi le 29-02-2008 à 14:41:28
Reply

Marsh Posté le 28-02-2008 à 13:51:16   

Reply

Marsh Posté le 29-02-2008 à 09:01:07    

help :(

Reply

Marsh Posté le 29-02-2008 à 14:40:52    

Apparemment on ne peut pas envoyer une collection dans un webservice, il faut passer par un objet contenant cette collection et là ça fonctionne :)

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed