Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 17357 invoked from network); 16 Feb 2007 10:29:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Feb 2007 10:29:41 -0000 Received: (qmail 66627 invoked by uid 500); 16 Feb 2007 10:29:46 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 66608 invoked by uid 500); 16 Feb 2007 10:29:46 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 66597 invoked by uid 99); 16 Feb 2007 10:29:46 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Feb 2007 02:29:46 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of harikrishna.korrapati@gmail.com designates 64.233.184.236 as permitted sender) Received: from [64.233.184.236] (HELO wr-out-0506.google.com) (64.233.184.236) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Feb 2007 02:29:36 -0800 Received: by wr-out-0506.google.com with SMTP id 68so1622829wri for ; Fri, 16 Feb 2007 02:29:15 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=d+dM9/7b7zyvt4ODzpZ9NPZRbaZlWAPDhaCGUz81QYVQqmhfiUqIs6C2cmOUHIln1k6EG0jrZOGM/shxebBrY0Nm/OBMzlOMFETgb8GvcbKIro8U1hMxOZnh/cUhdZBXQWeq2zl09UDlDbI2R+Q9gO1T6jblg8egtR91NeP6jDs= Received: by 10.114.190.6 with SMTP id n6mr1622250waf.1171621754025; Fri, 16 Feb 2007 02:29:14 -0800 (PST) Received: by 10.114.92.12 with HTTP; Fri, 16 Feb 2007 02:29:13 -0800 (PST) Message-ID: <8a855ce00702160229l3d597deejbdfde33f33ef99a8@mail.gmail.com> Date: Fri, 16 Feb 2007 15:59:13 +0530 From: "Hari Krishna Korrapati" To: user@geronimo.apache.org Subject: Re: Error while getting InitialContext In-Reply-To: <2967D29A-722C-49D4-A168-3387C1307DDB@yahoo.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1890_15251620.1171621753963" References: <8a855ce00702152341i5ef7482dt55b0acbd114844a7@mail.gmail.com> <2967D29A-722C-49D4-A168-3387C1307DDB@yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_1890_15251620.1171621753963 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, You are correct that its a non-j2ee (Java Stand alone) application with ejb's. I have the code like public static InitialContext getInitialContext() throws NamingException { Hashtable env = new Hashtable(); env.put("java.naming.factory.initial", " org.apache.geronimo.interop.client.InitialContextFactory"); env.put("java.naming.provider.url", "http://localhost:8080"); return new InitialContext(env); } The code is throwing error at the return statement. What i observed is, According to the above code Hashtable env should contain 2 key-value pairs. But it is overwriting the first one. It is containing the "java.naming.provider.url" key value pair only, at the return statement. I just want to know why it is happening like that. Here "http://localhost:8080" port contains the geronimo server, where ejb is deployed. Is that correct which we need give... I have used InitialContextFactory instead of RemoteInitialContextFactory, which one to use. If we need to use the RemoteInitialContextFactory, can you tell where i can get that required jar from. Thanks and Regards, Hari Krishna. On 2/16/07, David Jencks wrote: > > What code is doing the lookup and what is it trying to find? > > It looks like this is a non-j2ee client application, in which case > the only thing it can get from geronimo is ejb's. In this case you > probably want to use the openejb jndi implementation specified in > jndi.properties or in code > > props.put("java.naming.factory.initial", > "org.apache.openejb.client.RemoteInitialContextFactory"); > props.put("java.naming.provider.url", "127.0.0.1:4201"); > props.put("java.naming.security.principal", "testuser"); > props.put("java.naming.security.credentials", "testpassword"); > > I don't think the principal or credentials are needed, and you should > adjust the url as appropriate. > > Hope this helps > david jencks > > > > > On Feb 15, 2007, at 11:41 PM, Hari Krishna Korrapati wrote: > > > Hi, > > We are working on Geronimo1.1.1 > > We are facing some problem while getting the InitialContext, > > the log for the same is given below... > > > > org.apache.geronimo.interop.SystemException: > > java.lang.NullPointerException > > at org.apache.geronimo.interop.rmi.iiop.client.UrlInfo.init > > (UrlInfo.java:138) > > at > > org.apache.geronimo.interop.rmi.iiop.client.UrlInfo.getInstance > > (UrlInfo.java:43) > > at > > org.apache.geronimo.interop.rmi.iiop.client.ClientNamingContext.init > > (ClientNamingContext.java:307) > > at > > org.apache.geronimo.interop.rmi.iiop.client.ClientNamingContext.getIns > > tance(ClientNamingContext.java:57) > > at > > org.apache.geronimo.interop.client.InitialContextFactory.getInitialCon > > text(InitialContextFactory.java:29) > > at javax.naming.spi.NamingManager.getInitialContext(Unknown > > Source) > > at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source) > > at javax.naming.InitialContext.init(Unknown Source) > > at javax.naming.InitialContext.(Unknown Source) > > at packagename.Sample.getInitialContext(RunEDSService.java:391) > > at packagename.Sample.init(RunEDSService.java:382) > > at packagename.Sample.main(RunEDSService.java:201) > > Caused by: java.lang.NullPointerException > > at > > com.trend.iwss.jscan.appscan.runtime.PolicyRuntime.getB64StrProp > > (PolicyRuntime.java:188) > > at com.trend.iwss.jscan.appscan.runtime.PolicyRuntime. > > (PolicyRuntime.java:91) > > at > > com.trend.iwss.jscan.appscan.runtime.NetworkPolicyRuntime. > > (NetworkPolicyRuntime.java:85) > > at com.trend.iwss.jscan.appscan.runtime.NetworkPolicyRuntime > > $Factory.make(NetworkPolicyRuntime.java:439) > > at > > com.trend.iwss.jscan.appscan.runtime.PolicyRuntime.accessInstance > > (PolicyRuntime.java:225) > > at com.trend.iwss.jscan.appscan.runtime.PolicyRuntime.preFilter > > (PolicyRuntime.java:127) > > at > > com.trend.iwss.jscan.appscan.runtime.NetworkPolicyRuntime.preFilter > > (NetworkPolicyRuntime.java:108) > > at org.apache.geronimo.interop.rmi.iiop.client.UrlInfo.init > > (UrlInfo.java:98) > > ... 11 more > > > > > > Can anybody guess where the error could have been occured. > > > > > > Thanks and Regards, > > Hari > > -- Regards, Hari ------=_Part_1890_15251620.1171621753963 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi,
   You are correct that its a non-j2ee (Java Stand alone) application with ejb's.

