[Design of JBoss Web Services] - Turning my Ejb3.0 to WebService
by rahul_neek
I am new in Web service and I am tring to turn my Ejb3.0 application to a web service.
I simply add a
@WebService(serviceName="Greeter",portName="GreeterPort") on my session bean class and try to deploy in jboss4.2.1 but it gives
===========================================
17:08:27,439 DEBUG [DTDEntityResolver] trying to resolve system-id [http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd]
17:08:27,439 DEBUG [EJB3DTDEntityResolver] recognized EJB3 ORM namespace; attempting to resolve on classpath under org/hibernate/ejb
17:08:27,439 DEBUG [EJB3DTDEntityResolver] located [http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd] in classpath
17:08:28,563 ERROR [ServiceEndpointDeployer] Cannot create service endpoint
java.lang.ClassCastException: com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$5 cannot be cast to com.sun.xml.bind.v2.model.impl.ClassInfoImpl
at com.sun.xml.bind.v2.model.impl.ClassInfoImpl.getBaseClass(ClassInfoImpl.java:170)
at com.sun.xml.bind.v2.model.impl.RuntimeClassInfoImpl.getBaseClass(RuntimeClassInfoImpl.java:59)
at com.sun.xml.bind.v2.model.impl.RuntimeClassInfoImpl.getBaseClass(RuntimeClassInfoImpl.java:39)
at com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:142)
at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:48)
at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:40)
at com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:189)
at com.sun.xml.bind.v2.model.impl.TypeRefImpl.calcRef(TypeRefImpl.java:56)
at com.sun.xml.bind.v2.model.impl.TypeRefImpl.getTarget(TypeRefImpl.java:33)
at com.sun.xml.bind.v2.model.impl.RuntimeTypeRefImpl.getTarget(RuntimeTypeRefImpl.java:22)
at com.sun.xml.bind.v2.model.impl.RuntimeTypeRefImpl.getTarget(RuntimeTypeRefImpl.java:15)
at com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl$1.get(ElementPropertyInfoImpl.java:38)
at com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl$1.get(ElementPropertyInfoImpl.java:41)
at java.util.AbstractList$Itr.next(AbstractList.java:345)
at com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:139)
at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:48)
at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:40)
at com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:189)
at com.sun.xml.bind.v2.model.impl.TypeRefImpl.calcRef(TypeRefImpl.java:56)
at com.sun.xml.bind.v2.model.impl.TypeRefImpl.getTarget(TypeRefImpl.java:33)
at com.sun.xml.bind.v2.model.impl.RuntimeTypeRefImpl.getTarget(RuntimeTypeRefImpl.java:22)
at com.sun.xml.bind.v2.model.impl.RuntimeTypeRefImpl.getTarget(RuntimeTypeRefImpl.java:15)
at com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl$1.get(ElementPropertyInfoImpl.java:38)
at com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl$1.get(ElementPropertyInfoImpl.java:41)
at java.util.AbstractList$Itr.next(AbstractList.java:345)
at com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:139)
at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:48)
at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:40)
at com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:189)
at com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:204)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:356)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.(JAXBContextImpl.java:217)
at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:76)
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 com.sun.xml.bind.api.JAXBRIContext.newInstance(JAXBRIContext.java:76)
at org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilder.createJAXBContext(JAXWSMetaDataBuilder.java:875)
at org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilder.buildWebServiceMetaData(JAXWSWebServiceMetaDataBuilder.java:128)
at org.jboss.ws.metadata.builder.jaxws.JAXWSServerMetaDataBuilder.setupProviderOrWebService(JAXWSServerMetaDataBuilder.java:49)
at org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilderEJB3.buildMetaData(JAXWSMetaDataBuilderEJB3.java:77)
at org.jboss.ws.core.server.ServiceEndpointDeployer.create(ServiceEndpointDeployer.java:92)
at org.jboss.ws.integration.jboss42.DeployerInterceptor.createServiceEndpoint(DeployerInterceptor.java:127)
at org.jboss.ws.integration.jboss42.DeployerInterceptorEJB.createServiceEndpoint(DeployerInterceptorEJB.java:43)
at org.jboss.ws.integration.jboss42.DeployerInterceptor.create(DeployerInterceptor.java:78)
at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.create(SubDeployerInterceptorSupport.java:180)
at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:91)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy34.create(Unknown Source)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:969)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:818)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy9.deploy(Unknown Source)
==========================================
waiting for ur reply
Thanks in advance
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4227489#4227489
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4227489
15 years, 8 months
JBossWS 3.1.1.GA supports Jboss AS 4.2.2?
by Yang, Gang CTR USA
Hi,
JBossWS 3.1.1.GA release announcement stated that the supported target
contains are Jboss 4.2.3.GA, 5.0.0.GA and 5.0.1.GA. Is Jboss 4.2.2.GA
supported? Did anyone try the release with JBoss4.2.2.GA and was there
any issues? We are using Jboss 4.2.2.GA and definitely need JBossWS
3.1.1.GA for the resource injection fix. I'm trying to determine if
upgrading Jboss to 4.2.3.GA is necessary.
Thanks,
Gang
15 years, 8 months
Resource still not injected in JAX-WS handler for EJB3 WS in JBossWS 3.1.1 deployed in Jboss 5.0.0.GA
by Yang, Gang CTR USA
Hi,
I deployed the JBossWS 3.1.1 into Jboss 5.0.0.GA and ran my two tests
for JAX-WS handler with two simple WebService endpoints, one Web-based
and one EJB3-based. The resource injection in the handler for the
Web-based WS endpoint worked (it did not work for earlier JBossWS
release), but the resource injection in the handler (the same class) for
the EJB3-based WS endpoint did not work. Here's some more details:
1. The same handler code was used for both tests. The handler jar was
copied into $JBOSS_HOME/lib/endorsed for sharing.
2. For the EJB3-based WS endpoint, Jboss threw the following exception
that seem to indicate that the java:comp/env was not bound:
---
16:50:37,000 WARN [JavaxAnnotationHelper] Cannot inject @Resource
annotated field: private java.lang.String
test.handler.TestServerHandler.configFile
javax.naming.NameNotFoundException: env not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)
at org.jnp.server.NamingServer.getObject(NamingServer.java:785)
at org.jnp.server.NamingServer.lookup(NamingServer.java:396)
at
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:713)
at
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:820)
at
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:673)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at
org.jboss.wsf.common.javax.JavaxAnnotationHelper.inject(JavaxAnnotationH
elper.java:284)
at
org.jboss.wsf.common.javax.JavaxAnnotationHelper.injectResources(JavaxAn
notationHelper.java:148)
at
org.jboss.ws.core.jaxws.handler.HandlerResolverImpl.addHandler(HandlerRe
solverImpl.java:171)
at
org.jboss.ws.core.jaxws.handler.HandlerResolverImpl.initHandlerChain(Han
dlerResolverImpl.java:149)
at
org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS.callRequestHandlerC
hain(HandlerDelegateJAXWS.java:88)
at
org.jboss.ws.core.server.ServiceEndpointInvoker.callRequestHandlerChain(
ServiceEndpointInvoker.java:125)
at
org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointIn
voker.java:172)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandle
rImpl.java:474)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandler
Impl.java:295)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.ja
va:205)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHan
dlerImpl.java:131)
at
org.jboss.wsf.common.servlet.AbstractEndpointServlet.service(AbstractEnd
pointServlet.java:85)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:206)
at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilte
r.java:96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:235)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:191)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAs
sociationValve.java:190)
at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.j
ava:92)
at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(
SecurityContextEstablishmentValve.jav
a:126)
at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(S
ecurityContextEstablishmentValve.java
:70)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:102)
at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConn
ectionValve.java:158)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:3
30)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:82
8)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
Http11Protocol.java:601)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
----
3. However, in JNDIView, under my EJB3 component's env namespace, it did
show the name, "configFile", I'm using to inject the resource, which is
simply a String.
4. As fact of the matter, I did inject the same resource inside the EJB3
and it did work.
I tend to think that somehow the resource injection still does not work
for the case of EJB3's handler and plan to create an item in JIRA. If
anyone has more insight or suggestions, it would be appreciated.
Thanks,
Gang
15 years, 8 months
JBossWS release plan for the next months
by Alessio Soldano
Hi everybody,
I've just updated the JBossWS jira with new releases:
- JBossWS 3.2.0 : expected release by the end of June 2009, major
changes in the deployers, removing of JBoss Remoting dependency, etc.
- JBossWS 3.1.2 (native and cxf stacks only): this is for EAP 5.
Some issues are currently marked with both fix versions as we'll see
around week 19th if we can make the 3.1.2 release in time for installing
it on AS 5.1.0.GA (component freeze for AS 5.1.0.GA is May, 11th)
Trunk is currently for both versions; to reduce porting work we'll
branch for 3.1.2 as soon as that's required (write me if you need to
commit something targeted for 3.2.0 or 3.1.2 only, I'll promptly create
the branches).
Cheers
Alessio
--
Alessio Soldano
Web Service Lead
JBoss, a division of Red Hat
15 years, 8 months
JBossWS 3.2.0 Priorities
by Richard Opalka
Hi Alessio,
I was thinking about JBossWS 3.2.0 priorities and here's my list I
came up with:
1.) Fix JBossWS-CXF TCK5 regressions
2.) JBossWS-Native issues (standard hotfixes)
3.) Migrate JBossWS documentation to new Wiki
4.) JBossWS-Native and JBossWS-CXF test excludes clenaup
Let's start discussing the priorities ;)
Cheers,
Richard
--
B.Sc. Richard Opalka
Senior Software Engineer
JBoss, a division of Red Hat
Mobile: +420 731 186 942
Mail: ropalka(a)redhat.com
15 years, 8 months