Is it possible that your *bean* class does not have an ejbCreate method with
the right arguments ?
Simon
> -----Original Message-----
> From: Francisco Andrades [mailto:[EMAIL PROTECTED]]
> Sent: gioved� 10 agosto 2000 17:16
> To: jBoss
> Subject: [jBoss-User] Problem with reflection
>
>
> Hi, i'm trying to run a client which uses reflection
> to handle the beans, but i' getting the following
> exception when trying to execute a method:
>
> java.lang.reflect.InvocationTargetException:
> java.rmi.ServerException: RemoteException occurred in
> server thread; nested exception is:
> java.rmi.ServerException: Could not call
> ejbCreate; nested exception is:
> java.lang.NoSuchMethodException
> java.rmi.ServerException: Could not call ejbCreate;
> nested exception is:
> java.lang.NoSuchMethodException
> java.lang.NoSuchMethodException
> at
> sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer
> (StreamRemoteCall.java:245)
> at
> sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCal
> l.java:220)
> at
> sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
> at
> org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker_Stub.in
> voke(Unknown
> Source)
> at
> org.jboss.ejb.plugins.jrmp.interfaces.StatelessSessionProxy.in
> voke(StatelessSessionProxy.java:87)
> at
> org.jboss.proxy.ProxyCompiler$Runtime.invoke(ProxyCompiler.java:74)
> at
> com.otonic.adminejb.AdminSession$Proxy.start(Unknown
> Source)
> at java.lang.reflect.Method.invoke(Native
> Method)
> at
> com.otonic.server.admin.AdminServlet.run(AdminServlet.java:135)
>
> the code i'm using is the following:
>
> // Set the properties
> System.setProperty("java.naming.factory.initial","org.jnp.inte
> rfaces.NamingContextFactory");
> System.setProperty("java.naming.provider.url","localhost:1099");
>
> // Get context
> InitialContext jndiContext = new InitialContext();
>
> // Get the reference
> Object ref = jndiContext.lookup("AdminSession");
>
> // Create the object
> Class c = ref.getClass();
> Class[] cArgs = new Class[0];
> Method m = c.getMethod("create",cArgs);
> Object[] oArgs = new Object[0];
> Object o = m.invoke(ref,null);
>
> // Execute the desired method
> Class c0 = o.getClass();
> Method m0 = c0.getMethod("start",cArgs);
> m0.invoke(o,null);
>
> The error ocurrs when the program gets to the invoke
> method. The imports i have are the following:
>
> import java.lang.reflect.*;
> import java.util.*;
> import java.io.*;
> import javax.naming.*;
> import java.rmi.*;
>
> I'm using Forte for Java 1.0, and the JDK 1.3 under
> NT4. I also imported some of jboss's jars to the
> project (ejb.jar, jnpserver.jar) and the classpath is
> set to:
>
> c:\jboss\lib\jmxri.jar
> c:\jboss\lib\ext\jboss.jar
> c:\jboss\lib\ext\jta-spec-1_0_1.jar
>
> I'm sure i'm missing something, but i have spent a lot
> of time in this, and haven't found a way out. I'll be
> very thankful.
>
> Thanks
> Francisco
>
> =====
> One ring to rule them all, one ring to find them
> one ring to bring them all and in the darkness bind them
>
> ... in the land of Mordor where the shadows lie
>
> __________________________________________________
> Do You Yahoo!?
> Kick off your party with Yahoo! Invites.
> http://invites.yahoo.com/
>
>
> --
> --------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> Problems?: [EMAIL PROTECTED]
>
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]