This content has been marked as final.
Show 4 replies
-
1. Re: Caused by: java.rmi.ServerException: RuntimeException; n
sesques Apr 16, 2004 3:19 AM (in response to isurunishan2000)Post more logs and more code snippet, not just saying IT NOT WORK.
Unable to investigate without infos. -
2. Re: Caused by: java.rmi.ServerException: RuntimeException; n
isurunishan2000 Apr 16, 2004 8:03 AM (in response to isurunishan2000)"sesques" wrote:
Post more logs and more code snippet, not just saying IT NOT WORK.
Unable to investigate without infos.
This is the client code I used (auto generated by eclipse)
/*
* Created on Apr 16, 2004
*
* To change the template for this generated file go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
package virtusa.dashboard.administrator.test;
import java.rmi.RemoteException;
import java.util.Hashtable;
import javax.ejb.CreateException;
import javax.naming.InitialContext;
import javax.naming.NamingException;
/**
* @author isamaraweera
*
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
public class TestClient {
private virtusa.dashboard.administrator.session.ServiceAccessHome getHome()
throws NamingException {
return (
virtusa
.dashboard
.administrator
.session
.ServiceAccessHome) getContext()
.lookup(
virtusa
.dashboard
.administrator
.session
.ServiceAccessHome
.JNDI_NAME);
}
private InitialContext getContext() throws NamingException {
Hashtable props = new Hashtable();
props.put(
InitialContext.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
props.put(InitialContext.PROVIDER_URL, "jnp://127.0.0.1:1099");
// This establishes the security for authorization/authentication
props.put(InitialContext.SECURITY_PRINCIPAL,"");
props.put(InitialContext.SECURITY_CREDENTIALS,"");
InitialContext initialContext = new InitialContext(props);
return initialContext;
}
public void testBean() {
try {
virtusa.dashboard.administrator.session.ServiceAccess myBean =
getHome().create();
System.out.println(myBean.loginUser("isuru","isuru"));
//--------------------------------------
//This is the place you make your calls.
//System.out.println(myBean.callYourMethod());
} catch (RemoteException e) {
e.printStackTrace();
} catch (CreateException e) {
e.printStackTrace();
} catch (NamingException e) {
e.printStackTrace();
}
}
public static void main(String[] args) {
TestClient test = new TestClient();
test.testBean();
}
} -
3. Re: Caused by: java.rmi.ServerException: RuntimeException; n
sesques Apr 16, 2004 9:17 AM (in response to isurunishan2000)Are you sure you can access the InitialContext.INITIAL_CONTEXT_FACTORY wihout an Initial context instance ?
No more idea with this code snippet.
Perhaps with the full log. -
4. Re: Caused by: java.rmi.ServerException: RuntimeException; n
sesques Apr 16, 2004 9:31 AM (in response to isurunishan2000)Forget my previous comment. Its ridiculous.
I have really no idea.
Sorry.