File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Exception during calling a entity bean from a standalone client

 
naveen babu
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai all

I am executing a simple CMP entity bean

while running the Client(StudentClient) i got this Error.
----------------------------------------------------------------------------
error in client javax.naming.CommunicationException [Root exception is java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: org.jnp.interfaces.FastNamingProperties (no security manager: RMI class loader disabled)]
--------------------------------------------------------------------------------------

my client code is

--------------------------------------------------------------------------------------
package student;

import javax.ejb.*;
import javax.naming.*;
import java.rmi.*;
import javax.rmi.*;
import java.util.*;

public class StudentClient
{
public static void main(String args[])
{
System.out.println("i am in start");
StudentHome home=null;
InitialContext jndiContext=null;
try{

Properties env = new Properties();
//env.setProperty("InitialContext.INITIAL_CONTEXT_FACTORY","org.jboss.naming");
env.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
env.setProperty("java.naming.provider.url", "localhost:1099");
env.setProperty("java.naming.factory.url.pkgs","org.jboss.naming rg.jnp.interfaces");
try{
jndiContext = new InitialContext(env);
}catch(Exception e){System.out.println("err in InitialCOntext");}
try{
home=(StudentHome)PortableRemoteObject.narrow(jndiContext.lookup("StudentHome"),StudentHome.class);
}catch(Exception e){System.out.println("err in StudentHome");}
try{
home.create("Ammamn","A01");
}catch(Exception e){System.out.println("err in HomeCreate");}
}catch(Exception e){System.out.println("error in client"+e);}

System.out.println("i am in end");
}

}

----------------------------------------------------------------------------
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic