• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You may need to include the jars in <jboss-dist>/client/ in the classpath for your test client app.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
[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 ]
 
Ranch Hand
Posts: 209
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sudhi,
This link might be of help to you:
http://www.artima.com/forums/flat.jsp?forum=61&thread=4083
 
A tiny monkey bit me and I got tiny ads:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic