Exception while accessing deployed session bean

Hi,
I am new to IPlanet AS 6.0 . I wrote a simple stateless session bean in Forte EE v 3.0 environment. The compilation and deployment went fine. When I try to use my bean through a client program using IIOP then it throws the following exception in kjs:
javax.naming.NameNotFoundException: EjbContext: exception on getHome(), com.netscape.server.eb.UncheckedException: unchecked exception thrown by impl com.kivasoft.eb.boot.EBBootstrapImpl@71dc3d; nested exception is:
java.lang.NullPointerException
at com.netscape.server.ejb.EjbContext.createHomeRef(Unknown Source)
at com.netscape.server.ejb.EjbContext.getHomeRef(Unknown Source)
at com.netscape.server.ejb.EjbContext.lookup(Unknown Source)
at com.netscape.server.jndi.RootContext.lookup(Unknown Source)
at com.netscape.server.jndi.RootContext.lookup(Unknown Source)
at javax.naming.InitialContext.lookup(InitialContext. java:357)
at com.netscape.ejb.CorbaHomeFactoryImpl.ConstructEJBHome(Unknown Source
at com.netscape.CosNaming.NamingContextImpl.resolve(Unknown Source)
at org.omg.CosNaming._NamingContextImplBase.invoke(_N amingContextImplBas
e.java:233)
at com.sun.corba.ee.internal.corba.ServerDelegate.dis patch(ServerDelegat
e.java:236)
at com.sun.corba.ee.internal.iiop.ORB.process(ORB.jav a:227)
at com.sun.corba.ee.internal.iiop.CachedWorkerThread. doWork(IIOPConnecti
on.java:262)
at com.sun.corba.ee.internal.iiop.CachedWorkerThread. run(IIOPConnection.
java:230)
My client program is:
import java.util.*;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.rmi.PortableRemoteObject;
public class MybeanClient {
public static void main(String[] args) {
try {
Properties env = new Properties();
env.put("java.naming.factory.initial","com.sun.jndi.cosnaming.CNCtxFactory");
env.put("java.naming.provider.url", "iiop://localhost:9010");
Context initial = new InitialContext(env);
Object objref = initial.lookup("ejb/Mybean");
MybeanHome home =(MybeanHome)PortableRemoteObject.narrow(objref,My beanHome.class);
Mybean bean = home.create();
String result = bean.test();
System.out.println(result);
} catch (Exception ex) {
System.err.println("Caught an unexpected exception!");
ex.printStackTrace();
The j2eeguide.converter sample bundled with IPlanet works fine with the above code.
The only difference is that the converter sample was deployed by the IAS deployment tool.
Mybean was deployed by the Forte.
What is the problem?
Any help would be highly appreciated.

1. Check that iiop is enabled in ias-ejb-jar.xml
2. Check your naming in the xml files
3. Check what has been deployed (filesystem & kregedit)
4. Try it with the full qualified name ejb/'ejbfilename'/<ejb-name>

Similar Messages

  • Exception while accessing deployed entity bean (CMP)

    Hi
    PSB for the exception i get when i try to access a delpoyed entity bean
    (CMP).
    If any of you have got this exception and fixed it or have any idea of how
    to fix it then please reply asap.
    thanks.
    java.lang.NullPointerException
    at
    com.netscape.server.deployment.PersistenceDeploymentDescriptorImpl.getBeanPr
    operty(Unk
    n Source)
    at com.netscape.server.ejb.SQLPersistenceManager.init(Unknown
    Source)
    at
    com.netscape.server.ejb.SQLPersistenceManagerFactory.addHome(Unknown Source)
    at com.kivasoft.eb.EBHomeBase.initMeta(Unknown Source)
    at com.kivasoft.eb.EBHomeBase.initTransport(Unknown Source)
    at com.kivasoft.eb.EBActivatorCB.getEBHomenative(Native Method)
    at com.kivasoft.eb.EBActivatorCB.getEBHome(Unknown Source)
    at com.netscape.server.ejb.EjbContext.createHomeRef(Unknown Source)
    at com.netscape.server.ejb.EjbContext.getHomeRef(Unknown Source)
    at com.netscape.server.ejb.EjbContext.lookup(Unknown Source)
    at com.netscape.server.jndi.RootContext.lookup(Unknown Source)
    at com.netscape.server.jndi.RootContext.lookup(Unknown Source)
    at javax.naming.InitialContext.lookup(InitialContext.java:357)
    at samples.test.ejb.TestEJB.getGreeting(TestEJB.java:45)
    at java.lang.reflect.Method.invoke(Native Method)
    at
    samples.test.ejb.ejb_skel_samples_test_ejb_TestEJB.getGreeting(ejb_skel_samp
    les_test_e
    TestEJB.java:80)
    at
    samples.test.ejb.ejb_kcp_skel_Test.getGreeting__indir_wstring__indir_wstring
    (ejb_kcp_s
    _Test.java:220)
    at com.kivasoft.ebfp.FPRequest.invokenative(Native Method)
    at com.kivasoft.ebfp.FPRequest.invoke(Unknown Source)
    at
    samples.test.ejb.ejb_kcp_stub_Test.getGreeting(ejb_kcp_stub_Test.java:327)
    at samples.test.ejb.ejb_stub_Test.getGreeting(ejb_stub_Test.java:71)
    at samples.test.servlet.TestServlet.doGet(TestServlet.java:62)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
    at
    com.netscape.server.servlet.servletrunner.ServletInfo.service(Unknown
    Source)
    at
    com.netscape.server.servlet.servletrunner.ServletRunner.execute(Unknown
    Source)
    at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
    at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
    at com.kivasoft.thread.ThreadBasic.run(Native Method)
    at java.lang.Thread.run(Thread.java:479)
    [04/Dec/2001 11:16:51:8] error: Exception Stack Trace:
    com.netscape.server.ejb.PersistenceException
    at com.netscape.server.ejb.SQLPersistenceManager.init(Unknown
    Source)
    at
    com.netscape.server.ejb.SQLPersistenceManagerFactory.addHome(Unknown Source)
    at com.kivasoft.eb.EBHomeBase.initMeta(Unknown Source)
    at com.kivasoft.eb.EBHomeBase.initTransport(Unknown Source)
    at com.kivasoft.eb.EBActivatorCB.getEBHomenative(Native Method)
    at com.kivasoft.eb.EBActivatorCB.getEBHome(Unknown Source)
    at com.netscape.server.ejb.EjbContext.createHomeRef(Unknown Source)
    at com.netscape.server.ejb.EjbContext.getHomeRef(Unknown Source)
    at com.netscape.server.ejb.EjbContext.lookup(Unknown Source)
    at com.netscape.server.jndi.RootContext.lookup(Unknown Source)
    at com.netscape.server.jndi.RootContext.lookup(Unknown Source)
    at javax.naming.InitialContext.lookup(InitialContext.java:357)
    at samples.test.ejb.TestEJB.getGreeting(TestEJB.java:45)
    at java.lang.reflect.Method.invoke(Native Method)
    at
    samples.test.ejb.ejb_skel_samples_test_ejb_TestEJB.getGreeting(ejb_skel_samp
    les_test_e
    TestEJB.java:80)
    at
    samples.test.ejb.ejb_kcp_skel_Test.getGreeting__indir_wstring__indir_wstring
    (ejb_kcp_s
    _Test.java:220)
    at com.kivasoft.ebfp.FPRequest.invokenative(Native Method)
    at com.kivasoft.ebfp.FPRequest.invoke(Unknown Source)
    at
    samples.test.ejb.ejb_kcp_stub_Test.getGreeting(ejb_kcp_stub_Test.java:327)
    at samples.test.ejb.ejb_stub_Test.getGreeting(ejb_stub_Test.java:71)
    at samples.test.servlet.TestServlet.doGet(TestServlet.java:62)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
    at
    com.netscape.server.servlet.servletrunner.ServletInfo.service(Unknown
    Source)
    at
    com.netscape.server.servlet.servletrunner.ServletRunner.execute(Unknown
    Source)
    at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
    at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
    at com.kivasoft.thread.ThreadBasic.run(Native Method)
    at java.lang.Thread.run(Thread.java:479)
    got the Entity bean found ***************
    got the Entity bean***************
    [04/Dec/2001 11:16:51:8] error: EBFP-marshal_internal: internal exception
    caught in kcp skeleton,
    ception = java.lang.NullPointerException
    [04/Dec/2001 11:16:51:8] error: Exception Stack Trace:
    java.lang.NullPointerException
    at java.util.Hashtable.get(Hashtable.java:321)
    at com.netscape.server.ejb.SQLPersistenceManager.<init>(Unknown
    Source)
    at
    com.netscape.server.ejb.SQLPersistenceManagerFactory.newInstance(Unknown
    Source)
    at
    com.netscape.server.ejb.EntityDelegateManagerImpl.getPersistenceManager(Unkn
    own Source
    at
    com.netscape.server.ejb.EntityDelegateManagerImpl.doPersistentFind(Unknown
    Source)
    at com.netscape.server.ejb.EntityDelegateManagerImpl.find(Unknown
    Source)
    at com.kivasoft.eb.EBHomeBase.findSingleByParms(Unknown Source)
    at
    samples.test.ejb.Entity.ejb_home_samples_test_ejb_Entity_TestEntityBean.find
    ByPrimaryK
    ejb_home_samples_test_ejb_Entity_TestEntityBean.java:126)
    at
    samples.test.ejb.Entity.ejb_kcp_skel_TestEntityHome.findByPrimaryKey__sample
    s_test_ejb
    tity_TestEntity__int(ejb_kcp_skel_TestEntityHome.java:266)
    at com.kivasoft.ebfp.FPRequest.invokenative(Native Method)
    at com.kivasoft.ebfp.FPRequest.invoke(Unknown Source)
    at
    samples.test.ejb.Entity.ejb_kcp_stub_TestEntityHome.findByPrimaryKey(ejb_kcp
    stubTest
    ityHome.java:338)
    at
    samples.test.ejb.Entity.ejb_stub_TestEntityHome.findByPrimaryKey(ejb_stub_Te
    stEntityHo
    java:85)
    at samples.test.ejb.TestEJB.getGreeting(TestEJB.java:51)
    at java.lang.reflect.Method.invoke(Native Method)
    at
    samples.test.ejb.ejb_skel_samples_test_ejb_TestEJB.getGreeting(ejb_skel_samp
    les_test_e
    TestEJB.java:80)
    at
    samples.test.ejb.ejb_kcp_skel_Test.getGreeting__indir_wstring__indir_wstring
    (ejb_kcp_s
    _Test.java:220)
    at com.kivasoft.ebfp.FPRequest.invokenative(Native Method)
    at com.kivasoft.ebfp.FPRequest.invoke(Unknown Source)
    at
    samples.test.ejb.ejb_kcp_stub_Test.getGreeting(ejb_kcp_stub_Test.java:327)
    at samples.test.ejb.ejb_stub_Test.getGreeting(ejb_stub_Test.java:71)
    at samples.test.servlet.TestServlet.doGet(TestServlet.java:62)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
    at
    com.netscape.server.servlet.servletrunner.ServletInfo.service(Unknown
    Source)
    at
    com.netscape.server.servlet.servletrunner.ServletRunner.execute(Unknown
    Source)
    at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
    at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
    at com.kivasoft.thread.ThreadBasic.run(Native Method)
    at java.lang.Thread.run(Thread.java:479)
    I could not find the Entity bean
    java.rmi.RemoteException: internal error; nested exception is:
    java.lang.NullPointerException
    java.lang.NullPointerException
    at java.util.Hashtable.get(Hashtable.java:321)
    at com.netscape.server.ejb.SQLPersistenceManager.<init>(Unknown
    Source)
    at
    com.netscape.server.ejb.SQLPersistenceManagerFactory.newInstance(Unknown
    Source)
    at
    com.netscape.server.ejb.EntityDelegateManagerImpl.getPersistenceManager(Unkn
    own Source
    at
    com.netscape.server.ejb.EntityDelegateManagerImpl.doPersistentFind(Unknown
    Source)
    at com.netscape.server.ejb.EntityDelegateManagerImpl.find(Unknown
    Source)
    at com.kivasoft.eb.EBHomeBase.findSingleByParms(Unknown Source)
    at
    samples.test.ejb.Entity.ejb_home_samples_test_ejb_Entity_TestEntityBean.find
    ByPrimaryK
    ejb_home_samples_test_ejb_Entity_TestEntityBean.java:126)
    at
    samples.test.ejb.Entity.ejb_kcp_skel_TestEntityHome.findByPrimaryKey__sample
    s_test_ejb
    tity_TestEntity__int(ejb_kcp_skel_TestEntityHome.java:266)
    at com.kivasoft.ebfp.FPRequest.invokenative(Native Method)
    at com.kivasoft.ebfp.FPRequest.invoke(Unknown Source)
    at
    samples.test.ejb.Entity.ejb_kcp_stub_TestEntityHome.findByPrimaryKey(ejb_kcp
    stubTest
    ityHome.java:338)
    at
    samples.test.ejb.Entity.ejb_stub_TestEntityHome.findByPrimaryKey(ejb_stub_Te
    stEntityHo
    java:85)
    at samples.test.ejb.TestEJB.getGreeting(TestEJB.java:51)
    at java.lang.reflect.Method.invoke(Native Method)
    at
    samples.test.ejb.ejb_skel_samples_test_ejb_TestEJB.getGreeting(ejb_skel_samp
    les_test_e
    TestEJB.java:80)
    at
    samples.test.ejb.ejb_kcp_skel_Test.getGreeting__indir_wstring__indir_wstring
    (ejb_kcp_s
    _Test.java:220)
    at com.kivasoft.ebfp.FPRequest.invokenative(Native Method)
    at com.kivasoft.ebfp.FPRequest.invoke(Unknown Source)
    at
    samples.test.ejb.ejb_kcp_stub_Test.getGreeting(ejb_kcp_stub_Test.java:327)
    at samples.test.ejb.ejb_stub_Test.getGreeting(ejb_stub_Test.java:71)
    at samples.test.servlet.TestServlet.doGet(TestServlet.java:62)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
    at
    com.netscape.server.servlet.servletrunner.ServletInfo.service(Unknown
    Source)
    at
    com.netscape.server.servlet.servletrunner.ServletRunner.execute(Unknown
    Source)
    at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
    at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
    at com.kivasoft.thread.ThreadBasic.run(Native Method)
    at java.lang.Thread.run(Thread.java:479)
    Regards
    Sandhya Seetharam

    Hi,
    This seems to be the Hello world EJB application with a small
    modification(probably an addition of test directory or a java file). I would
    recomend you to go through every line of the document on deploying this
    application. There is another posting regarding the same issue in this forum.
    Regards
    Raj
    akhila wrote:
    Hi
    PSB for the exception i get when i try to access a delpoyed entity bean
    (CMP).
    If any of you have got this exception and fixed it or have any idea of how
    to fix it then please reply asap.
    thanks.
    java.lang.NullPointerException
    at
    com.netscape.server.deployment.PersistenceDeploymentDescriptorImpl.getBeanPr
    operty(Unk
    n Source)
    at com.netscape.server.ejb.SQLPersistenceManager.init(Unknown
    Source)
    at
    com.netscape.server.ejb.SQLPersistenceManagerFactory.addHome(Unknown Source)
    at com.kivasoft.eb.EBHomeBase.initMeta(Unknown Source)
    at com.kivasoft.eb.EBHomeBase.initTransport(Unknown Source)
    at com.kivasoft.eb.EBActivatorCB.getEBHomenative(Native Method)
    at com.kivasoft.eb.EBActivatorCB.getEBHome(Unknown Source)
    at com.netscape.server.ejb.EjbContext.createHomeRef(Unknown Source)
    at com.netscape.server.ejb.EjbContext.getHomeRef(Unknown Source)
    at com.netscape.server.ejb.EjbContext.lookup(Unknown Source)
    at com.netscape.server.jndi.RootContext.lookup(Unknown Source)
    at com.netscape.server.jndi.RootContext.lookup(Unknown Source)
    at javax.naming.InitialContext.lookup(InitialContext.java:357)
    at samples.test.ejb.TestEJB.getGreeting(TestEJB.java:45)
    at java.lang.reflect.Method.invoke(Native Method)
    at
    samples.test.ejb.ejb_skel_samples_test_ejb_TestEJB.getGreeting(ejb_skel_samp
    les_test_e
    TestEJB.java:80)
    at
    samples.test.ejb.ejb_kcp_skel_Test.getGreeting__indir_wstring__indir_wstring
    (ejb_kcp_s
    _Test.java:220)
    at com.kivasoft.ebfp.FPRequest.invokenative(Native Method)
    at com.kivasoft.ebfp.FPRequest.invoke(Unknown Source)
    at
    samples.test.ejb.ejb_kcp_stub_Test.getGreeting(ejb_kcp_stub_Test.java:327)
    at samples.test.ejb.ejb_stub_Test.getGreeting(ejb_stub_Test.java:71)
    at samples.test.servlet.TestServlet.doGet(TestServlet.java:62)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
    at
    com.netscape.server.servlet.servletrunner.ServletInfo.service(Unknown
    Source)
    at
    com.netscape.server.servlet.servletrunner.ServletRunner.execute(Unknown
    Source)
    at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
    at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
    at com.kivasoft.thread.ThreadBasic.run(Native Method)
    at java.lang.Thread.run(Thread.java:479)
    [04/Dec/2001 11:16:51:8] error: Exception Stack Trace:
    com.netscape.server.ejb.PersistenceException
    at com.netscape.server.ejb.SQLPersistenceManager.init(Unknown
    Source)
    at
    com.netscape.server.ejb.SQLPersistenceManagerFactory.addHome(Unknown Source)
    at com.kivasoft.eb.EBHomeBase.initMeta(Unknown Source)
    at com.kivasoft.eb.EBHomeBase.initTransport(Unknown Source)
    at com.kivasoft.eb.EBActivatorCB.getEBHomenative(Native Method)
    at com.kivasoft.eb.EBActivatorCB.getEBHome(Unknown Source)
    at com.netscape.server.ejb.EjbContext.createHomeRef(Unknown Source)
    at com.netscape.server.ejb.EjbContext.getHomeRef(Unknown Source)
    at com.netscape.server.ejb.EjbContext.lookup(Unknown Source)
    at com.netscape.server.jndi.RootContext.lookup(Unknown Source)
    at com.netscape.server.jndi.RootContext.lookup(Unknown Source)
    at javax.naming.InitialContext.lookup(InitialContext.java:357)
    at samples.test.ejb.TestEJB.getGreeting(TestEJB.java:45)
    at java.lang.reflect.Method.invoke(Native Method)
    at
    samples.test.ejb.ejb_skel_samples_test_ejb_TestEJB.getGreeting(ejb_skel_samp
    les_test_e
    TestEJB.java:80)
    at
    samples.test.ejb.ejb_kcp_skel_Test.getGreeting__indir_wstring__indir_wstring
    (ejb_kcp_s
    _Test.java:220)
    at com.kivasoft.ebfp.FPRequest.invokenative(Native Method)
    at com.kivasoft.ebfp.FPRequest.invoke(Unknown Source)
    at
    samples.test.ejb.ejb_kcp_stub_Test.getGreeting(ejb_kcp_stub_Test.java:327)
    at samples.test.ejb.ejb_stub_Test.getGreeting(ejb_stub_Test.java:71)
    at samples.test.servlet.TestServlet.doGet(TestServlet.java:62)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
    at
    com.netscape.server.servlet.servletrunner.ServletInfo.service(Unknown
    Source)
    at
    com.netscape.server.servlet.servletrunner.ServletRunner.execute(Unknown
    Source)
    at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
    at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
    at com.kivasoft.thread.ThreadBasic.run(Native Method)
    at java.lang.Thread.run(Thread.java:479)
    got the Entity bean found ***************
    got the Entity bean***************
    [04/Dec/2001 11:16:51:8] error: EBFP-marshal_internal: internal exception
    caught in kcp skeleton,
    ception = java.lang.NullPointerException
    [04/Dec/2001 11:16:51:8] error: Exception Stack Trace:
    java.lang.NullPointerException
    at java.util.Hashtable.get(Hashtable.java:321)
    at com.netscape.server.ejb.SQLPersistenceManager.<init>(Unknown
    Source)
    at
    com.netscape.server.ejb.SQLPersistenceManagerFactory.newInstance(Unknown
    Source)
    at
    com.netscape.server.ejb.EntityDelegateManagerImpl.getPersistenceManager(Unkn
    own Source
    at
    com.netscape.server.ejb.EntityDelegateManagerImpl.doPersistentFind(Unknown
    Source)
    at com.netscape.server.ejb.EntityDelegateManagerImpl.find(Unknown
    Source)
    at com.kivasoft.eb.EBHomeBase.findSingleByParms(Unknown Source)
    at
    samples.test.ejb.Entity.ejb_home_samples_test_ejb_Entity_TestEntityBean.find
    ByPrimaryK
    ejb_home_samples_test_ejb_Entity_TestEntityBean.java:126)
    at
    samples.test.ejb.Entity.ejb_kcp_skel_TestEntityHome.findByPrimaryKey__sample
    s_test_ejb
    tity_TestEntity__int(ejb_kcp_skel_TestEntityHome.java:266)
    at com.kivasoft.ebfp.FPRequest.invokenative(Native Method)
    at com.kivasoft.ebfp.FPRequest.invoke(Unknown Source)
    at
    samples.test.ejb.Entity.ejb_kcp_stub_TestEntityHome.findByPrimaryKey(ejb_kcp
    stubTest
    ityHome.java:338)
    at
    samples.test.ejb.Entity.ejb_stub_TestEntityHome.findByPrimaryKey(ejb_stub_Te
    stEntityHo
    java:85)
    at samples.test.ejb.TestEJB.getGreeting(TestEJB.java:51)
    at java.lang.reflect.Method.invoke(Native Method)
    at
    samples.test.ejb.ejb_skel_samples_test_ejb_TestEJB.getGreeting(ejb_skel_samp
    les_test_e
    TestEJB.java:80)
    at
    samples.test.ejb.ejb_kcp_skel_Test.getGreeting__indir_wstring__indir_wstring
    (ejb_kcp_s
    _Test.java:220)
    at com.kivasoft.ebfp.FPRequest.invokenative(Native Method)
    at com.kivasoft.ebfp.FPRequest.invoke(Unknown Source)
    at
    samples.test.ejb.ejb_kcp_stub_Test.getGreeting(ejb_kcp_stub_Test.java:327)
    at samples.test.ejb.ejb_stub_Test.getGreeting(ejb_stub_Test.java:71)
    at samples.test.servlet.TestServlet.doGet(TestServlet.java:62)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
    at
    com.netscape.server.servlet.servletrunner.ServletInfo.service(Unknown
    Source)
    at
    com.netscape.server.servlet.servletrunner.ServletRunner.execute(Unknown
    Source)
    at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
    at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
    at com.kivasoft.thread.ThreadBasic.run(Native Method)
    at java.lang.Thread.run(Thread.java:479)
    I could not find the Entity bean
    java.rmi.RemoteException: internal error; nested exception is:
    java.lang.NullPointerException
    java.lang.NullPointerException
    at java.util.Hashtable.get(Hashtable.java:321)
    at com.netscape.server.ejb.SQLPersistenceManager.<init>(Unknown
    Source)
    at
    com.netscape.server.ejb.SQLPersistenceManagerFactory.newInstance(Unknown
    Source)
    at
    com.netscape.server.ejb.EntityDelegateManagerImpl.getPersistenceManager(Unkn
    own Source
    at
    com.netscape.server.ejb.EntityDelegateManagerImpl.doPersistentFind(Unknown
    Source)
    at com.netscape.server.ejb.EntityDelegateManagerImpl.find(Unknown
    Source)
    at com.kivasoft.eb.EBHomeBase.findSingleByParms(Unknown Source)
    at
    samples.test.ejb.Entity.ejb_home_samples_test_ejb_Entity_TestEntityBean.find
    ByPrimaryK
    ejb_home_samples_test_ejb_Entity_TestEntityBean.java:126)
    at
    samples.test.ejb.Entity.ejb_kcp_skel_TestEntityHome.findByPrimaryKey__sample
    s_test_ejb
    tity_TestEntity__int(ejb_kcp_skel_TestEntityHome.java:266)
    at com.kivasoft.ebfp.FPRequest.invokenative(Native Method)
    at com.kivasoft.ebfp.FPRequest.invoke(Unknown Source)
    at
    samples.test.ejb.Entity.ejb_kcp_stub_TestEntityHome.findByPrimaryKey(ejb_kcp
    stubTest
    ityHome.java:338)
    at
    samples.test.ejb.Entity.ejb_stub_TestEntityHome.findByPrimaryKey(ejb_stub_Te
    stEntityHo
    java:85)
    at samples.test.ejb.TestEJB.getGreeting(TestEJB.java:51)
    at java.lang.reflect.Method.invoke(Native Method)
    at
    samples.test.ejb.ejb_skel_samples_test_ejb_TestEJB.getGreeting(ejb_skel_samp
    les_test_e
    TestEJB.java:80)
    at
    samples.test.ejb.ejb_kcp_skel_Test.getGreeting__indir_wstring__indir_wstring
    (ejb_kcp_s
    _Test.java:220)
    at com.kivasoft.ebfp.FPRequest.invokenative(Native Method)
    at com.kivasoft.ebfp.FPRequest.invoke(Unknown Source)
    at
    samples.test.ejb.ejb_kcp_stub_Test.getGreeting(ejb_kcp_stub_Test.java:327)
    at samples.test.ejb.ejb_stub_Test.getGreeting(ejb_stub_Test.java:71)
    at samples.test.servlet.TestServlet.doGet(TestServlet.java:62)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
    at
    com.netscape.server.servlet.servletrunner.ServletInfo.service(Unknown
    Source)
    at
    com.netscape.server.servlet.servletrunner.ServletRunner.execute(Unknown
    Source)
    at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
    at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
    at com.kivasoft.thread.ThreadBasic.run(Native Method)
    at java.lang.Thread.run(Thread.java:479)
    Regards
    Sandhya Seetharam

  • Getting Servlet Exception while accessing servlets after deployment

    Hi,
    Iam getting a Servlet Exception while accessing servlets after deploying into weblogic 8.1
    Error 500--Internal Server Error
    javax.servlet.ServletException: [HTTP:101249][ServletContext(id=9599010,name=MyWeb,context-path=)]: Servlet class LoginServlet for servlet LoginServlet could not be loaded because the requested class was not found in the classpath F:\bea\weblogic81\samples\domains\examples\MyWeb\WEB-INF\classes;F:\bea\weblogic81\samples\domains\examples\.\examplesServer\.wlnotdelete\extract\examplesServer_MyWeb_MyWeb.
    java.lang.UnsupportedClassVersionError: LoginServlet (Unsupported major.minor version 49.0).
         at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:834)
         at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:535)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:373)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6718)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    My Folder Structureis like this,
    F:\bea\weblogic81\samples\domains\examples\MyWeb
    MyWeb is the projectName
    F:\bea\weblogic81\samples\domains\examples\MyWeb\WEB-INF
    Inside WEB-INF, i have web.xml and weblogic.xml, and classes directory with servlet classes.
    Any help will be appreciated.
    Thanx in advance.
    Regards
    Ram

    Hi,
    Thanks for the reply.
    Yes you are correct, i compiled using jdk1.5.
    but my servlet code will not compile in jdk1.4 version since i used advanced vaector classes in that.
    Is there any settings like script file that need to be changed so that i can point to my jdk1.5 compiler rather than the default one pointed by weblogic.
    Thanks in advance
    Ram

  • Error While passivating Stateful session bean

     

    I also have same problem when WL passivating. However, the exception throwing from
    WL saying the "Ignoring exception raised while passivating".
    My question is will that exception lead to failure of passivating and evenually
    lead to memory leakage? I just thought that the memory is still in cache either
    removed or passivated, as a result more and more memory will be used up as more
    failure occurs.
    Frank
    Rob Woollen <[email protected]> wrote:
    It looks like you have a reference to a DB Connection as a member
    variable. This reference should be transient. You can re-acquire it
    in
    ejbActivate.
    -- Rob
    Hemant Arora wrote:
    Hi
    Can anybody please clarify the error that I'm getting while runningthe
    stateful session bean with weblogic
    I have instantiated 20 stateful session beans all using the DB connection
    but if the connection is unaailable I'm making the beans to wait.
    I'm not removeing the beans and again making the instance of 20 another
    beans
    The max beans in cache is 25.
    Thanks
    Hemant
    This is the output at the console of the weblogic
    ejbPassivate()
    Tue Jul 17 20:58:00 GMT+05:30 2001:<I> <EJB JAR deployment
    d:/weblogic/myserver/romanCount.jar> Ignoring exception raised while
    passivating:
    java.io.NotSerializableException:
    weblogic.jdbc20.rmi.internal.ConnectionImpl
    at
    java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1148)
    at
    java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
    at
    java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java:1841)
    at
    java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:480)
    at
    java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1214)
    at
    java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
    at
    java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java:1841)
    at
    java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:480)
    Coming Soon: Building J2EE Applications & BEA WebLogic Server
    by Michael Girdley, Rob Woollen, and Sandra Emerson
    http://learnweblogic.com

  • Uncaught Java Exception while persisting the null bean at e-biz suite login

    Dear Friends,
    Recently, there was a java upgrade in my system and after that when i login to E-Biz suite, i get the following Jinitiator error and many Jinitiator windows open up with this error.
    Uncaught Java Exception while persisting the null bean
    Java.io.NotSerializableException:java.lang.thread
        at.java.io.ObjectOutputStream.outputObject(Compiled Code)
        at.java.io.ObjectOutputStream.writeObject(Compiled Code)
        at.java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:369)
        at.java.io.ObjectOutputStream.outputObject(Compiled Code)
        at.java.io.ObjectOutputStream.writeObject(Compiled Code)
        at sun.beans.ole.OleBeanInterface.saveBean(OleBeanInterface.java.508)It is very difficult to deal with many jinitiator error windows opening up.
    Could any one tell the reason for this issue and its resolution as well?
    Regards,
    Sreekanth
    Edited by: Sreekanth Munagala on Jun 14, 2012 8:49 AM
    Edited by: Sreekanth Munagala on Jun 14, 2012 8:51 AM

    Please post the details of the application release, database version and OS.
    Recently, there was a java upgrade in my system What is this upgrade? From what version to what version?
    What is your client OS/Browser?
    What is the Jinitiator version?
    and after that when i login to E-Biz suite, i get the following Jinitiator error and many Jinitiator windows open up with this error.
    Uncaught Java Exception while persisting the null bean
    Java.io.NotSerializableException:java.lang.thread
    at.java.io.ObjectOutputStream.outputObject(Compiled Code)
    at.java.io.ObjectOutputStream.writeObject(Compiled Code)
    at.java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:369)
    at.java.io.ObjectOutputStream.outputObject(Compiled Code)
    at.java.io.ObjectOutputStream.writeObject(Compiled Code)
    at sun.beans.ole.OleBeanInterface.saveBean(OleBeanInterface.java.508)It is very difficult to deal with many jinitiator error windows opening up.
    Could any one tell the reason for this issue and its resolution as well?Is the issue with all clients and all browsers?
    Have you tried to clear the jcache and the browser history files?
    Thanks,
    Hussein

  • "Access Violation" exception while accessing PDEImage in outside of the class as a parameter

    Hi,
    In our project, we are retrieving PDEImage content from PDF Page by using below line of code in our Plugin project:
    But we are getting "Access Violation" exception while accessing retrieved PDEImage in outside of the class as a parameter.
    This issue is happening only in Windows 8.1 and Acrobat 11 combination.
    If we remove the above highlighted lines from the method then no exception and working fine.
    But we don't know why these lines are added, because we are not updating any of the PDF content here.
    We are planning to remove these highlighted lines from the method.
    We want to know whether the removing of these lines will impact the application.
    Kindly help us to resolve the issue.

    And will removing the lines impact the application? Certainly. If you do not call PDPageReleasePDEContent you will have a memory leak at best, or may prevent other activity from completing (such as saving or closing the file). The first two lines, however, are redundant since you do not seem to be actually changing the page.
    You must call PDPageReleasePDEContent  when you have finished with the content, in every case.

  • Accessing Managed Session Bean in Servlet Filter

    I wrote a Servlet Filter to handle user authentication. Now I'm trying to access my Managed Session Bean in the filter in order to save the current user. Unfortunately the Session Bean is created after the Filter executes for the first time.
    I'm trying to access the Session Bean in this way:
    (SessionBean) FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("sessionBean");
    In this case getExternalContext() is equals null.
    Is there any way to create the Session bean before the filter executes or any other ideas how to handle this?
    I already searched around the internet but couldnt figure out something.
    Thanks guys,
    Paul

    Ok, fixed it like this. Works perfect. JSF finds and uses the handmade Session Bean as well.
    if(request.getSession().getAttribute(BeanNames.SESSION_SCOPE_BEAN) == null) {
         SessionBean sessionBean = new SessionBean();
         request.getSession().setAttribute(BeanNames.SESSION_SCOPE_BEAN, sessionBean);
    }Thanks,
    Paul

  • Deploying session beans with weblogic 5.1 in NT

    Hello ,
    I have a problem with deploying session beans in weblogic 5.0. I have
    written the code and compiled it. My Compilation is fine. Cud any one give
    me a step by step of how I should deploy my bean with weblogic 5.0 on
    windows NT.
    Raj Urs

    Hello ,
    I have a problem with deploying session beans in weblogic 5.0. I have
    written the code and compiled it. My Compilation is fine. Cud any one give
    me a step by step of how I should deploy my bean with weblogic 5.0 on
    windows NT.
    Raj Urs

  • Problem While calling a session bean (J2EE)

    Hi!!
    Please see my client-side code..where I am calling a session bean (J2EE Server)
    It's correct or not?????
    InitialContext ctx = new InitialContext();
    Object objref = ctx.lookup("SecDbSecRoleJndi");
    SecBusSecRoleHome home =(SecBusSecRoleHome)PortableRemoteObject.narrow(objref,SecBusSecRoleHome.class);
    SecBusSecRoleRemote remote =(SecBusSecRoleRemote)PortableRemoteObject.narrow(home.create(),SecBusSecRoleRemote.class);
    Here I am getting the error at 3rd line
    java.lang.ClassCastException
    at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:296)
    at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
    at TestServlet.init(TestServlet.java:22)
    Please do the favor to me..reply me back.
    Bhumika

    Hello,
    Hope you are bale to sole the problem by this time. Iam using the follwing code and its working fine for me. i'm using the weblogic application server.
    <%@ page import="javax.naming.*, java.rmi.*, javax.ejb.*, java.util.*,java.rmi.server.*,java.net.*,javax.rmi.PortableRemoteObject,com.hmp.webcasting.services.ejb.*"%>
    <%
    try{             
    Properties prop = new Properties();
    prop.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
              System.out.println("Hello......3333333333Test");
              prop.put(Context.PROVIDER_URL, "t3://pani:7001");
              InitialContext ctx = new InitialContext(prop);
    Object home = ctx.lookup("personMgr");
              KeywordsMgrHome roleHome = (KeywordsMgrHome) javax.rmi.PortableRemoteObject.narrow(home, KeywordsMgrHome.class);
              KeywordsMgr kmgr=roleHome.create();
              //KeywordsMgrHome roleHome = (KeywordsMgrHome) ctx.lookup("personMgr");;
              System.out.println(roleHome);
              System.out.println(kmgr);
              }catch(Exception e){
              e.printStackTrace();
              %>
    Try using this.
    Genrally calss cast exception occurs if you are using classes out of a shared library directory instead of within the webapp, or if you are somehow maintaining references to object instances created with the old class and trying to use them after the reload. So try to delete the old file files and deploy the bean once again . Hope this may help you. Anyway if you can give the full code i will check by deploying it.([email protected])

  • Database access from session bean

    Hello,
    I have a stateless session bean which performs some complex
    calculations, and also does some database access.
    For the database access the bean class has a datasource as
    follows:
    public class TestBean implements SessionBean {
    private DataSource ds_;
    public void ejbCreate() {
         getDataSources();
    private void getDataSources() {
         try {
         Context ictx = new InitialContext();
         ds_ = (DataSource)ictx.lookup("java:comp/env/jdbc/TestDB");
         } catch (Exception e) {
         e.printStackTrace();
         throw new EJBException(e);
    Now this class has a method (which is also in the remote interface)
    calculateSomething(). This method constructs a number of other
    objects that do the actual calculation, and one of these objects
    does the actual database access. How would another object be able to
    use the datasource that was constructed in the bean class?
    I could pass the datasource reference to that object, but that would
    break my encapsulation. This is because that object does not get
    created directly by the bean object, but rather the way the objects
    interact is something like A -> B -> C, where A is the TestBean, and
    C is the object that does the DB access. If I passed the datasource,
    I would need to make B aware of the datasource, which doesn't
    seem good design, because B doesn't do any database access.
    Alternatively I could do the lookup in class C, but that would
    degrade the performance, as an object C gets created and destroyed
    every time the calculateSomething() method is called.
    A third option I have thought of, is to add a public method to the
    bean that returns a connection. Whenever another object gets
    created, a reference to the bean object will be passed along. Then,
    if another object needs to do database access, it will call back
    the bean to get a connection. This seems just as bad (if not worse)
    than the first option.
    Does anyone have an elegant solution for this situation? What is
    the best practice of handling datasources when a bean class doesn't
    do the database access itself? In all the examples I've seen so far,
    all the functionality was in the session bean class, but again that
    doesn't seem good OO design, and would result in a single huge class.
    regards,
    Kostas

    Thanks again to both for the replies. Here are my responses:
    Yi Lin: Yes, I know that an entity bean would solve this problem, however it has been decided not to use entity beans so this is not my call (I think the reason entity beans are not allowed in this project is that they are considered risky: there are other applications that access the same database, so if the container caches entity bean data as you describe, then the users might get inconsistent results).
    Gerard: Actually object B is the one that has the business logic and C is a peer object that only does database access and no calculaitons. For example B can be Customer, and C CustomerDB. This is why object B does not have any knowledge of datasources or connections. So my design does not appear to be that bad!
    As far as the factory you propose is concerned, I cannot understand how this would solve my problem. In order to solve this situation the factory would need to be persistent, i.e. get created by the ejbCreate() method, and destroyed whenever the container decides to destroy the bean. There would be no point in object C creating the factory, as I would have the overhead of doing the JNDI lookup every time I create a C.
    So the question remains the same: how would I pass a reference to the factory from A to C without making B aware of it?

  • Exception while accessing web application

    Hi All,
    I have deployed my web application on OC4J 10.1.3. But while accessing application i am geeting NullPointer Exception below is the complete stack trace for the same.
    java.lang.NullPointerException
    at org.mortbay.servlet.jetty.IncludableGzipFilter$IncludableGzipStream.setContentEncodingGzip(IncludableGzipFilter.java:54)
    at org.mortbay.servlet.GzipFilter$GzipStream.doGzip(GzipFilter.java:482)
    at org.mortbay.servlet.GzipFilter$GzipStream.checkOut(GzipFilter.java:531)
    at org.mortbay.servlet.GzipFilter$GzipStream.write(GzipFilter.java:465)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.EvermindJSPWriter.writeOut(EvermindJSPWriter.java:539)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.EvermindJSPWriter.jspflush(EvermindJSPWriter.java:436)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.EvermindJSPWriter.assureSpace(EvermindJSPWriter.java:922)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.EvermindJSPWriter.javaCharsToAL32UTF8(EvermindJSPWriter.java:1058)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.EvermindJSPWriter.print(EvermindJSPWriter.java:849)
    at org.apache.taglibs.standard.tag.common.fmt.MessageSupport.doEndTag(Unknown Source)
    at public.login._jspService(_login.java:1817)
    at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.3.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.zimbra.webClient.servlet.JspServlet.service(JspServlet.java:38)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
    at com.zimbra.webClient.filters.SetHeaderFilter.doFilter(SetHeaderFilter.java:264)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
    at org.mortbay.servlet.UserAgentFilter.doFilter(UserAgentFilter.java:81)
    at org.mortbay.servlet.GzipFilter.doFilter(GzipFilter.java:132)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
    at oracle.security.jazn.oc4j.JAZNFilter$1.run(JAZNFilter.java:396)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:396)
    at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:415)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.AJPRequestHandler.run(AJPRequestHandler.java:302)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.AJPRequestHandler.run(AJPRequestHandler.java:190)
    at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    at java.lang.Thread.run(Thread.java:595)

    I am having the same issue has anyone found a solution to this I have deployed a WAR file to the server an I am getting this error when I try to run the application. I would appreciate some input as this is a PRODUCITON issue
    the following statement is where this problems
    ps = conn1.prepareStatement("<string variable>");
    09/12/14 13:42:07 sfrracl: Servlet error
    java.lang.NullPointerException
    at sfrracl.SfrraclUpd.doPost(SfrraclUpd.java:269)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:835)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:341)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:816)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:231)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:136)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
    at java.lang.Thread.run(Thread.java:534)
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

  • Pls Help! Failed to access local Session bean in 7.0!

    Hi all,
    Heard that to deploy local bean in weblogic 7.0, I need to put my war
    file and ejb jar files in the ear file. My client servlet contains the
    following:
    AccessControlLocalHome accessControlLocalHome =
    (AccessControlLocalHome)ctx.lookup("AccessControlLocalHome");
    But it failed miserably with the exception
    javax.naming.LinkException: . Root exception is
    javax.naming.NameNotFoundExcept
    ion: Unable to resolve
    'app/ejb/AccessControlBean.jar#AccessControlBean/local-ho
    me' Resolved: 'app/ejb'
    Unresolved:'AccessControlBean.jar#AccessControlBean' ; r
    emaining name 'AccessControlBean.jar#AccessControlBean/local-home'
    Just got an idea that it might be my web.xml file. So I include the
    following in my web.xml file:
    <ejb-local-ref>
         <ejb-ref-name>ejb/AccessControlLocalHome</ejb-ref-name>
         <ejb-ref-type>Session</ejb-ref-type>
    <local-home>com.spear.ejb.simorder.VendorOrderSLBean.AccessControlLocalHome</local-home>
    <local>com.spear.ejb.simorder.VendorOrderSLBean.AccessControlLocal</local>
    <ejb-link>AccessControlBean.jar#AccessControlBean</ejb-link>
    </ejb-local-ref>
    But it gives the following error:
    Module Name: projects, Error: weblogic.j2ee.DeploymentException: Could
    not setup
    environment - with nested exception:
    [javax.naming.NameNotFoundException: Unable to resolve ejb-link.
    AccessControlBe
    an.jar#AccessControlBean is not in the context. The context includes
    the followi
    ng link bindings: {} Make sure the link reference is relative to the
    URI of the
    referencing module.]
    Pls help!
    Thanks!
    Innovest

    <ejb-link> should be
    <ejb-link> ../AccessControlBean.jar#AccessControlBean</ejb-link>
    innovest wrote:
    Hi all,
    Heard that to deploy local bean in weblogic 7.0, I need to put my war
    file and ejb jar files in the ear file. My client servlet contains the
    following:
    AccessControlLocalHome accessControlLocalHome =
    (AccessControlLocalHome)ctx.lookup("AccessControlLocalHome");
    But it failed miserably with the exception
    javax.naming.LinkException: . Root exception is
    javax.naming.NameNotFoundExcept
    ion: Unable to resolve
    'app/ejb/AccessControlBean.jar#AccessControlBean/local-ho
    me' Resolved: 'app/ejb'
    Unresolved:'AccessControlBean.jar#AccessControlBean' ; r
    emaining name 'AccessControlBean.jar#AccessControlBean/local-home'
    Just got an idea that it might be my web.xml file. So I include the
    following in my web.xml file:
    <ejb-local-ref>
    <ejb-ref-name>ejb/AccessControlLocalHome</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local-home>com.spear.ejb.simorder.VendorOrderSLBean.AccessControlLocalHome</local-home>
    <local>com.spear.ejb.simorder.VendorOrderSLBean.AccessControlLocal</local>
    <ejb-link>AccessControlBean.jar#AccessControlBean</ejb-link>
    </ejb-local-ref>
    But it gives the following error:
    Module Name: projects, Error: weblogic.j2ee.DeploymentException: Could
    not setup
    environment - with nested exception:
    [javax.naming.NameNotFoundException: Unable to resolve ejb-link.
    AccessControlBe
    an.jar#AccessControlBean is not in the context. The context includes
    the followi
    ng link bindings: {} Make sure the link reference is relative to the
    URI of the
    referencing module.]
    Pls help!
    Thanks!
    Innovest

  • Could not access Local Session Bean using JNDI lookup

    Hi EJB Guru,
    I am quite new to EJB 3.0 but have had a good deal of success including using JNDI to lookup Remote Stateless Session Bean in EJB 3.0. However, looking up local Stateless Session Bean prove more challenging with I had anticipated.
    Here is my code
    as follows:
    public interface Calculator {
        public int add(int x, int y);
        public int subtract(int x, int y);
    import javax.ejb.Remote;
    @Remote
    public interface CalculatorRemote extends Calculator {
    import javax.ejb.Local;
    @Local
    public interface CalculatorLocal extends Calculator {
    import javax.ejb.Local;
    import javax.ejb.Remote;
    import javax.ejb.Stateless;
    import bean.CalculatorLocal;
    import bean.CalculatorRemote;
    @Stateless
    public class CalculatorBean implements CalculatorRemote, CalculatorLocal {
        public int add(int x, int y) {
            return x + y;
        public int subtract(int x, int y) {
            return x - y;
    import bean.*;
    import bean.Calculator;
    import bean.CalculatorLocal;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    public class ClientAccessLocalCalculator {
        public static void main(String[] args) throws NamingException {
            InitialContext ctx = new InitialContext();
            CalculatorLocal calculator = (CalculatorLocal) ctx.lookup("CalculatorBean/local");
            System.out.println("1 + 1 = " + calculator.add(1, 1));
            System.out.println("1 - 1 = " + calculator.subtract(1, 1));    }
    import bean.Calculator;
    import bean.CalculatorRemote;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    public class ClientAccessRemoteCalculator {
        public static void main(String[] args) throws NamingException {
            InitialContext ctx = new InitialContext();
            CalculatorRemote calculator = (CalculatorRemote) ctx.lookup("CalculatorBean/remote");
            System.out.println("1 + 1 = " + calculator.add(1, 1));
            System.out.println("1 - 1 = " + calculator.subtract(1, 1));    }
    }Output when running ClientAccessRemoteCalculator gives
    1 + 1 = 2
    1 - 1 = 0
    Output when running ClientAccessLocalCalculator on JBoss AS 4.0.5 gives:
    Exception in thread "main" javax.ejb.EJBException: Invalid invocation of local interface (null container)
    at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:75)
    at $Proxy0.add(Unknown Source) at ClientAccessLocalCalculator.main(ClientAccessLocalCalculator.java:14)
    JNDIView in JMX-Console in JBoss:
    +- CalculatorBean (class: org.jnp.interfaces.NamingContext)
    | +- local (proxy: $Proxy84 implements interface bean.CalculatorLocal,interface org.jboss.ejb3.JBossProxy,interface javax.ejb.EJBLocalObject)
    | +- remote (proxy: $Proxy83 implements interface bean.CalculatorRemote,interface org.jboss.ejb3.JBossProxy,interface javax.ejb.EJBObject)
    Output when running ClientAccessLocalCalculator on SJSAS 9.0 gives:
    Exception in thread "main" javax.naming.NameNotFoundException: bean.CalculatorLocal not found
    C:\>asadmin
    Use "exit" to exit and "help" for online help.
    asadmin> list-jndi-entries
    Jndi Entries for server within root context:
    bean.CalculatorRemote: javax.naming.Reference
    jbi: com.sun.enterprise.naming.TransientContext
    jdbc: com.sun.enterprise.naming.TransientContext
    UserTransaction: com.sun.enterprise.distributedtx.UserTransactionImpl
    bean.CalculatorRemote__3_x_Internal_RemoteBusinessHome__: javax.naming.Reference
    bean.CalculatorRemote#bean.CalculatorRemote: javax.naming.Reference
    ejb: com.sun.enterprise.naming.TransientContext
    Command list-jndi-entries executed successfully.
    asadmin>I am using Application Client to lookup these Session Beans on Netbeans 5.5, JBoss AS 4.0.5 (EJB3 installer)/SJSAS
    9.0, SDK 1.5.0_11 on Windows XP platform.
    Any assistance would be much appreciated.
    Many thanks,
    Henry

    Hi Henry,
    Any direct global JNDI lookup is not portable. It works in some cases but not in others, which
    is why we recommend using the portable Java EE approach of declaring an ejb dependency
    and looking up that dependency via the bean's component environment (java:comp/env).
    This is true whether you're dealing with Remote or Local ejb dependencies.
    Local ejbs are not supported in the Application Client tier at all. In the server tier, there is no
    guarantee that a Local EJB even is assigned a global JNDI name since there's no requirement
    that it be available outside of the application in which the ejb is defined.
    You can find more information on these ejb access topics in our EJB FAQ :
    https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html

  • Error while Look up session bean (EJB 3.0) in WebDynpro

    hi ,
                 I want to look up session bean inside webdynpro. I hv written following code inside init of component controller. but not able to look up session bean
    try{
                   InitialContext context = new InitialContext();
                   ApplicationFetcherLocal applicationFetcherLocal = null;
                 applicationFetcherLocal = (ApplicationFetcherLocal)context.lookup((ApplicationFetcherLocal.class.getName());
              catch (Exception ex){
                   System.err.println("LookUp Failed\n\n"+ex.getMessage());

    Have you read my latest reply in your other [thread|session bean look up  across DCs in EJB3.0;?
    What's the value of asking the same question again if you don't care about the answer?
    Regards,
    -- Vladimir

  • Exception while starting deployed EAR in weblogic server

    Hi,
    I am using Oracle jdeveloper 11.1.1.4.0 and have created EAR of my application.
    I deployed it in WebLogic Server, however when I tried to start(servicing all request) the same.
    It is throwing following exception,
    weblogic.management.DeploymentException: [J2EE:160149]Error while processing library references.
    Unresolved application library references, defined in weblogic-application.xml:
    [Extension-Name: adf.oracle.domain, exact-match: false].Where is this weblogic-application.xml file located?
    Appreciate your help.
    Thanks in Advance,
    Madhav.

    Hi,
    Thanks, these links are really helpful.
    I added that library in server shared library successfully.
    but now there is new exception while starting the application using deployed EAR,
    weblogic.common.ResourceException: java.security.PrivilegedActionException:
    weblogic.common.ResourceException: java.security.PrivilegedActionException:
    weblogic.common.ResourceException: No credential mapper entry found for password indirection user=sa
    for data source CommonConnThanks,
    Madhav.
    Edited by: Madhav on Aug 19, 2011 12:56 AM

Maybe you are looking for

  • Help!my computer or itunes is no longer recognising my ipod nano

    i bought a pink ipod nano 4gb on the 25/5/07 on that night i plugged it into my computer it picked it up and installed itunes and quickplayer.I eventually figuired out how to put my songs on then after i did that i pressed the eject putton and the da

  • Drill Down Functionality in Report.

    Hello Gurus, I have one requirement where end user want to use drill down functionality for OBIEE reports. we are using 10.1.3.4.1 version rite now. Now what user wants is he want to drill down from Country -->State --> County -->City --> Zip code, S

  • What's the best Arch mirror for India ?

    I have tried the Israeli mirror, a few european mirrors and even the US based mirrors, but none of them give me good download speeds. Can some users in India tell me which might be a good mirror to use. I used to get amazing speeds from a few US mirr

  • Can't upgrade from facetime 1.0.2 to 1.0.5

    I'm running on 10.6.8 and would like to either upgrade or purchase 1.0.5 There is no upgrades available in either the SW upgrades and when I go to  purchase 1.0.5( I don't care about the .99), it tell me that it's already installed and that I should

  • FB03: How to change 0SAP layout?

    Hi all: I'm working on a Upgrade project from 4.6C to ECC6. I'm having this issue: In 4.6C version, the system shows the Text column (field BSEG-SGTXT) in FB03 transaction when I select 0SAP layout for ALV. This layout was modified from SAP original'