Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within EJB and other Jakarta /Java EE Technologies
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
EJB and other Jakarta /Java EE Technologies
Call EJB method
Andris Sigs
Greenhorn
Posts: 19
posted 10 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Sorry for my English.
I have
EJB
:
public class CtrlEJB extends CtrlImplEJB { ..... public SaleModel doSale(SaleModel sale) throws ValidationException { log.info("test"); return new SaleModel(); } ..... }
When I call doSale method remotely, I get error on server:
ERROR [:LogInterceptor:RMI TCP Connection(2)-127.0.0.1] RuntimeException in method: public abstract SaleModel CtrlEJB.doSale(SaleModel) throws ValidationException, java.rmi.RemoteException java.lang.IllegalArgumentException: wrong number of arguments 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:324) at org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor.invoke(StatefulSessionContainer.java:982) at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:111) at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186) at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84) at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:144) at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:62) at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:273) at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191) at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122) at org.jboss.ejb.StatefulSessionContainer.internalInvoke(StatefulSessionContainer.java:449) at org.jboss.ejb.Container.invoke(Container.java:709) at sun.reflect.GeneratedMethodAccessor119.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:62) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54) at org.jboss.mx.server.Invocation.invoke(Invocation.java:82) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:197) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473) at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:360) at sun.reflect.GeneratedMethodAccessor129.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261) at sun.rmi.transport.Transport$1.run(Transport.java:148) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:144) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701) at java.lang.Thread.run(Thread.java:534)
Other methods in this class works successfully.
Please help. Thanks You!
Jorge Montes
Greenhorn
Posts: 14
posted 10 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
The exception cause is: wrong number of arguments. You are calling the method doSale(SaleModel sale) with the wrong arguments. How are you calling the method?
Andris Sigs
Greenhorn
Posts: 19
posted 10 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
ctrl.doSale(sale);
sale is instance of SaleModel.
James Boswell
Bartender
Posts: 1051
5
I like...
posted 10 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Meanwhile, over on SO:
http://stackoverflow.com/questions/18827077/call-ejb-method
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Loading BusinessDelegates in Servlet Context?
EJB Deployment descriptor problem
error delploying ear file on JBOSS 3.0.8
ejb error
Jboss Error
More...