tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zeperdi <jose.perdi...@netvita.com>
Subject Re: NullPointerException inside IvmContext.lookup
Date Fri, 20 Apr 2007 15:10:59 GMT

Has anyone managed to solve the problem?
José Perdigão



Kenan Sevindik wrote:
> 
> Hi David,
> 
> Thank you for your reply. Here is what your requested information, and
> additional config. info from several files in tomcat. It is completely
> same error where i sent the link in my previous post. I am ready to
> provide extra information or any help if possible.
> 
> Tomcat versions: 5.0.28, 5.5.20
> JDK versions: 1.4.2_10, 1.5.0_06
> OpenEJB version:1.0
> 
> Best Regards.
> 
> 
> openejb.log file:
> 
> INFO :  openejb.home = D:\work\tools\openejb-1.0
> INFO :  openejb.base = D:\work\tools\openejb-1.0
> DEBUG:  Instantiating assembler class
> org.openejb.alt.assembler.classic.Assembler
> WARN :  Cannot find the configuration file [null], Trying
> conf/openejb.conf instead.
> INFO :  Loaded EJBs from
> D:\work\tools\openejb-1.0\beans\openejb-itests-beans.jar
> INFO :  Loaded EJBs from
> D:\work\tools\openejb-1.0\beans\openejb-webadmin-clienttools.jar
> INFO :  Loaded EJBs from
> D:\work\tools\openejb-1.0\beans\openejb-webadmin-ejbgen.jar
> INFO :  Loaded EJBs from
> D:\work\tools\openejb-1.0\beans\openejb-webadmin-main.jar
> INFO :  Loaded EJBs from
> D:\work\tools\openejb-1.0\beans\sapcache-0.1.0.jar
> DEBUG:  Containers        : 4
> DEBUG:  Type        Container ID
> DEBUG:     ENTITY      Default BMP Container
> DEBUG:     ENTITY      Default CMP Container
> DEBUG:     STATEFUL    Default Stateful Container
> DEBUG:     STATELESS   Default Stateless Container
> DEBUG:  Deployments       : 38
> DEBUG:  Type        Deployment ID
> DEBUG:     STATEFUL    client/tests/stateful/EncBean
> DEBUG:     CMP_ENTITY  client/tests/entity/cmp/RMI-over-IIOP/EJBHome
> DEBUG:     STATEFUL    client/tests/stateful/BasicStatefulHome
> DEBUG:     STATELESS   SapCacheBean
> DEBUG:     STATELESS   ClientTools/ViewClass
> DEBUG:     STATELESS   EJBGenerator/CreateEJB
> DEBUG:     STATELESS   Webadmin/Configuration
> DEBUG:     STATELESS   ClientTools/InvokeObject
> DEBUG:     STATELESS   Webadmin/Properties
> DEBUG:     STATEFUL    client/tests/stateful/RMI-over-IIOP/EJBHome
> DEBUG:     STATELESS   Webadmin/Home
> DEBUG:     BMP_ENTITY 
> client/tests/entity/bmp/allowed_operations/EntityHome
> DEBUG:     BMP_ENTITY  CustomerBean
> DEBUG:     CMP_ENTITY  client/tests/entity/cmp/EncBean
> DEBUG:     STATELESS   httpd/DefaultBean
> DEBUG:     STATEFUL    client/tests/stateful/BeanManagedBasicStatefulHome
> DEBUG:     STATELESS   client/tools/DatabaseHome
> DEBUG:     BMP_ENTITY  client/tests/entity/bmp/EncBean
> DEBUG:     STATEFUL    config/webadmin/ConfigurationData
> DEBUG:     STATEFUL    deploy/webadmin/Deployer
> DEBUG:     STATELESS   ClientTools/ViewJndi
> DEBUG:     STATELESS   Webadmin/DeploymentList
> DEBUG:     STATELESS  
> client/tests/stateless/BeanManagedBasicStatelessHome
> DEBUG:     STATELESS   Webadmin/CMPMapping
> DEBUG:     STATELESS   client/tests/stateless/EncBean
> DEBUG:     STATEFUL   
> client/tests/stateful/BeanManagedTransactionTests/EJBHome
> DEBUG:     BMP_ENTITY  client/tests/entity/bmp/RMI-over-IIOP/EJBHome
> DEBUG:     STATELESS   Webadmin/ListLogs
> DEBUG:     STATELESS
> client/tests/stateless/BeanManagedTransactionTests/EJBHome
> DEBUG:     STATELESS   ClientTools/ViewEjb
> DEBUG:     BMP_ENTITY  client/tests/entity/bmp/BasicBmpHome
> DEBUG:     STATEFUL    mapping/webadmin/CMPMappingData
> DEBUG:     STATELESS   client/tests/stateless/BasicStatelessHome
> DEBUG:     CMP_ENTITY  client/tests/entity/cmp/BasicCmpHome
> DEBUG:     STATELESS   Webadmin/Deployment
> DEBUG:     STATEFUL    httpd/session
> DEBUG:     CMP_ENTITY 
> client/tests/entity/cmp/allowed_operations/EntityHome
> DEBUG:     STATELESS   client/tests/stateless/RMI-over-IIOP/EJBHome
> DEBUG:  SecurityService   : org.openejb.ri.sp.PseudoSecurityService
> DEBUG:  TransactionManager: org.openejb.core.TransactionManagerWrapper
> INFO :  OpenEJB ready.
> INFO :
> 
> this is from my test.jsp:
> 
> <%
> 	javax.naming.Context initCtx = new javax.naming.InitialContext();
> 
> 	Object object = initCtx.lookup("java:comp/env/ejb/SapCacheBean");
> 	com.medtronic.minimed.gs.scs.ejb.SapCacheHomeRemote home =
> (com.medtronic.minimed.gs.scs.ejb.SapCacheHomeRemote)
> 		javax.rmi.PortableRemoteObject.narrow(object,
> com.medtronic.minimed.gs.scs.ejb.SapCacheHomeRemote.class);
> 	com.medtronic.minimed.gs.scs.ejb.SapCacheRemote bean = home.create();
> %>
> <%= bean.test() %>
> 
> This is ejb-ref definition from web.xml:
> 
> <ejb-ref>
>  <description> EJB Reference to the bean deployed to OpenEJB
> </description>
>  <ejb-ref-name>ejb/SapCacheBean</ejb-ref-name>
>  <ejb-ref-type>Session</ejb-ref-type>
>  <home>com.medtronic.minimed.gs.scs.ejb.SapCacheHomeRemote</home>
>  <remote>com.medtronic.minimed.gs.scs.ejb.SapCacheRemote</remote>
> </ejb-ref>
> 
> And finally this is from context.xml of my test web app:
> 
> <Ejb name="ejb/SapCacheBean"
>     type="Session"
>     home="com.medtronic.minimed.gs.scs.ejb.SapCacheHomeRemote"
>     remote="com.medtronic.minimed.gs.scs.ejb.SapCacheRemote"/>
> <ResourceParams name="ejb/SapCacheBean">
>     <parameter>
>         <name>factory</name>
>         <value>org.openejb.client.TomcatEjbFactory</value>
>     </parameter>
>     <parameter>
>         <name>openejb.naming.factory.initial</name>
>         <value>org.openejb.client.LocalInitialContextFactory</value>
>     </parameter>
> 
>     <parameter>
>         <name>openejb.ejb-link</name>
>         <value>SapCacheBean</value>
>     </parameter>
> </ResourceParams>
> 
> 
> On 2/23/07, David Blevins <david.blevins@visi.com> wrote:
>> Hi Kenan, looks like your email got overlooked.  Very sorry.  Hope we
>> can still help you if you need it.  See below...
>>
>> On Feb 8, 2007, at 4:30 PM, Kenan Sevindik wrote:
>>
>> > I have developed a test web application with a session bean
>> > deployed on
>> > tomcat. The code and configuration is the same as Hello example.
>> > However,
>> > when i try to run web app, I got following exception:
>> >
>> > java.lang.NullPointerException
>> > at org.openejb.core.ivm.naming.IvmContext.lookup(IvmContext.java:152)
>> > at javax.naming.InitialContext.lookup(InitialContext.java:351)
>> > at org.apache.jsp.test_jsp._jspService(test_jsp.java:52)
>> > at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
>> >
>> > I have already checked open-ejb logs, and my tomcat configuration
>> > twice.
>> > There isn't any problem over there. I have found same problem in
>> > the net
>> > after a quick googling:
>> > http://www.mail-archive.com/openejb-users@incubator.apache.org/
>> > msg00053.html
>> > As it was mentioned above there seems no obvious reason for this
>> > error to
>> > occur.
>>
>> It seems to get that error an null value has to actually be in the
>> jndi namespace.  This shouldn't happen ever, but I'll definitely name
>> sure we check for that in the 3x codebase.
>>
>> Can you paste the section of the openejb.log where we list the beans
>> deployed and also the chunk of code you are using to lookup your ejb?
>>
>> -David
>>
>>
> 
> 
> -- 
> Kenan Sevindik
> http://jroller.com/page/ksevindik
> 
> 

-- 
View this message in context: http://www.nabble.com/NullPointerException-inside-IvmContext.lookup-tf3197028s2756.html#a10104272
Sent from the OpenEJB User mailing list archive at Nabble.com.


Mime
View raw message