aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes problem using XMLBeans from a stateless session bean (WSAD 5.1) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "problem using XMLBeans from a stateless session bean (WSAD 5.1)" Watch "problem using XMLBeans from a stateless session bean (WSAD 5.1)" New topic
Author

problem using XMLBeans from a stateless session bean (WSAD 5.1)

Manikanda Prabhu
Greenhorn

Joined: Oct 09, 2006
Posts: 2
Hi

Im trying to access static method in a java class from a stateless session bean. here the code

import org.apache.xmlbeans.*;

public class Parser
{

public static void XmlObject createXMLFile(String request)
{
XmlObject obj = null;
try {
obj = XmlObject.Factory.parse(request);
}
catch (XMLException e)
{
e.printStackTrace();
}
return obj;
}
}

when I run this code as a standalone application, im getting the request
object without any error. But when i call this method createXMLFIle() from a stateless session bean im getting the following error "

CNTR0020E: Non-application exception occurred while processing method "serviceDispatcher"
on bean "BeanId(Eap_BillPay#BillPayEjb.jar#BillPayExecutor, null)". Exception data: java.lang.NoSuchMethodError
: java/lang/reflect/InvocationTargetException.getCause()Ljava/lang/Throwable;"


Any pointers regarding this? Im using WSAD 5.1 Test environment to run
this.

[10/9/06 18:49:28:175 IST] 52175217 ExceptionUtil E CNTR0020E: Non-application exception
occurred while processing method "serviceDispatcher" on bean "BeanId(Eap_BillPay#BillPayEjb.jar#BillPayExecutor,
null)". Exception data:
java.lang.NoSuchMethodError: java/lang/reflect/InvocationTargetException.getCause()Ljava/lang/Throwable;
at java.lang.Throwable.<init (Throwable.java)
at java.lang.Throwable.<init (Throwable.java)
at
java.lang.NoSuchMethodError.<init (NoSuchMethodError.java:56)
at org.apache.xmlbeans.XmlBeans.getNoType(XmlBeans.java:864)
at org.apache.xmlbeans.XmlBeans.<clinit (XmlBeans.java:881)
at java.lang.Class.initializeImpl
(Native Method)
at java.lang.Class.initialize(Class.java)
at org.apache.xmlbeans.XmlObject$Factory.parse(XmlObject.java:579)
at com.bac.esb.bpc.xmlbeans.SoapParser.createPoXMLFile(SoapParser.java)
at com.bac.esb.bpc.dispatcher.BillPayExecutorBean.serviceDispatcher
(BillPayExecutorBean.java)
at com.bac.esb.bpc.dispatcher.EJSRemoteStatelessBillPayExecutor_c55d592f.serviceDispatcher(EJSRemoteStatelessBillPayExecutor_c55d592f.java)
at com.bac.esb.bpc.dispatcher._BillPayExecutor_Stub.serviceDispatcher
(_BillPayExecutor_Stub.java:259)
at com.bac.esb.bpc.webservices.jms.BpListenerBean.onMessage(BpListenerBean.java)
at com.ibm.ejs.jms.listener.MDBWrapper$PriviledgedOnMessage.run(MDBWrapper.java:205)
at java.security.AccessController.doPrivileged
(AccessController.java)
at com.ibm.ejs.jms.listener.MDBWrapper.callOnMessage(MDBWrapper.java:194)
at com.ibm.ejs.jms.listener.MDBWrapper.onMessage(MDBWrapper.java:172)
at com.ibm.mq.jms.MQSession.run(MQSession.java
:1043)
at com.ibm.ejs.jms.JMSSessionHandle.run(JMSSessionHandle.java:922)
at com.ibm.ejs.jms.listener.ServerSession.connectionConsumerOnMessage(ServerSession.java:697)
at com.ibm.ejs.jms.listener.ServerSession.onMessage
(ServerSession.java:482)
at com.ibm.ejs.jms.listener.ServerSession.dispatch(ServerSession.java:449)
at java.lang.reflect.AccessibleObject.invokeImpl(Native Method)
at java.lang.reflect.AccessibleObject.invokeV
(AccessibleObject.java:199)
at java.lang.reflect.Method.invoke(Method.java)
at com.ibm.ejs.jms.listener.ServerSessionDispatcher.dispatch(ServerSessionDispatcher.java:37)
at com.ibm.ejs.container.MDBWrapper.onMessage
(MDBWrapper.java:91)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:127)
at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:372)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java
:593)
[10/9/06 18:49:33:035 IST] 52175217 SystemErr R java.rmi.ServerException: RemoteException
occurred in server thread; nested exception is:
java.rmi.RemoteException: ; nested exception is:
java.lang.NoSuchMethodError
: java/lang/reflect/InvocationTargetException.getCause()Ljava/lang/Throwable;
[10/9/06 18:49:33:035 IST] 52175217 SystemErr R java.rmi.RemoteException: ; nested
exception is:
java.lang.NoSuchMethodError: java/lang/reflect/InvocationTargetException.getCause()Ljava/lang/Throwable;

[10/9/06 18:49:33:035 IST] 52175217 SystemErr R java.lang.NoSuchMethodError: java/lang/reflect/InvocationTargetException.getCause()Ljava/lang/Throwable;



--
Regards
mkprabhu
Arun Prasath
Ranch Hand

Joined: Aug 14, 2006
Posts: 30
The method returns obj then why there is a need for void
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem using XMLBeans from a stateless session bean (WSAD 5.1)