|
From: Colin S. <col...@ex...> - 2004-11-02 04:29:22
|
Karim, First of all, this is a list for development of Spring itself. You should be using the forums at forum.springframework.org, for help... As to your problem, I think your Local Interface does not actually implement your business interface... The proxy is blowing up at: ejb = getSessionBeanInstance(); return invocation.getMethod().invoke(ejb, invocation.getArguments()); basically the local interface that the ejb stub which comes back has, does not match the class on the actual Method object, which is coming from what you declared on the proxy... Colin Qazi, Karim wrote: > I am getting the following exception when accessing a proxy that is > set up as following, I have tested this and it worked when I deployed > my ejb module standalone and used > “SimpleRemoteStatelessSessionProxyFactoryBean” instead of > “LocalStatelessSessionProxyFactoryBean”. > > I pretty much just followed the ref. doc on the spring website. I know > the EJB has been deployed to the container and that the JNDI is > working because the bean I have that is using this “vehicleProxy” is > getting it just fine. Just when I try to call a method on the > “vehicleProxy” is when my exceptions start coming up. > > I am NOT implementing the interface VehicleServiceProxyI in my > LocalInterface only in my EJB BeanClass. > > Any ideas on why I am getting this exception would be greatly > appreciated!!! > > <bean id="vehicleProxy" name="vehicleProxy" > > class="org.springframework.ejb.access.LocalStatelessSessionProxyFactoryBean"> > > <property > name="jndiName"><value>com.edmunds.common.vehicles.service.VehicleServiceLocalHome</value></property> > > <property > name="businessInterface"><value>com.edmunds.common.vehicles.service.proxy.VehicleServiceProxyI</value></property> > > </bean> > > public interface VehicleServiceProxyI extends ServiceProxy{ > > //Methods are defined here. > > } > > public class VehicleServiceBean implements SessionBean, > VehicleServiceProxyI { > > } > > Caused by: java.lang.IllegalArgumentException: object is not an > instance of declaring class > > 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.springframework.ejb.access.LocalSlsbInvokerInterceptor.invoke(LocalSlsbInvokerInterceptor.java:60) > > at > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:138) > > at > org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:152) > > at $Proxy13.getModelByID(Unknown Source) > > at > com.edmunds.insideline.web.struts.TestProxyAction.execute(TestProxyAction.java:45) > > ... 16 more > |