hi all,
I have written a generic service definition with header as follows. public static String retriveCateogaryId(String productStoreId,String userLoginId); main intension is to publish and access the internal cateogary ids through rmi. on accessing the service via rmi it shows an exception: Service method does not exist (org.ofbiz.hello3.CateogaryId.retriveCateogaryId(org.ofbiz.service.DispatchContext, java.util.Map)) org.ofbiz.service.GenericServiceException: Service method does not exist (org.ofbiz.hello3.CateogaryId.retriveCateogaryId(org.ofbiz.service.DispatchContext, java.util.Map)) at org.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:100) at org.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:54) at org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:384) at org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:213) at org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:149) at org.ofbiz.service.rmi.RemoteDispatcherImpl.runSync(RemoteDispatcherImpl.java:52) 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 sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294) at sun.rmi.transport.Transport$1.run(Transport.java:153) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:149) 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:595) at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247) at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223) at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126) at org.ofbiz.service.rmi.RemoteDispatcherImpl_Stub.runSync(Unknown Source) at Hello3Client.main(Hello3Client.java:56) java.lang.NoSuchMethodException: org.ofbiz.hello3.CateogaryId.retriveCateogaryId(org.ofbiz.service.DispatchContext, java.util.Map) at java.lang.Class.getMethod(Class.java:1581) at org.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:95) at org.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:54) at org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:384) at org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:213) at org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:149) at org.ofbiz.service.rmi.RemoteDispatcherImpl.runSync(RemoteDispatcherImpl.java:52) 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 sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294) at sun.rmi.transport.Transport$1.run(Transport.java:153) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:149) 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:595) java.lang.NoSuchMethodException: org.ofbiz.hello3.CateogaryId.retriveCateogaryId(org.ofbiz.service.DispatchContext, java.util.Map) at java.lang.Class.getMethod(Class.java:1581) at org.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:95) at org.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:54) at org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:384) at org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:213) at org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:149) at org.ofbiz.service.rmi.RemoteDispatcherImpl.runSync(RemoteDispatcherImpl.java:52) 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 sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294) at sun.rmi.transport.Transport$1.run(Transport.java:153) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:149) 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:595) my service description and definition as follows: <service name="retriveCateogaryId" engine="java" auth="false" export="true" location="org.ofbiz.hello3.CateogaryId" invoke="retriveCateogaryId"> <description>Retrives all Cateogary Id</description> <attribute name="productStoreId" mode="IN" type="String" optional="true"/> <attribute name="userLoginId" mode="IN" type="String" optional="true"/> <attribute name="cateogaryId" mode="OUT" type="String" optional="false"/> </service> Please help me as soon as possible as i am stuck on this for quite a few days now. |
Hi,
As you have given the definition of the service retriveCateogaryId. Service engine is serching for a service with follwoing: its from the log which you posted: (org.ofbiz.hello3.CateogaryId.retriveCateogaryId(org.ofbiz.service.DispatchContext,java.util.Map)) but you have not implemented the service in that manner. For reference just follow any of the java service from the framwork. Thanks and Regards -- Pranay Pandey On Tue, May 27, 2008 at 11:47 AM, Aravind_RP <[hidden email]> wrote: > > hi all, > > I have written a generic service definition with header as follows. > > public static String retriveCateogaryId(String productStoreId,String > userLoginId); > > main intension is to publish and access the internal cateogary ids through > rmi. > > on accessing the service via rmi it shows an exception: > > Service method does not exist > > (org.ofbiz.hello3.CateogaryId.retriveCateogaryId(org.ofbiz.service.DispatchContext, > java.util.Map)) > org.ofbiz.service.GenericServiceException: Service method does not exist > > (org.ofbiz.hello3.CateogaryId.retriveCateogaryId(org.ofbiz.service.DispatchContext, > java.util.Map)) > at > > org.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:100) > at > > org.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:54) > at > org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:384) > at > org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:213) > at > org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:149) > at > > org.ofbiz.service.rmi.RemoteDispatcherImpl.runSync(RemoteDispatcherImpl.java:52) > 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 > sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294) > at sun.rmi.transport.Transport$1.run(Transport.java:153) > at java.security.AccessController.doPrivileged(Native Method) > at sun.rmi.transport.Transport.serviceCall(Transport.java:149) > 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:595) > at > > sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247) > at > sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223) > at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126) > at org.ofbiz.service.rmi.RemoteDispatcherImpl_Stub.runSync(Unknown > Source) > at Hello3Client.main(Hello3Client.java:56) > java.lang.NoSuchMethodException: > > org.ofbiz.hello3.CateogaryId.retriveCateogaryId(org.ofbiz.service.DispatchContext, > java.util.Map) > at java.lang.Class.getMethod(Class.java:1581) > at > > org.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:95) > at > > org.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:54) > at > org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:384) > at > org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:213) > at > org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:149) > at > > org.ofbiz.service.rmi.RemoteDispatcherImpl.runSync(RemoteDispatcherImpl.java:52) > 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 > sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294) > at sun.rmi.transport.Transport$1.run(Transport.java:153) > at java.security.AccessController.doPrivileged(Native Method) > at sun.rmi.transport.Transport.serviceCall(Transport.java:149) > 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:595) > java.lang.NoSuchMethodException: > > org.ofbiz.hello3.CateogaryId.retriveCateogaryId(org.ofbiz.service.DispatchContext, > java.util.Map) > at java.lang.Class.getMethod(Class.java:1581) > at > > org.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:95) > at > > org.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:54) > at > org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:384) > at > org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:213) > at > org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:149) > at > > org.ofbiz.service.rmi.RemoteDispatcherImpl.runSync(RemoteDispatcherImpl.java:52) > 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 > sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294) > at sun.rmi.transport.Transport$1.run(Transport.java:153) > at java.security.AccessController.doPrivileged(Native Method) > at sun.rmi.transport.Transport.serviceCall(Transport.java:149) > 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:595) > > my service description and definition as follows: > > <service name="retriveCateogaryId" engine="java" auth="false" export="true" > location="org.ofbiz.hello3.CateogaryId" invoke="retriveCateogaryId"> > <description>Retrives all Cateogary Id</description> > <attribute name="productStoreId" mode="IN" type="String" > optional="true"/> > <attribute name="userLoginId" mode="IN" type="String" > optional="true"/> > <attribute name="cateogaryId" mode="OUT" type="String" > optional="false"/> > </service> > > Please help me as soon as possible as i am stuck on this for quite a few > days now. > > > -- > View this message in context: > http://www.nabble.com/java.lang.NoSuchMethodException%3A-tp17483787p17483787.html > Sent from the OFBiz - Dev mailing list archive at Nabble.com. > > |
In reply to this post by Aravind_RP
I cant pin point the error, but it may be due to the the following reasons:
1. Your class is not in the classpath. Check classpath in the ofbiz-compnent.xml that it includes the right libraries. 2. Your class name, package name and method name do not match exactly. 3. Your ofbiz-component.xml is not loading your service correctly. Thanks, Raj Raj Aravind_RP wrote: > hi all, > > I have written a generic service definition with header as follows. > > public static String retriveCateogaryId(String productStoreId,String > userLoginId); > > main intension is to publish and access the internal cateogary ids through > rmi. > > on accessing the service via rmi it shows an exception: > > Service method does not exist > (org.ofbiz.hello3.CateogaryId.retriveCateogaryId(org.ofbiz.service.DispatchContext, > java.util.Map)) > org.ofbiz.service.GenericServiceException: Service method does not exist > (org.ofbiz.hello3.CateogaryId.retriveCateogaryId(org.ofbiz.service.DispatchContext, > java.util.Map)) > at > org.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:100) > at > org.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:54) > at > org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:384) > at > org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:213) > at > org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:149) > at > org.ofbiz.service.rmi.RemoteDispatcherImpl.runSync(RemoteDispatcherImpl.java:52) > 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 > sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294) > at sun.rmi.transport.Transport$1.run(Transport.java:153) > at java.security.AccessController.doPrivileged(Native Method) > at sun.rmi.transport.Transport.serviceCall(Transport.java:149) > 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:595) > at > sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247) > at > sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223) > at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126) > at org.ofbiz.service.rmi.RemoteDispatcherImpl_Stub.runSync(Unknown > Source) > at Hello3Client.main(Hello3Client.java:56) > java.lang.NoSuchMethodException: > org.ofbiz.hello3.CateogaryId.retriveCateogaryId(org.ofbiz.service.DispatchContext, > java.util.Map) > at java.lang.Class.getMethod(Class.java:1581) > at > org.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:95) > at > org.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:54) > at > org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:384) > at > org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:213) > at > org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:149) > at > org.ofbiz.service.rmi.RemoteDispatcherImpl.runSync(RemoteDispatcherImpl.java:52) > 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 > sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294) > at sun.rmi.transport.Transport$1.run(Transport.java:153) > at java.security.AccessController.doPrivileged(Native Method) > at sun.rmi.transport.Transport.serviceCall(Transport.java:149) > 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:595) > java.lang.NoSuchMethodException: > org.ofbiz.hello3.CateogaryId.retriveCateogaryId(org.ofbiz.service.DispatchContext, > java.util.Map) > at java.lang.Class.getMethod(Class.java:1581) > at > org.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:95) > at > org.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:54) > at > org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:384) > at > org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:213) > at > org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:149) > at > org.ofbiz.service.rmi.RemoteDispatcherImpl.runSync(RemoteDispatcherImpl.java:52) > 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 > sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294) > at sun.rmi.transport.Transport$1.run(Transport.java:153) > at java.security.AccessController.doPrivileged(Native Method) > at sun.rmi.transport.Transport.serviceCall(Transport.java:149) > 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:595) > > my service description and definition as follows: > > <service name="retriveCateogaryId" engine="java" auth="false" export="true" > location="org.ofbiz.hello3.CateogaryId" invoke="retriveCateogaryId"> > <description>Retrives all Cateogary Id</description> > <attribute name="productStoreId" mode="IN" type="String" > optional="true"/> > <attribute name="userLoginId" mode="IN" type="String" > optional="true"/> > <attribute name="cateogaryId" mode="OUT" type="String" > optional="false"/> > </service> > > Please help me as soon as possible as i am stuck on this for quite a few > days now. > > > |
Free forum by Nabble | Edit this page |