AlistairMonkeyFinger
Programmer
Hiya,
i've spent a day now on this and can't figure it out. I've created a very basic session bean, and packaged it up into an .ear file. The MySessionEJBBean.java contains the following:
and the MySessionEJB.java interface contains
[/code]String SayHello() throws RemoteException;
When i run it, it seems to connect to the server and find the EJB just fine, but it won't run the
method and fails with a
I've worked the same code locally from within Oracle's JDeveloper and it works fine, but just won't seem to work remotely from another server. Has anyone any ideas whats wrong or point me in a good direction to start looking ??
TIA
Alistair
i've spent a day now on this and can't figure it out. I've created a very basic session bean, and packaged it up into an .ear file. The MySessionEJBBean.java contains the following:
Code:
public String SayHello()
{
return "Hello World";
}
[/code]String SayHello() throws RemoteException;
Code:
I've copied the .ear to my app server (Oracle 9iAS OC4J container) and deployed with no error messages, all the relavent files seem to be in the correct place on the server after deployment.
Now, i've created a client application that connects to the server....
[code]
try
{
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
env.put(Context.SECURITY_PRINCIPAL, "admin");
env.put(Context.SECURITY_CREDENTIALS, "admin");
env.put(Context.PROVIDER_URL, "ormi://uksap13:23791/MySessionEJB");
Context ctx = new InitialContext(env);
MySessionEJBHome mySessionEJBHome = (MySessionEJBHome)ctx.lookup("MySessionEJB");
MySessionEJB mySessionEJB = mySessionEJBHome.create();
System.out.println("Connected !");
mystring = mySessionEJB.SayHello();
System.out.println(mystring);
}
catch(Throwable ex)
{
ex.printStackTrace();
}
When i run it, it seems to connect to the server and find the EJB just fine, but it won't run the
Code:
SayHello()
Code:
java.lang.NullPointerException
I've worked the same code locally from within Oracle's JDeveloper and it works fine, but just won't seem to work remotely from another server. Has anyone any ideas whats wrong or point me in a good direction to start looking ??
TIA
Alistair