aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Exception during calling a entity bean from a standalone client Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Exception during calling a entity bean from a standalone client" Watch "Exception during calling a entity bean from a standalone client" New topic
Author

Exception during calling a entity bean from a standalone client

naveen babu
Greenhorn

Joined: Nov 10, 2004
Posts: 8
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
 
subject: Exception during calling a entity bean from a standalone client
 
Similar Threads
Client for Calling a Entity Bean
EJB 3.0 Problems
Problem running entity bean from Tomcat 4.1.18 with Jboss 3.0.4
Calling EJB From the Client
Exception error