[
https://issues.jboss.org/browse/AS7-1553?page=com.atlassian.jira.plugin.s...
]
Richard Opalka resolved AS7-1553.
---------------------------------
Resolution: Done
@WebServiceRef Does not work
----------------------------
Key: AS7-1553
URL:
https://issues.jboss.org/browse/AS7-1553
Project: Application Server 7
Issue Type: Bug
Components: Web Services
Affects Versions: 7.0.1.Final
Reporter: Stuart Douglas
Assignee: Richard Opalka
Fix For: 7.1.0.Beta1
If you try and use @WebServiceRef you get an exception:
Caused by: java.lang.NoClassDefFoundError:
org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceObjectFactoryJAXWS
at
org.jboss.as.webservices.deployers.WebServiceRefAnnotationParsingProcessor$WebServiceRefValueSource.getValue(WebServiceRefAnnotationParsingProcessor.java:256)
If you then add a dependency on org.jboss.ws.jaxws-client to the module
org.jboss.as.webservices:main you get the following error:
java.lang.IllegalStateException: Failed to construct component instance
at
org.jboss.ejb3.tx2.impl.CMTTxInterceptor.handleExceptionInOurTx(CMTTxInterceptor.java:193)
at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:261)
at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.required(CMTTxInterceptor.java:359)
at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invoke(CMTTxInterceptor.java:219)
at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:35)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287)
[jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
at
org.jboss.as.ejb3.component.session.SessionInvocationContextInterceptor.processInvocation(SessionInvocationContextInterceptor.java:71)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287)
[jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
[jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
at
org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:146)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287)
[jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
[jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
at
org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:76)
at org.jboss.as.demos.ws.archive.SimpleStatelessSessionLocal$$$view2.echo(Unknown
Source) [classes:]
at org.jboss.as.demos.ws.archive.SimpleServlet.doGet(SimpleServlet.java:59) [classes:]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
[jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
[jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
[jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
[jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
[jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
[jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]
at
org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:139)
[jboss-as-web-7.1.0.Alpha1-SNAPSHOT.jar:7.1.0.Alpha1-SNAPSHOT]
at org.jboss.as.web.NamingValve.invoke(NamingValve.java:57)
[jboss-as-web-7.1.0.Alpha1-SNAPSHOT.jar:7.1.0.Alpha1-SNAPSHOT]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:154)
[jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
[jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
[jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)
[jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
[jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:667)
[jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:952)
[jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]
at java.lang.Thread.run(Thread.java:680) [:1.6.0_26]
Caused by: java.lang.IllegalStateException: Failed to construct component instance
at
org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:154)
at org.jboss.as.ee.component.BasicComponent.createInstance(BasicComponent.java:77)
at
org.jboss.as.ejb3.component.stateless.StatelessSessionComponent$1.create(StatelessSessionComponent.java:70)
at
org.jboss.as.ejb3.component.stateless.StatelessSessionComponent$1.create(StatelessSessionComponent.java:67)
at org.jboss.ejb3.pool.AbstractPool.create(AbstractPool.java:65)
at org.jboss.ejb3.pool.strictmax.StrictMaxPool.get(StrictMaxPool.java:145)
at
org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:41)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287)
[jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
at
org.jboss.as.ejb3.component.session.SessionInvocationContextInterceptor$CustomSessionInvocationContext.proceed(SessionInvocationContextInterceptor.java:126)
at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:257)
... 29 more
Caused by: java.lang.RuntimeException: org.jboss.wsf.spi.WSFException: Failed to provide
SPI:interface org.jboss.wsf.spi.serviceref.ServiceRefBinderFactory
at
org.jboss.as.webservices.deployers.WebServiceRefAnnotationParsingProcessor$WebServiceRefValueSource.getValue(WebServiceRefAnnotationParsingProcessor.java:258)
at
org.jboss.as.naming.ValueManagedReferenceFactory$1.getInstance(ValueManagedReferenceFactory.java:63)
at
org.jboss.as.ee.component.ManagedReferenceMethodInjectionInterceptor.processInvocation(ManagedReferenceMethodInjectionInterceptor.java:66)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287)
[jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)
[jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287)
[jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
at
org.jboss.as.ee.component.ManagedReferenceInterceptor.processInvocation(ManagedReferenceInterceptor.java:53)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287)
[jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)
[jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287)
[jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
at
org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:44)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287)
[jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
at
org.jboss.as.ejb3.component.session.SessionInvocationContextInterceptor.processInvocation(SessionInvocationContextInterceptor.java:71)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287)
[jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287)
[jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
[jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
at
org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:152)
... 38 more
Caused by: org.jboss.wsf.spi.WSFException: Failed to provide SPI:interface
org.jboss.wsf.spi.serviceref.ServiceRefBinderFactory
at org.jboss.ws.common.spi.DefaultSPIProvider.getSPI(DefaultSPIProvider.java:102)
at org.jboss.wsf.spi.SPIProvider.getSPI(SPIProvider.java:41)
[jbossws-spi-2.0.0.Beta6.jar:2.0.0.Beta6]
at
org.jboss.ws.common.serviceref.DefaultServiceRefHandler.getBinder(DefaultServiceRefHandler.java:62)
at
org.jboss.ws.common.serviceref.DefaultServiceRefHandler.createReferenceable(DefaultServiceRefHandler.java:56)
at
org.jboss.as.webservices.deployers.WebServiceRefAnnotationParsingProcessor$WebServiceRefValueSource.getReferenceable(WebServiceRefAnnotationParsingProcessor.java:272)
at
org.jboss.as.webservices.deployers.WebServiceRefAnnotationParsingProcessor$WebServiceRefValueSource.getValue(WebServiceRefAnnotationParsingProcessor.java:256)
... 55 more
It appears that there is no META_INF/services entry for this class. If you then start the
server with the system property
-Dorg.jboss.wsf.spi.serviceref.ServiceRefBinderFactory=org.jboss.wsf.stack.cxf.client.serviceref.CXFServiceRefBinderFactoryImpl
You get the following error:
Caused by: java.lang.RuntimeException: org.jboss.wsf.spi.WSFException: Cannot create
service
at
org.jboss.as.webservices.deployers.WebServiceRefAnnotationParsingProcessor$WebServiceRefValueSource.getValue(WebServiceRefAnnotationParsingProcessor.java:258)
at
org.jboss.as.naming.ValueManagedReferenceFactory$1.getInstance(ValueManagedReferenceFactory.java:63)
at
org.jboss.as.ee.component.ManagedReferenceMethodInjectionInterceptor.processInvocation(ManagedReferenceMethodInjectionInterceptor.java:66)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287)
[jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)
[jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287)
[jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
at
org.jboss.as.ee.component.ManagedReferenceInterceptor.processInvocation(ManagedReferenceInterceptor.java:53)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287)
[jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)
[jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287)
[jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
at
org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:44)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287)
[jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
at
org.jboss.as.ejb3.component.session.SessionInvocationContextInterceptor.processInvocation(SessionInvocationContextInterceptor.java:71)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287)
[jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287)
[jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
[jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
at
org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:152)
... 38 more
Caused by: org.jboss.wsf.spi.WSFException: Cannot create service
at org.jboss.wsf.spi.WSFException.rethrow(WSFException.java:55)
[jbossws-spi-2.0.0.Beta6.jar:2.0.0.Beta6]
at
org.jboss.ws.common.serviceref.AbstractServiceObjectFactoryJAXWS.getObjectInstance(AbstractServiceObjectFactoryJAXWS.java:123)
at
org.jboss.as.webservices.deployers.WebServiceRefAnnotationParsingProcessor$WebServiceRefValueSource.getValue(WebServiceRefAnnotationParsingProcessor.java:256)
... 55 more
Caused by: java.lang.ClassCastException:
org.jboss.wsf.stack.cxf.client.serviceref.CXFServiceReferenceableJAXWS cannot be cast to
javax.naming.Reference
at
org.jboss.ws.common.serviceref.AbstractServiceObjectFactoryJAXWS.getObjectInstance(AbstractServiceObjectFactoryJAXWS.java:87)
... 56 more
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira