Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> receiving an exception getting the initial context - why?
Hi all,
env Oracle 8i 8.1.5, NT, JDK 1.1.7
I make a simple EJB (similar to the helloworld) and I successfully deployed them using this DD:
SessionBean acmeServer.SimpleBean
{
BeanHomeName="test/mySimple
HomeInterfaceClassName=acme.SimpleHome;
RemoteInterfaceClassName=acme.Simple;
EnvironmentProperties {
ejb.name=acme.Simple;
}
RunAsMode=CLIENT_IDENTITY;
TransactionAttribute=TX_REQUIRED;
AllowedIdentities={PUBLIC};
}
as you can see from the output of the sess_sh:
D:\>sess_sh -u scott -p tiger -s sess_iiop://localhost:2481:alberto
--Aurora/ORB Session Shell--
--type "help" at the command line for help message
$ ls
bin/ etc/ test/
$ cd test
$ ls
myHello mySimple simple
$
But if I run the client an exception is thrown getting the initial context. I used the same client of the helloworld example:
...
29: SimpleHome simple_home = (SimpleHome)ic.lookup (serviceURL +
objectName);
30: Simple simple = simple_home.create();
31: System.out.println (simple.helloWorld());
and I run it with the following:
D:\>java Client sess_iiop://localhost:2481:alberto /test/mySimple scott
tiger
[Root exception is
java.lang.NullPointerException: ]javax.naming.NamingException
: Unknown reasons
at
oracle.aurora.jndi.sess_iiop.SessionCtx._activate(SessionCtx.java:82)
at
oracle.aurora.jndi.sess_iiop.SessionCtx.activate(SessionCtx.java:276)
at
oracle.aurora.jndi.sess_iiop.ServiceCtx.lookup(ServiceCtx.java:320)
at
oracle.aurora.jndi.sess_iiop.sess_iiopURLContext.lookup(sess_iiopURLC
ontext.java:215)
at
oracle.aurora.jndi.sess_iiop.sess_iiopURLContext.lookup(sess_iiopURLC
ontext.java:201)
at javax.naming.InitialContext.lookup(InitialContext.java:288) at Client.main(Client.java:29)
The exception (as you can see from the src above) is thrown when I get an
InitialContext.
Why?
Please notice the hello world example works fine, why my example does not
work?
TIA
Alberto
Received on Fri Jul 02 1999 - 04:41:19 CDT
![]() |
![]() |