[JBossWS] - JBossWS 1.2.1 issues
by tzhou
I've been using JBossWS 1.2.1 along with Sun's Wiseman API for WS-Management development. Let's say it's an eye-opening experience. After days of hard debugging, here are some of the issues (or non-issues) I found. Either case, I hope my time spent can be of some value.
1. WRONG_DOCUMENT_ERR when marshaling a SOAP document complaining that caller tries to append a node to another node that belongs to a different owner document
Turns out the problem was caused by DOMUtils, which uses ThreadLocal to keep track of owner document. This would work fine if everything is in the same thread. But in my case, Wiseman code constructs a response message, and then pass that response object to a separate handler thread for further processing. And that becomes a _problem_. I'm not sure about the rationale behind the threadlocal mechanism, but to me assuming all DOM processing is in one thread is simply dangerous. Thoughts?
2. JAXB and JBossWS compatibility issue
The upper-level code (Wiseman) constructs a SOAP message, and uses JAXB to marshal content to the body, something like "marshaller.marshal(contentObj, getBody())". The result: only the top-level node gets added to the body, but not its decedents. After some digging, I found the problem was caused by SOAPBodyImpl.appendChild(), which constructs a new child from the existing child node. This apparently is a problem for JAXB, since the subsequent tree construction is all based on the original child node.
FYI, I'm using JBossWS 1.2.1GA.
-Ting
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4043805#4043805
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4043805
19 years
[JBoss Seam] - Problem Extending EntityHome with a SFSB
by michael.yuan@jboss.com
Hi,
Sorry if someone has already asked this ... I am having a problem extending EntityHome with EJB3 SFSBs. So, basically, I have a interface to define the methods I want to use in EntityHome:
| public interface PersonDaoInt {
| EntityManager getEntityManager();
| Object getId();
| String persist ();
| String update ();
| String remove ();
| public void destroy ();
| }
|
Then, the bean method is like the following:
| @Stateful
| @Name("personDao")
| public class PersonDao extends EntityHome <Person>
| implements PersonDaoInt {
|
| // Configure the entity manager
| @PersistenceContext (type=EXTENDED)
| private EntityManager em;
|
| public EntityManager getEntityManager () {
| return em;
| }
|
| // Configure the HTTP GET parameter on the page
| @RequestParameter
| Long pid;
|
| public Object getId() { return pid; }
|
| // SFSB requirement
| @Remove @Destroy
| public void destroy () { }
| }
|
But at deployment time (JBoss 4.0.5 GA), EJB3 complains the following. Does it mean the "remove()" is no longer allowed in EJB3 SFSBs?
| java.lang.IllegalArgumentException: methods with same signature remove() but incompatible return types: void and others
| at sun.misc.ProxyGenerator.checkReturnTypes(ProxyGenerator.java:610)
| at sun.misc.ProxyGenerator.generateClassFile(ProxyGenerator.java:420)
| at sun.misc.ProxyGenerator.generateProxyClass(ProxyGenerator.java:306)
| at java.lang.reflect.Proxy.getProxyClass(Proxy.java:501)
| at org.jboss.ejb3.stateful.BaseStatefulProxyFactory.init(BaseStatefulProxyFactory.java:58)
| at org.jboss.ejb3.stateful.BaseStatefulProxyFactory.start(BaseStatefulProxyFactory.java:66)
| at org.jboss.ejb3.stateful.StatefulLocalProxyFactory.start(StatefulLocalProxyFactory.java:61)
| at org.jboss.ejb3.ProxyDeployer.start(ProxyDeployer.java:105)
| at org.jboss.ejb3.SessionContainer.start(SessionContainer.java:124)
| at org.jboss.ejb3.stateful.StatefulContainer.start(StatefulContainer.java:91)
| 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:585)
| at org.jboss.ejb3.ServiceDelegateWrapper.startService(ServiceDelegateWrapper.java:102)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
| at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
| at $Proxy0.start(Unknown Source)
| at org.jboss.system.ServiceController.start(ServiceController.java:417)
| at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| 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 $Proxy54.start(Unknown Source)
| at org.jboss.ejb3.JmxKernelAbstraction.install(JmxKernelAbstraction.java:96)
| at org.jboss.ejb3.Ejb3Deployment.registerEJBContainer(Ejb3Deployment.java:281)
| at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:328)
| at org.jboss.ejb3.Ejb3Module.startService(Ejb3Module.java:91)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
| at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| ... ...
|
Anyone know what's going on? Thanks. Please let me know if you want more error trace.
cheers
Michael
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4043795#4043795
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4043795
19 years