I have the code like

    public static InitialContext getInitialContext() throws NamingException {
        Hashtable env = new Hashtable();
        env.put("java.naming.factory.initial", "org.apache.geronimo.interop.client.InitialContextFactory");
        env.put("java.naming.provider.url", "http://localhost:8080");
        return new InitialContext(env);
    }

The code is throwing error at the return statement. What i observed is, According to the above code Hashtable env should contain
2 key-value pairs. But it is overwriting the first one. It is containing the "java.naming.provider.url" key value pair only, at the return statement. I just want to know why it is happening like that.

Here "http://localhost:8080" port contains the geronimo server, where ejb is deployed. Is that correct which we need give...

I have used InitialContextFactory instead of RemoteInitialContextFactory, which one to use. If we need to use the RemoteInitialContextFactory, can you tell where i can get that required jar from.



Thanks and Regards,
Hari Krishna.



On 2/16/07, David Jencks <david_jencks@yahoo.com> wrote:
What code is doing the lookup and what is it trying to find?

It looks like this is a non-j2ee client application, in which case
the only thing it can get from geronimo is ejb's.  In this case you
probably want to use the openejb jndi implementation specified in
jndi.properties or in code

         props.put("java.naming.factory.initial",
"org.apache.openejb.client.RemoteInitialContextFactory");
         props.put("java.naming.provider.url ", "127.0.0.1:4201");
         props.put("java.naming.security.principal", "testuser");
         props.put("java.naming.security.credentials ", "testpassword");

I don't think the principal or credentials are needed, and you should
adjust the url as appropriate.

Hope this helps
david jencks




On Feb 15, 2007, at 11:41 PM, Hari Krishna Korrapati wrote:

> Hi,
>       We are working on Geronimo1.1.1
>      We are facing some problem while getting the InitialContext,
> the log for the same is given below...
>
> org.apache.geronimo.interop.SystemException :
> java.lang.NullPointerException
>     at org.apache.geronimo.interop.rmi.iiop.client.UrlInfo.init
> (UrlInfo.java:138)
>     at
> org.apache.geronimo.interop.rmi.iiop.client.UrlInfo.getInstance
> (UrlInfo.java:43)
>     at
> org.apache.geronimo.interop.rmi.iiop.client.ClientNamingContext.init
> (ClientNamingContext.java:307)
>     at
> org.apache.geronimo.interop.rmi.iiop.client.ClientNamingContext.getIns
> tance(ClientNamingContext.java:57)
>     at
> org.apache.geronimo.interop.client.InitialContextFactory.getInitialCon
> text(InitialContextFactory.java:29)
>     at javax.naming.spi.NamingManager.getInitialContext (Unknown
> Source)
>     at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
>     at javax.naming.InitialContext.init(Unknown Source)
>     at javax.naming.InitialContext.<init>(Unknown Source)
>     at packagename.Sample.getInitialContext(RunEDSService.java:391)
>     at packagename.Sample.init(RunEDSService.java:382)
>     at packagename.Sample.main(RunEDSService.java:201)
> Caused by: java.lang.NullPointerException
>     at
> com.trend.iwss.jscan.appscan.runtime.PolicyRuntime.getB64StrProp
> (PolicyRuntime.java:188)
>     at com.trend.iwss.jscan.appscan.runtime.PolicyRuntime.<init>
> (PolicyRuntime.java:91)
>     at
> com.trend.iwss.jscan.appscan.runtime.NetworkPolicyRuntime.<init>
> (NetworkPolicyRuntime.java:85)
>     at com.trend.iwss.jscan.appscan.runtime.NetworkPolicyRuntime
> $Factory.make(NetworkPolicyRuntime.java:439)
>     at
> com.trend.iwss.jscan.appscan.runtime.PolicyRuntime.accessInstance
> (PolicyRuntime.java:225)
>     at com.trend.iwss.jscan.appscan.runtime.PolicyRuntime.preFilter
> (PolicyRuntime.java:127)
>     at
> com.trend.iwss.jscan.appscan.runtime.NetworkPolicyRuntime.preFilter
> (NetworkPolicyRuntime.java:108)
>     at org.apache.geronimo.interop.rmi.iiop.client.UrlInfo.init
> (UrlInfo.java:98)
>     ... 11 more
>
>
> Can anybody guess where the error could have been occured.
>
>
> Thanks and Regards,
> Hari




--
Regards,
Hari ------=_Part_1890_15251620.1171621753963--