I keep getting an error when I try to pass an object as an argument of a method
to my stateless bean. The object passed implements java.io.Serializable. Both
the EJB3 jar and the war contain the class file for the CreditCard object.
Please help me or point me to a resource where I can look at shom examples of
passing object through function calls using EJB3.
Here is the example code
//client side
public boolean validateCreditCardPurchase(CreditCard cc,
String amount, String merchantID) throws Exception {
InitialContext ctx = new InitialContext();
GeckoModelLocal gecko = (GeckoModelLocal) ctx.lookup
(GeckoModelLocal.class.getName());
return gecko.validateCreditCardPurchase(cc,amount,merchantID);
}
//EJB3 stateless session side
public boolean validateCreditCardPurchase(CreditCard cc, String amout,
String merchantID) throws Exception {
String cardHolderName = cc.getName();
return true;
}
//The error is
javax.ejb.EJBException: null; CausedByException is:
argument type mismatch
org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:46)
org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:70)
org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:134)
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:72)
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:39)
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:63)
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:93)
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:148)
org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:65)
$Proxy90.validateCreditCardPurchase(Unknown Source)
model.GeckoDelegate.validateCreditCardPurchase(GeckoDelegate.java:175)
account.action.WebHostingPaymentInformationAction.execute(WebHostingPaymentInformationAction.java:171)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3884447#3884447
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3884447
-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user