Hi all,
I'm new to
jboss app. server. i have got a problem that is i created a sample application and deployed into jboss server 2.4.4 and tried with 3.0.8 also.
and also i have written a client program to access that bean. but i could not succeded. so please anybody give the procedure to write a client.
My client program is like this.
just check is my client prg. is giving any problem.
Hashtable p = new Hashtable();
p.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
p.put(Context.URL_PKG_PREFIXES, "jboss.naming
rg.jnp.interfaces");
p.put(Context.PROVIDER_URL, "localhost:1099");
InitialContext ic = new InitialContext(p);
Object o = ic.lookup("test/Tester");
TesterHome home = (TesterHome)
javax.rmi.PortableRemoteObject.narrow (o, TesterHome.class);
Tester
test = home.create();
System.out.println( test.returnMessage( args[0] ) );
==========
and exception is giving like this..
========
javax.naming.CommunicationException. Root exception is java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
java.lang.ClassNotFoundException: org.jnp.interfaces.MarshalledValuePair (no security manager: RMI class loader disabled)
java.lang.ClassNotFoundException: org.jnp.interfaces.MarshalledValuePair (no security manager: RMI class loader disabled)
at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
at sun.rmi.server.MarshalInputStream.resolveClass(Unknown Source)
at java.io.ObjectInputStream.inputClassDescriptor(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at java.io.ObjectInputStream.inputObject(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at sun.rmi.server.UnicastRef.unmarshalValue(Unknown Source)
at sun.rmi.server.UnicastRef.invoke(Unknown Source)
at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:349)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:333)
at javax.naming.InitialContext.lookup(Unknown Source)
at tester.TesterClient.main(TesterClient.java:26)
Thanks in Advance,
praveen