aspose file tools*
The moose likes JBoss/WildFly and the fly likes unable to call bean from jboss server!!! HELP NEEDED!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "unable to call bean from jboss server!!! HELP NEEDED!!" Watch "unable to call bean from jboss server!!! HELP NEEDED!!" New topic
Author

unable to call bean from jboss server!!! HELP NEEDED!!

praveen
Greenhorn

Joined: Jun 23, 2003
Posts: 4
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
Jason Stull
Ranch Hand

Joined: Feb 02, 2004
Posts: 47
You may need to include the jars in <jboss-dist>/client/ in the classpath for your test client app.


"I believe in coyotes and time as an abstract Explain the change the difference between What you want and what you need there's the key"
sudhi Raghavendra
Greenhorn

Joined: Feb 28, 2003
Posts: 1
[B]I still get this inspite of adding a few jars like jboss-allclient.jar, jnet.jar. Is there a specific list of jars to use. I am using jboss3.2.3[B]
javax.naming.CommunicationException [Root exception is java.lang.ClassNotFoundException: demos.ejb.enti
ty.bmp.EntityDemoHome (no security manager: RMI class loader disabled)]
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:652)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:507)
at javax.naming.InitialContext.lookup(Unknown Source)
at demos.ejb.entity.test.BMPEntityDriver.main(Unknown Source)
Caused by: java.lang.ClassNotFoundException: demos.ejb.entity.bmp.EntityDemoHome (no security manager:
RMI class loader disabled)
at sun.rmi.server.LoaderHandler.loadProxyClass(Unknown Source)
at java.rmi.server.RMIClassLoader$2.loadProxyClass(Unknown Source)
at java.rmi.server.RMIClassLoader.loadProxyClass(Unknown Source)
at sun.rmi.server.MarshalInputStream.resolveProxyClass(Unknown Source)
at java.io.ObjectInputStream.readProxyDesc(Unknown Source)
at java.io.ObjectInputStream.readClassDesc(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at java.rmi.MarshalledObject.get(Unknown Source)
at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:30)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:550)
... 3 more

Thanks in advance
[ April 28, 2004: Message edited by: sudhi Raghavendra ]
[ April 28, 2004: Message edited by: sudhi Raghavendra ]
Alex Sharkoff
Ranch Hand

Joined: Apr 11, 2004
Posts: 209
Sudhi,
This link might be of help to you:
http://www.artima.com/forums/flat.jsp?forum=61&thread=4083


Alex (SCJP 1.4, SCBCD 1.3, SCWCD 1.4, SCJD 1.4)
 
Don't get me started about those stupid light bulbs.
 
subject: unable to call bean from jboss server!!! HELP NEEDED!!