Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: receiving an exception getting the initial context - why?

Re: receiving an exception getting the initial context - why?

From: <jeff_dodgen_at_my-deja.com>
Date: Wed, 21 Jul 1999 14:00:42 GMT
Message-ID: <7n4jq1$sq0$1@nnrp1.deja.com>


Make sure you include a library in your project with Generated1.jar and Source1.jar...

In article <7li0ts$ll3$1_at_fe1.cs.interbusiness.it>,   "Alberto Lagna" <Lagna_at_gendev.com> wrote:
> 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
>
>

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Wed Jul 21 1999 - 09:00:42 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US