JNDI lookup and Singletons

Hi there,
I am doing some tests on Glassfish v3 and new EJB 3.1 features. I've migrated some beans I previously had to bind to the web layer and now I can have in the EJB layer thanks to the new Singleton concept. The problem is that I don't know if I can get them with a JNDI lookup as I do with session beans. In Glassfish log I only see entries about JNDI names for the SSBs, not for the Singletons.
Are they visible in the JNDI naming system? How can I know the names? (I am migrating from JBoss 5.1 so I am also a bit new to Glassfish)
I cannot do a Dependency injection @EJB as I am using struts2 actions. I can only use JNDI (not right?) :-)
Thanks for any help,
Ignacio

Hi there,
I am doing some tests on Glassfish v3 and new EJB 3.1 features. I've migrated some beans I previously had to bind to the web layer and now I can have in the EJB layer thanks to the new Singleton concept. The problem is that I don't know if I can get them with a JNDI lookup as I do with session beans. In Glassfish log I only see entries about JNDI names for the SSBs, not for the Singletons.
Are they visible in the JNDI naming system? How can I know the names? (I am migrating from JBoss 5.1 so I am also a bit new to Glassfish)
I cannot do a Dependency injection @EJB as I am using struts2 actions. I can only use JNDI (not right?) :-)
Thanks for any help,
Ignacio

Similar Messages

  • OC4J, JNDI lookup and UserManager

    Hi
    Recently we decided to upgrade our Oracle9iAS to 9.0.3 from 9.0.2 and its JVM to 1.4.2_02 from 1.3.1.
    We have 2 customs implementations of UserManager that worked in the earlier version and, after the upgrade, it became unstable. Each UserManager uses a connection to a database provided by a DataSource, which is retrieved by a JNDI lookup. This lookup throws a NameNotFoundException after some time of execution. A container restart solves the problem, but it appears again later.
    What´s happening?
    Jose Antonio.

    Hi
    Recently we decided to upgrade our Oracle9iAS to 9.0.3 from 9.0.2 and its JVM to 1.4.2_02 from 1.3.1.
    We have 2 customs implementations of UserManager that worked in the earlier version and, after the upgrade, it became unstable. Each UserManager uses a connection to a database provided by a DataSource, which is retrieved by a JNDI lookup. This lookup throws a NameNotFoundException after some time of execution. A container restart solves the problem, but it appears again later.
    What´s happening?
    Jose Antonio.

  • JNDI Lookup in JSP fails for EJB 3.0

    I am new to Java technology. I read the EJB FAQ, NetBeans docs and may forum discussions and I am still confused with the error I am having.
    Background:
    I have developed a persistance bean and related sessions beans (similar to the customer-cmp-ear application in the Java App Server samples). Now I am trying to access this bean using a JSP. After deploying the war file in the App Server and try to access the page, I get the following error.
    javax.naming.NameNotFoundException: No object bound to name java:comp/env/ConsumerSessionLocal
    After reading many articles, I understood that I dont have to prepare any descriptors, or JAR files for EJB 3.0.
    Environment Details:
    Java App Server Ver 9.0
    NetBeans 5.5
    I normally build the war files using NetBeans.
    I use App Server Admin console to deploy the web applications using the above war file.
    EJB details:
    Persistance EJB : person.java
    Session Objects
    Consumer.java (this implements ConsumerSessionLocal, ConsumerSessionRemote). This Stateless bean accesses the methods in person.java.
    ConsumerSessionLocal.java - local interface
    ConsumerSessionRemote.java - remote interface
    SearchConsumer.jsp
    This JSP page is calling the ConsumerSessionLocal using the JNDI lookup through InitialContext.
    Here is the Code snippet:
    try {
    InitialContext ic = new InitialContext();
    Object o = ic.lookup("java:comp/env/ConsumerSessionLocal");
    ConsumerSessionLocal consSession = (ConsumerSessionLocal) o;
    I am able to see the jsp page in the browser, however, after a submit action, I get the Java Naming Exception error.
    javax.naming.NameNotFoundException: No object bound for java:comp/env/ConsumerSessionLocal
    I would appreciate your help/any of your thoughts.
    Thanks in advance.
    -Ram

    I did not really solve it. Instead I used some of the tutorials that used JNDI lookup and modified those as my way forward. I did not really find out exactly what I was doing wrong.
    /Anders

  • JNDI lookup in xml file

    I want to use JNDi lookup for DB. Where should i specify them. Rigtnow i have given the hibernate connections in persistance xml file with user name pwd etc. But i dont want to do this. I want to use JNDI lookup and configure my weblogic for the JNDI. What are the changes I need to make in the application context and persistance xml files. Pls help?
    my persistance .xml file looks like this,
    <?xml version="1.0" encoding="UTF-8"?>
    <persistence xmlns="http://java.sun.com/xml/ns/persistence"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    version="1.0"
    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
    <persistence-unit name="jpaPersistance" transaction-type="RESOURCE_LOCAL">
    <provider>org.hibernate.ejb.HibernatePersistence</provider>
    <class>com.ggg.jp.model.bo.individual</class>
    <exclude-unlisted-classes/>
    <properties>
    <property name="hibernate.archive.autodetection" value="class, hbm"/>
    <property name="hibernate.show_sql" value="true"/>
    <property name="hibernate.connection.driver_class" value="oracle.jdbc.driver.OracleDriver"/>
    <property name="hibernate.connection.password" value="test"/>
    <property name="hibernate.connection.url" value="jdbc:oracle:thin:@localhost:1521:xe"/>
    <property name="hibernate.connection.username" value="test"/>
    <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>
    </properties>
    </persistence-unit>
    </persistence>
    Application context looks like this,
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:jee="http://www.springframework.org/schema/jee"
    xmlns:aop="http://www.springframework.org/schema/aop"
    xmlns:tx="http://www.springframework.org/schema/tx"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
    http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.0.xsd
    http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
    http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
    <!-- <bean/> definitions here -->
    <context:annotation-config/>
    <bean id="demoDataServiceImpl" class="com.gg.jp.model.services.impl.DemoDataServiceImpl" />
    <bean id="recordGeneratorWebServiceHandler" class="com.gg.jp.webservice.RecordGeneratorWebServiceHandler">
    <property name="service" ref="demoDataServiceImpl"/>
    </bean>
    <bean id="entityManagerFactory"
    class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
    <property name="persistenceUnitName" value="jpaPersistance"/>
    </bean>
         <tx:annotation-driven/>
         <bean id="transactionManager"
         class="org.springframework.orm.jpa.JpaTransactionManager" >
         <property name="entityManagerFactory" ref="entityManagerFactory"/>
         </bean>
         </beans>

    Me again!
    So I found that I can't do jndi lookup (NamingException) for the datasource as mentioned, in the init method.
    However, the very same jndi lookup was successful in the overridden authenticate method, called by oc4j when trying to authenticate the user.
    Go figure!
    TIA,
    - nik.

  • Websphere JNDI lookup problem

    Hi All
    Two separate webapps, have different names for Datasources, on the same host and port. Both application work fine independently.
    When we deploy both applications on the same app server(websphere), whichever we executes first gets its datasource from JNDI lookup and works fine, but when we try second application it have problem in finding its data source from JNDI lookup. If we start this second application first, it will work fine, but now another will have the same problem in its JNDI lookup.
    Any idea why.
    Thanks
    ....Ranvir

    Hi All
    Two separate webapps, have different names for
    Datasources, on the same host and port. Both
    application work fine independently.
    When we deploy both applications on the same app
    server(websphere), whichever we executes first gets
    its datasource from JNDI lookup and works fine, but
    when we try second application it have problem in
    finding its data source from JNDI lookup. If we start
    this second application first, it will work fine, but
    now another will have the same problem in its JNDI
    lookup.
    Any idea why.
    Thanks
    ....RanvirHi Ranvir,
    Do you mean you try to reach the same datasource with different names or do you try to reach different datasources over the same port?
    If you try the first issue you shouldn't get any trouble. At least it works fine with JBOSS for example.
    But if you try to do the latter in my oppinion you don't have a JNDI problem but a problem with socket binding: the two different databases must be contacted over different ports.
    What do WebSphere's logs tell?
    Best regards
    Andy

  • JNDI Lookup Problem (General Problem)

    hi all,
    i am newbie on bea products, but i have some experience on java technologies, how i fount on bea documentations and forums many people has the same problem like this, can anybody help us (me)?
    problem: how is it possible to write simple client for j2ee server application? i found some posts about jndi lookup, and fount about j2ee client, but is there any doc or example how to write this j2ee client ???
    i worked with many application servers and i have no problem with them (JBoss, Sun App Server, IBM Websophere, Oracle AS etc.)
    some people told about jndi tree on Web Logic Server Administration console , i found this tree i my session beans looks like :
    Binding Name:
    TimestenExampleTimestenExample_jarInsertSubscriberBean_InsertSubscriber
    Class:     
    test.InsertSubscriberBean_o7jk9u_InsertSubscriberImpl_1000_WLStub
    why is so strange name for class or binding name ????
    my session bean name is : InsertSubscriber
    and it's implementation : InsertSubscriberBean
    how i can lookup from client ?????
    can anybody show me code snippet ???
    my client looks like :
    import java.util.Hashtable;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NameClassPair;
    import javax.naming.NamingEnumeration;
    import javax.naming.NamingException;
    import org.hibernate.property.Dom4jAccessor.ElementGetter;
    public class Client {
         public static void main(String[] args) {
              Context ctx = null;
              Hashtable ht = new Hashtable();
              ht.put(Context.INITIAL_CONTEXT_FACTORY,
                        "weblogic.jndi.WLInitialContextFactory");
              ht.put(Context.PROVIDER_URL, "t3://192.9.200.222:7001");
              try {
                   ctx = new InitialContext(ht);
                   InsertSubscriber usagefasade = (InsertSubscriber) ctx
                             .lookup("java:comp/InsertSubscriber");
              } catch (NamingException e) {
                   e.printStackTrace();
              } finally {
                   try {
                        ctx.close();
                   } catch (Exception e) {
                        e.printStackTrace();
    }can anybody show me what is there incorrect ????
    oo yes and i have weblogic.jar file into my client classpath.

    Hi,
    Your EJB client looks fine.
    You should use the JNDI name of your ejb while doing the lookup. i.e :
    InsertSubscriber usagefasade = (InsertSubscriber) ctx.lookup("..use JNDI name of EJB...");
    You can use the JNDI name of the EJB that you see in the JNDI tree of weblogic. [don't use Binding Name or Class name]. you can also specify the JNDI name by "jndi-name" attribute in weblogic-ejb-jar.xml.
    for more info:
    http://e-docs.bea.com/wls/docs81/ejb/ejb11.html
    Thanks,
    Qumar Hussain

  • JNDI lookup: J2EE Spec

    Hi.
    I am doing JNDI lookups, and I noticed that it is taking 1.0 format rather
    than 1.1.
    We are running WebLogic5.1. Does 5.1 support both 1.0 and 1.1.? Is there
    some parameter that I need to set to use 1.1?
    Works:
    tranx = (UserTransaction)
    context.lookup("javax.transaction.UserTransaction");
    Throws NamingException
    tranx = (UserTransaction)
    context.lookup("java:comp/UserTransaction");
    The above is one of the example. I have other environment settings that I
    would like to read.
    Thanks,
    Jennifer

    java:comp env lookup can be done only from the beans.
    The client has to use javax.transaction.UserTransaction
    Jennifer Yang wrote:
    Hi.
    I am doing JNDI lookups, and I noticed that it is taking 1.0 format rather
    than 1.1.
    We are running WebLogic5.1. Does 5.1 support both 1.0 and 1.1.? Is there
    some parameter that I need to set to use 1.1?
    Works:
    tranx = (UserTransaction)
    context.lookup("javax.transaction.UserTransaction");
    Throws NamingException
    tranx = (UserTransaction)
    context.lookup("java:comp/UserTransaction");
    The above is one of the example. I have other environment settings that I
    would like to read.
    Thanks,
    Jennifer

  • How to Lockup unauthorized JNDI Lookups

    Hello,
    I am running JNDI datasource from my Weblogic Server. I wrote an unauthorized
    client that makes a lookup on the JNDI "someJNDIName" and the program basically
    gets data from a table. See below....
    How do I lockup unauthorized clients? I want only the JSP pages to do the JNDI
    lookup and do the processing.
    Is there any setting I have to do, so that only authorized clients can access
    the JNDI?.
    Thanks.
    ---------------------------------------------- import java.sql.*; import java.util.*;
    import javax.naming.*;
    public class TestPool
    { public static void main(String [] args) { Context ctx = null; Hashtable ht =
    new Hashtable(); ht.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
    ht.put(Context.PROVIDER_URL,"t3://localhost:7001");
    Connection conn = null; Statement stmt = null; ResultSet rs = null;
    try { ctx = new InitialContext(ht); javax.sql.DataSource ds = (javax.sql.DataSource)
    ctx.lookup ("someJNDIName");
    conn = ds.getConnection(); // You can now use the conn object to create // Statements
    and retrieve result sets: stmt = conn.createStatement(); stmt.execute("select
    * from USERS"); rs = stmt.getResultSet(); if(rs == null) System.out.println("Result
    Set is null"); while(rs.next()) System.out.println(rs.getString(2)); } catch (Exception
    e) { System.out.println("Exception caught: "+e.getMessage()); } finally { try
    { ctx.close(); } catch (Exception e) { System.out.println("Cannot close the context");
    try { if (rs != null) rs.close(); } catch (Exception e) { System.out.println("Cannot
    close the result set"); } try { if (stmt != null) stmt.close(); } catch (Exception
    e) { System.out.println("Cannot close the Statement"); } try { if (conn != null)
    conn.close(); } catch (Exception e) { System.out.println("Cannot close the Connection");
    [TestPool.java]

    Hi,
    Take a look at the following:
    http://e-docs.bea.com/wls/docs70/secwlres/secroles.html#1208744
    That is for WLS 8.1. Other versions' docs will have a similar link. Also make
    sure that you disable user guest. This is done as the default in WLS 7.0 and
    higher. Prior to 7.0 you disable guest user through the console.
    Hope this helps,
    pat
    "John Mathunny" <[email protected]> wrote:
    >
    >
    >
    Hello,
    I am running JNDI datasource from my Weblogic Server. I wrote an unauthorized
    client that makes a lookup on the JNDI "someJNDIName" and the program
    basically
    gets data from a table. See below....
    How do I lockup unauthorized clients? I want only the JSP pages to do
    the JNDI
    lookup and do the processing.
    Is there any setting I have to do, so that only authorized clients can
    access
    the JNDI?.
    Thanks.
    ---------------------------------------------- import java.sql.*; import
    java.util.*;
    import javax.naming.*;
    public class TestPool
    { public static void main(String [] args) { Context ctx = null; Hashtable
    ht =
    new Hashtable(); ht.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
    ht.put(Context.PROVIDER_URL,"t3://localhost:7001");
    Connection conn = null; Statement stmt = null; ResultSet rs = null;
    try { ctx = new InitialContext(ht); javax.sql.DataSource ds = (javax.sql.DataSource)
    ctx.lookup ("someJNDIName");
    conn = ds.getConnection(); // You can now use the conn object to create
    // Statements
    and retrieve result sets: stmt = conn.createStatement(); stmt.execute("select
    * from USERS"); rs = stmt.getResultSet(); if(rs == null) System.out.println("Result
    Set is null"); while(rs.next()) System.out.println(rs.getString(2));
    } catch (Exception
    e) { System.out.println("Exception caught: "+e.getMessage()); } finally
    { try
    { ctx.close(); } catch (Exception e) { System.out.println("Cannot close
    the context");
    try { if (rs != null) rs.close(); } catch (Exception e) { System.out.println("Cannot
    close the result set"); } try { if (stmt != null) stmt.close(); } catch
    (Exception
    e) { System.out.println("Cannot close the Statement"); } try { if (conn
    != null)
    conn.close(); } catch (Exception e) { System.out.println("Cannot close
    the Connection");

  • Websphere jndi Lookup error

    Hi all,
    I have 3 ear projects and 1 utility project.
    1- utility jar
    1- EJB
    1- Web UI client for ejb
    1 - MDB client for ejb
    i am able to compile with out errors and started the server successfully.
    As i go through the application and when i look up for the ejb bean i am getting the following error.
    [10/12/07 16:41:27:035 CDT] 00000021 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl initialize FFDC0009I: FFDC opened incident stream file C:\Program Files\ibm\SDP70\runtimes\base_v61\profiles\AppSrv02\logs\ffdc\server1_7dc27dc2_07.10.12_16.41.27_0.txt
    [10/12/07 16:41:27:051 CDT] 00000021 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC closed incident stream file C:\Program Files\ibm\SDP70\runtimes\base_v61\profiles\AppSrv02\logs\ffdc\server1_7dc27dc2_07.10.12_16.41.27_0.txt
    [10/12/07 16:41:27:066 CDT] 00000021 BeanMetaData  E   CNTR0075E: The user-provided class "com.bcbsmn.claims.perconf.ejb.EJSStatelessPerConfinementServiceHomeBean_fcba446f" needed by the EnterpriseBean could not be found or loaded.
    [10/12/07 16:41:27:332 CDT] 00000021 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl open FFDC0009I: FFDC opened incident stream file C:\Program Files\ibm\SDP70\runtimes\base_v61\profiles\AppSrv02\logs\ffdc\server1_7dc27dc2_07.10.12_16.41.27_1.txt
    [10/12/07 16:41:27:379 CDT] 00000021 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC closed incident stream file C:\Program Files\ibm\SDP70\runtimes\base_v61\profiles\AppSrv02\logs\ffdc\server1_7dc27dc2_07.10.12_16.41.27_1.txt
    [10/12/07 16:41:27:691 CDT] 00000021 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl open FFDC0009I: FFDC opened incident stream file C:\Program Files\ibm\SDP70\runtimes\base_v61\profiles\AppSrv02\logs\ffdc\server1_7dc27dc2_07.10.12_16.41.27_2.txt
    [10/12/07 16:41:27:707 CDT] 00000021 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC closed incident stream file C:\Program Files\ibm\SDP70\runtimes\base_v61\profiles\AppSrv02\logs\ffdc\server1_7dc27dc2_07.10.12_16.41.27_2.txt
    [10/12/07 16:41:27:723 CDT] 00000021 EJBContainerI E   WSVR0068E: Attempt to start EnterpriseBean PerConfinementEARProject#PerConfinementEJBProject.jar#PerConfinementService failed with exception: com.ibm.ejs.container.ContainerException: Failed to initialize BeanMetaData instance; nested exception is:
         java.lang.ClassNotFoundException: com.bcbsmn.claims.perconf.ejb.EJSStatelessPerConfinementServiceHomeBean_c3c0b315
         at com.ibm.ejs.container.BeanMetaData.<init>(BeanMetaData.java:1433)
         at com.ibm.ws.runtime.component.EJBContainerImpl.createBeanMetaData(EJBContainerImpl.java:1956)
         at com.ibm.ws.runtime.component.EJBContainerImpl.createDeferredBeanMetaData(EJBContainerImpl.java:4600)
         at com.ibm.ws.runtime.component.EJBContainerImpl.access$000(EJBContainerImpl.java:435)
         at com.ibm.ws.runtime.component.EJBContainerImpl$3.run(EJBContainerImpl.java:4399)
         at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
         at com.ibm.ws.runtime.component.EJBContainerImpl.initializeDeferredEJB(EJBContainerImpl.java:4396)
         at com.ibm.ejs.container.HomeOfHomes.getHome(HomeOfHomes.java:345)
         at com.ibm.ejs.container.HomeOfHomes.internalCreateWrapper(HomeOfHomes.java:481)
         at com.ibm.ejs.container.EJSContainer.createWrapper(EJSContainer.java:4278)
         at com.ibm.ejs.container.WrapperManager.faultOnKey(WrapperManager.java:528)
         at com.ibm.ejs.util.cache.Cache.findAndFault(Cache.java:496)
         at com.ibm.ejs.container.WrapperManager.keyToObject(WrapperManager.java:481)
         at com.ibm.ejs.oa.EJSOAImpl.keyToObject(EJSOAImpl.java:553)
         at com.ibm.ejs.oa.EJSRootOAImpl.keyToObject(EJSRootOAImpl.java:271)
         at com.ibm.rmi.corba.ObjectManager.lookupServant(ObjectManager.java:104)
         at com.ibm.CORBA.iiop.ServerDelegate.getServant(ServerDelegate.java:302)
         at com.ibm.rmi.iiop.ORB.lookupLocalObject(ORB.java:591)
         at com.ibm.CORBA.iiop.ORB.lookupLocalObject(ORB.java:1446)
         at com.ibm.rmi.iiop.CDRInputStream.newObjRef(CDRInputStream.java:1298)
         at com.ibm.rmi.iiop.CDRInputStream.read_Object(CDRInputStream.java:1275)
         at com.ibm.rmi.iiop.CDRInputStream.read_Object(CDRInputStream.java:1239)
         at com.ibm.rmi.corba.IorURL.iorbytesToObjref(IorURL.java:107)
         at com.ibm.rmi.corba.IorURL.resolve(IorURL.java:95)
         at com.ibm.rmi.corba.ORB.objectURLToObject(ORB.java:3677)
         at com.ibm.CORBA.iiop.ORB.objectURLToObject(ORB.java:3227)
         at com.ibm.rmi.corba.ORB.string_to_object(ORB.java:3578)
         at com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.resolveUnresolvedBinding(WsnOptimizedNamingImpl.java:2154)
         at com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.resolve_binding(WsnOptimizedNamingImpl.java:1895)
         at com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.do_resolve_complete_info(WsnOptimizedNamingImpl.java:599)
         at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase.resolve_complete_info(WsnOptimizedNamingImplBase.java:2215)
         at com.ibm.WsnOptimizedNaming._NamingContextStub.resolve_complete_info(_NamingContextStub.java:536)
         at com.ibm.ws.naming.jndicos.CNContextImpl.cosResolve(CNContextImpl.java:4351)
         at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1901)
         at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1862)
         at com.ibm.ws.naming.jndicos.CNContextImpl.lookupExt(CNContextImpl.java:1552)
         at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1354)
         at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:172)
         at javax.naming.InitialContext.lookup(InitialContext.java:363)
         at com.bcbsmn.claims.perconf.managedbean.SearchBean.search(SearchBean.java:315)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
         at java.lang.reflect.Method.invoke(Method.java:615)
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:127)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:73)
         at javax.faces.component.UICommand.broadcast(UICommand.java:312)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:298)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:412)
         at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:77)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:220)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:91)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
         at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966)
         at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
         at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463)
         at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3129)
         at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:238)
         at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)
         at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)
         at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:93)
         at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
         at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)
         at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
         at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)
         at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)
         at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)
         at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
         at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194)
         at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:741)
         at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863)
         at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510)
    Caused by: java.lang.ClassNotFoundException: com.bcbsmn.claims.perconf.ejb.EJSStatelessPerConfinementServiceHomeBean_c3c0b315
         at com.ibm.ws.classloader.CompoundClassLoader.findClass(CompoundClassLoader.java:472)
         at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:373)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:561)
         at com.ibm.ejs.container.BeanMetaData.loadExistedClass(BeanMetaData.java:3763)
         at com.ibm.ejs.container.BeanMetaData.<init>(BeanMetaData.java:1329)
         ... 71 more
    [10/12/07 16:41:27:973 CDT] 00000021 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl open FFDC0009I: FFDC opened incident stream file C:\Program Files\ibm\SDP70\runtimes\base_v61\profiles\AppSrv02\logs\ffdc\server1_7dc27dc2_07.10.12_16.41.27_3.txt
    [10/12/07 16:41:27:988 CDT] 00000021 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC closed incident stream file C:\Program Files\ibm\SDP70\runtimes\base_v61\profiles\AppSrv02\logs\ffdc\server1_7dc27dc2_07.10.12_16.41.27_3.txt
    [10/12/07 16:41:28:238 CDT] 00000021 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl open FFDC0009I: FFDC opened incident stream file C:\Program Files\ibm\SDP70\runtimes\base_v61\profiles\AppSrv02\logs\ffdc\server1_7dc27dc2_07.10.12_16.41.28_0.txt
    [10/12/07 16:41:28:254 CDT] 00000021 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC closed incident stream file C:\Program Files\ibm\SDP70\runtimes\base_v61\profiles\AppSrv02\logs\ffdc\server1_7dc27dc2_07.10.12_16.41.28_0.txt
    [10/12/07 16:41:28:504 CDT] 00000021 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl open FFDC0009I: FFDC opened incident stream file C:\Program Files\ibm\SDP70\runtimes\base_v61\profiles\AppSrv02\logs\ffdc\server1_7dc27dc2_07.10.12_16.41.28_1.txt
    [10/12/07 16:41:28:519 CDT] 00000021 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC closed incident stream file C:\Program Files\ibm\SDP70\runtimes\base_v61\profiles\AppSrv02\logs\ffdc\server1_7dc27dc2_07.10.12_16.41.28_1.txt
    [10/12/07 16:41:28:754 CDT] 00000021 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl open FFDC0009I: FFDC opened incident stream file C:\Program Files\ibm\SDP70\runtimes\base_v61\profiles\AppSrv02\logs\ffdc\server1_7dc27dc2_07.10.12_16.41.28_2.txt
    [10/12/07 16:41:28:848 CDT] 00000021 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC closed incident stream file C:\Program Files\ibm\SDP70\runtimes\base_v61\profiles\AppSrv02\logs\ffdc\server1_7dc27dc2_07.10.12_16.41.28_2.txt
    [10/12/07 16:41:29:066 CDT] 00000021 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl open FFDC0009I: FFDC opened incident stream file C:\Program Files\ibm\SDP70\runtimes\base_v61\profiles\AppSrv02\logs\ffdc\server1_7dc27dc2_07.10.12_16.41.29_0.txt
    [10/12/07 16:41:29:113 CDT] 00000021 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC closed incident stream file C:\Program Files\ibm\SDP70\runtimes\base_v61\profiles\AppSrv02\logs\ffdc\server1_7dc27dc2_07.10.12_16.41.29_0.txt
    [10/12/07 16:41:29:113 CDT] 00000021 Helpers       W   NMSV0610I: A NamingException is being thrown from a javax.naming.Context implementation. Details follow:
    Context implementation: com.ibm.ws.naming.jndicos.CNContextImpl
    Context method: lookupExt
    Context name: BCBSMN79477Node02Cell/nodes/BCBSMN79477Node02/servers/server1
    Target name: com/bcbsmn/claims/perconf/PerConfinementService
    Other data: ""
    Exception stack trace: javax.naming.NamingException: Error during resolve [Root exception is org.omg.CORBA.portable.UnknownException:   vmcid: 0x0  minor code: 0 completed: Maybe]
         at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1939)
         at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1862)
         at com.ibm.ws.naming.jndicos.CNContextImpl.lookupExt(CNContextImpl.java:1552)
         at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1354)
         at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:172)
         at javax.naming.InitialContext.lookup(InitialContext.java:363)
         at com.bcbsmn.claims.perconf.managedbean.SearchBean.search(SearchBean.java:315)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
         at java.lang.reflect.Method.invoke(Method.java:615)
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:127)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:73)
         at javax.faces.component.UICommand.broadcast(UICommand.java:312)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:298)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:412)
         at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:77)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:220)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:91)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
         at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966)
         at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
         at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463)
         at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3129)
         at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:238)
         at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)
         at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)
         at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:93)
         at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
         at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)
         at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
         at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)
         at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)
         at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)
         at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
         at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194)
         at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:741)
         at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863)
         at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510)
    Caused by: org.omg.CORBA.portable.UnknownException:   vmcid: 0x0  minor code: 0 completed: Maybe
         at com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.resolveUnresolvedBinding(WsnOptimizedNamingImpl.java:2193)
         at com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.resolve_binding(WsnOptimizedNamingImpl.java:1895)
         at com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.do_resolve_complete_info(WsnOptimizedNamingImpl.java:599)
         at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase.resolve_complete_info(WsnOptimizedNamingImplBase.java:2215)
         at com.ibm.WsnOptimizedNaming._NamingContextStub.resolve_complete_info(_NamingContextStub.java:536)
         at com.ibm.ws.naming.jndicos.CNContextImpl.cosResolve(CNContextImpl.java:4351)
         at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1901)
         ... 38 moreCan any body tell me what's wrong with it? i have seen all the stubs generated it is looking for but not able to load/recognize it? And also i need to mention other problem is that everytime i compile, deploy and start the server i am getting open failure exception and server not recognizing the ejb jar and if i close and restart the RSA server starts well.
    Pls help me in solving this issue.

    Hi All
    Two separate webapps, have different names for
    Datasources, on the same host and port. Both
    application work fine independently.
    When we deploy both applications on the same app
    server(websphere), whichever we executes first gets
    its datasource from JNDI lookup and works fine, but
    when we try second application it have problem in
    finding its data source from JNDI lookup. If we start
    this second application first, it will work fine, but
    now another will have the same problem in its JNDI
    lookup.
    Any idea why.
    Thanks
    ....RanvirHi Ranvir,
    Do you mean you try to reach the same datasource with different names or do you try to reach different datasources over the same port?
    If you try the first issue you shouldn't get any trouble. At least it works fine with JBOSS for example.
    But if you try to do the latter in my oppinion you don't have a JNDI problem but a problem with socket binding: the two different databases must be contacted over different ports.
    What do WebSphere's logs tell?
    Best regards
    Andy

  • EJB 3.0 and jndi lookup (simple question)

    hi all,
    i am newbie on Weblogic Application Server and i have some issues,
    i have weblogic application server 10.0, also i have oracle timesten in-memory database, i have configured datasource and deploy my ejb 3.0 application, but i could not done jndi lookup?
    here is my example:
    1. one stateless session bean :
    import javax.ejb.Remote;
    @Remote
    public interface InsertSubscriber {
         public void insertSubscriber(SubscriberT subscriberT);
    } 2. here is it's implementation :
    @Remote(InsertSubscriber.class)
    @Stateless
    public class InsertSubscriberBean implements InsertSubscriber {
         @PersistenceContext(unitName = "TimesTenDS")
         private EntityManager oracleManager;
         public void insertSubscriber(SubscriberT subscriber)
              try {
                   System.out.println("started");
                   oracleManager.persist(subscriber);
                   System.out.println("end");
              } catch (Exception e) {
                   e.printStackTrace();
    }3 and my test client :
    public class Client {
         public static void main(String[] args) {
              Context ctx = null;
              Hashtable ht = new Hashtable();
              ht.put(Context.INITIAL_CONTEXT_FACTORY,
                        "weblogic.jndi.WLInitialContextFactory");
              ht.put(Context.PROVIDER_URL, "t3://192.9.200.222:7001");
              try {
                   ctx = new InitialContext(ht);
                   InsertSubscriber usagefasade = (InsertSubscriber) ctx
                             .lookup("ejb.InsertSubscriberBean");               
              } catch (NamingException e) {
                   e.printStackTrace();
              } finally {
                   try {
                        ctx.close();
                   } catch (Exception e) {
                        e.printStackTrace();
    }what i did incorrect ???
    i got error like this : Name not fount exception
    when i tried to view jndi tree on weblogic server application console i found this :
         Binding Name:     
    TimestenExampleTimestenExample_jarInsertSubscriberBean_InsertSubscriber     
         Class:     
    test.InsertSubscriberBean_o7jk9u_InsertSubscriberImpl_1000_WLStub     
         Hash Code:     
    286     
         toString Results:     
    weblogic.rmi.internal.CollocatedRemoteRef - hostID: '2929168367193491522S::billing_domain:AdminServer', oid: '286', channel: 'null'what does it mean how i can done lookup to jndi ?
    Regards,
    Paata Lominadze,
    Magticom LTD.
    Georgia.

    Hi All,
    I am using the weblogic cluster with session replication and EJB 2.0 with Local entity beans.
    for fail-over session should be replicated to another server so we can achive the same session if 1st server fails.
    Suppose i m using two managed server(server1,server2) in the cluster.I am storing the object of class ABC into session and object contains the instance of Local-EntityBean home but i put that as a transient.I have also override the readObject and write object method.
    when write object is called on 1st server,readObject method should be called on second server so we will be sure that session is replicating properly.
    pleaase find the code below : -
    public IssuerPageBean() {
    initEJB();
    private void readObject(java.io.ObjectInputStream stream) throws IOException, ClassNotFoundException {
    stream.defaultReadObject();
    initEJB();
    initializeCommonObject();
    private void writeObject(java.io.ObjectOutputStream stream) throws IOException {
    stream.defaultWriteObject();
    private void initEJB() {
    try {
    ic = new InitialContext();
    issuerHome = (LocalIssuerHome) ic.lookup("java:comp/env/Issuer");
    } catch (NamingException e) {
    e.printStackTrace();
    in my case if i am calling the constructor IssuerPageBean(),it calls the initEJB() method and lookeup the entity local home properly but when readObject method is called on another server only initEJB() method is called directly and getting the exception below :
    WARNING: Error during create -
    javax.naming.NameNotFoundException: remaining name: env/ejb/Client
    at weblogic.j2eeclient.SimpleContext.resolve(Ljavax/naming/Name;Z)Ljavax/naming/Context;(SimpleContext.java:35)
    at weblogic.j2eeclient.SimpleContext.resolve(Ljavax/naming/Name;)Ljavax/naming/Context;(SimpleContext.java:39)
    at weblogic.j2eeclient.SimpleContext.lookup(Ljavax/naming/Name;)Ljava/lang/Object;(SimpleContext.java:57)
    at weblogic.j2eeclient.SimpleContext.lookup(Ljavax/naming/Name;)Ljava/lang/Object;(SimpleContext.java:57)
    at weblogic.j2eeclient.SimpleContext.lookup(Ljava/lang/String;)Ljava/lang/Object;(SimpleContext.java:62)
    at weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(Ljava/lang/String;)Ljava/lang/Object;(ReadOnlyCont
    extWrapper.java:45)
    at weblogic.jndi.internal.AbstractURLContext.lookup(Ljava/lang/String;)Ljava/lang/Object;(AbstractURLContext.jav
    a:130)
    at javax.naming.InitialContext.lookup(Ljava/lang/String;)Ljava/lang/Object;(InitialContext.java:347)
    at com.lb.equities.veda.tools.salesvault.jsp.ClientPageBean.initEJB()V(ClientPageBean.java:218)
    at com.lb.equities.veda.tools.salesvault.jsp.ClientPageBean.readObject(Ljava/io/ObjectInputStream;)V(ClientPageB
    ean.java:191)
    at java.lang.LangAccessImpl.readObject(Ljava/lang/Class;Ljava/lang/Object;Ljava/io/ObjectInputStream;)V(Unknown
    Source)
    at java.io.ObjectStreamClass.invokeReadObject(Ljava/lang/Object;Ljava/io/ObjectInputStream;)V(Unknown Source)
    at java.io.ObjectInputStream.readSerialData(Ljava/lang/Object;Ljava/io/ObjectStreamClass;)V(Unknown Source)
    at java.io.ObjectInputStream.readOrdinaryObject(Z)Ljava/lang/Object;(Unknown Source)
    at java.io.ObjectInputStream.readObject0(Z)Ljava/lang/Object;(Unknown Source)
    at java.io.ObjectInputStream.readObject()Ljava/lang/Object;(Unknown Source)
    at java.util.HashMap.readObject(Ljava/io/ObjectInputStream;)V(Unknown Source)
    at java.lang.LangAccessImpl.readObject(Ljava/lang/Class;Ljava/lang/Object;Ljava/io/ObjectInputStream;)V(Unknown
    Source)
    at java.io.ObjectStreamClass.invokeReadObject(Ljava/lang/Object;Ljava/io/ObjectInputStream;)V(Unknown Source)
    at java.io.ObjectInputStream.readSerialData(Ljava/lang/Object;Ljava/io/ObjectStreamClass;)V(Unknown Source)
    at java.io.ObjectInputStream.readOrdinaryObject(Z)Ljava/lang/Object;(Unknown Source)
    at java.io.ObjectInputStream.readObject0(Z)Ljava/lang/Object;(Unknown Source)
    at java.io.ObjectInputStream.defaultReadFields(Ljava/lang/Object;Ljava/io/ObjectStreamClass;)V(Unknown Source)
    at java.io.ObjectInputStream.readSerialData(Ljava/lang/Object;Ljava/io/ObjectStreamClass;)V(Unknown Source)
    at java.io.ObjectInputStream.readOrdinaryObject(Z)Ljava/lang/Object;(Unknown Source)
    at java.io.ObjectInputStream.readObject0(Z)Ljava/lang/Object;(Unknown Source)
    at java.io.ObjectInputStream.readObject()Ljava/lang/Object;(Unknown Source)
    at weblogic.common.internal.ChunkedObjectInputStream.readObject()Ljava/lang/Object;(ChunkedObjectInputStream.jav
    a:120)
    at weblogic.rjvm.MsgAbbrevInputStream.readObject(Ljava/lang/Class;)Ljava/lang/Object;(MsgAbbrevInputStream.java:
    121)
    at weblogic.cluster.replication.ReplicationManager_WLSkel.invoke(ILweblogic/rmi/spi/InboundRequest;Lweblogic/rmi
    /spi/OutboundResponse;Ljava/lang/Object;)Lweblogic/rmi/spi/OutboundResponse;(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(Lweblogic/rmi/extensions/server/RuntimeMethodDescriptor;Lweblogic
    /rmi/spi/InboundRequest;Lweblogic/rmi/spi/OutboundResponse;)V(BasicServerRef.java:492)
    Please help .
    Thanks in Advance.
    Edited by hforever at 03/04/2008 7:28 AM

  • JNDI Lookup in OC4J *AND* Tomcat 5 (not either/or)

    I've been struggling to get a web application to deploy and run correctly on Tomcat 5.x. I couldn't ADF to look up the Datasource I'd set up in the Tomcat configs. After reading this forum post:
    Problem deploying BC4J Toy Store app on Tomcat 4
    I was able to run my test app successfully on Tomcat by prepending 'java:comp/env/' to the JNDI name of my Datasource in bc4j.xcfg. Unfortunately, specifying the JNDI name in this way breaks the JNDI lookup in the embedded OC4J container. The impression I got from the above forum post was that OC4J should be able to look up the data source when the name is specified as either jndi/myDataSource or java:comp/env/jndi/myDataSource. I can only get it to work with the former.
    Is there a way to specify the JNDI name of a datasource in bc4j.xcfg such that both Tomcat AND the embedded OC4J container within JDeveloper will be able to look it up?
    Thanks,
    -Matt

    To answer my own question, a fairly straight-forward way of achieving this is to use two configurations for the application module: one for testing locally (the supplied configuration), and another one for deployment that is a copy of the first except for the JNDI name. I can switch between the configurations via the Databindings depending on whether I want to test locally or deploy to Tomcat.
    This is certainly a useable solution, but I'm bothered by the fact that I need to reference the JNDI name in two different ways. Shouldn't this be container-independent?
    -Matt

  • JNDI lookups on Tomcat 5.5 and Oracle XE

    Hi there!
    I'm using Oracle 10g XE and Tomcat 5.5.9. I just wanna get advice on how to do JNDI lookups. I know XE doesn't have native support for Java and servlets and I noticed the "jndi.jar" file is missing in XE, unlike in Oracle 10g EE. Is "jndi.jar" required for JNDI functionality on XE, or can I just use Tomcat's JNDI functionality to do the lookups? Any input would be appreciated. Tnx!
    Leslie

    Hmmm
    After some search and restart the oracle-xe and checking the "alert_XE.log" file I found some strange!
    Some lib files was missing (no link was made in the /usr/lib path)
    And the dbf file "/usr/lib/oracle/xe/oradata/XE/control.dbf" was missing......
    I remove the installation (rpm -e oracle-xe)
    and then reinstall it.
    Run the config and now I can access the host!
    It seams that the installation scripts is not perfect!
    I hope this will help some other.
    //TEW

  • NamingException and ClassCastException during jndi lookup

    Hi,
    I am trying to access the SAP database(MaxDb)using JNDI lookup in WebDynpro simple java project.
    But, during lookup I am getting the following error
    com.sap.engine.services.jndi.persistent.exceptions.NamingException: Exception during lookup operation of object with name : jdbc/VSLOOKUP , can not resolve object reference [Root exception is java.lang.ClassCastException]
         at com.sap.engine.services.jndi.implclient.ClientContext.lookup(ClientContext.java:469)
         at com.sap.engine.services.jndi.implclient.ClientContext.lookup(ClientContext.java:558)
         at javax.naming.InitialContext.lookup(InitialContext.java:347)
         at com.vitalspring.healthbenefits.dbaccess.DBAccessHelper.main(DBAccessHelper.java:51)
    Caused by: java.lang.ClassCastException
         at com.sap.engine.services.connector.ResourceObjectFactory.getObjectInstance(ResourceObjectFactory.java:149)
         at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:301)
         at com.sap.engine.services.jndi.implclient.ClientContext.lookup(ClientContext.java:466)
         ... 3 more
    Can anybody throw some light on it?
    Because, it's urgent for my project.
    I would appreciate any kind of help in this regard.
    Thanks & Regards,
    Rambabu Kancharla

    Hello Anilkumar,
    Sorry for delay in reply as I was on out of work and didn't get chance to check the SDN forums.
    I was able to do it in latest version sneak preview 11.
    I think the problem with the version.
    Thanks,
    Rambabu

  • JNDI lookup, uncheked bean and LoginModule

    Hi people!
    I have stateless session bean with uncheked method permissions.My application use custom login module. When I try to lookup it home interface the container invoke my login module. Why it do so? This is incorrect behaviour, I think. Why container authenticate any jndi-lookup? How can I to get out this behaviour?
    Thanks.

    There are two steps since your ejb client is not a managed bean.
    1) Define an ejb-local-ref in web.xml or a class-level @EJB in some managed class within
    the same .war.
    2) Lookup the dependency by ejb-ref-name or @EJB(name) relative to java:comp/env
    Our EJB FAQ has more detail :
    https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html#POJOLocalEJB

  • JNDI lookup for UserTransaction

              Hi all,
              in Weblogic, in a typical scenario, do a client provide exactly
              one JNDI lookup for the UserTransaction object (interface) or do
              the client have to provide a JNDI lookup for each transaction?
              In some EJB implementations, a JNDI lookup for UserTransaction
              returns always the same reference. For example, in JOnAS, you can
              have one static reference which is set when the client starts.
              Then, more threads can simultaneously use the same static
              UserTransaction reference without any conflict, since the
              implementation of UserTransaction recognizes, which thread invoked
              a particular method.
              In other words, can I make an assumption that two different JNDI
              lookups for UserTransaction returns different references or not?
              Thanks a lot,
              Marek Prochazka
              Distributed Systems Research Group
              Department of Software Engineering
              Charles University, Faculty of Mathematics and Physics
              Malostranske namesti 25, 118 00 Prague 1, Czech Republic
              phone: +420-2-2191 4236
              http://nenya.ms.mff.cuni.cz/thegroup/
              

    Actually, UserTransaction is a singleton and it's not a transaction. It's just
              very mis-named.
              It should be called UserTransactionManager or UserInterfaceToJTA.
              The actual transaction is javax.transaction.Transaction.
              -- Rob
              Cameron Purdy wrote:
              > Within a transaction, it is different instances? For example, if you call
              > it two times one right after another?
              >
              > A transaction is a unit of work. I understand why the transaction object
              > changes from transaction to transaction, since a single transaction object
              > (UserTransaction) represents exactly one transaction. Why would it be a
              > singleton? It is not a transaction manager.
              >
              > Peace,
              >
              > --
              > Cameron Purdy
              > Tangosol, Inc.
              > http://www.tangosol.com
              > +1.617.623.5782
              > WebLogic Consulting Available
              >
              > "Sarita" <[email protected]> wrote in message
              > news:[email protected]...
              > >
              > > Hi Priscilla--
              > >
              > > This is not the behavior that I'm seeing, and I'm perplexed.
              > > Every time I request a UserTransaction from JNDI, I receive a
              > > a different instance. Should the value immediately returned by JNDI be
              > the singleton
              > > instance? If not, then how do I retrieve the singleton instance?
              > >
              > > I would like a session bean to start a transaction, and then call a method
              > on another
              > > session bean (which should operate under the same transaction). How does
              > the second
              > > session bean grab the correct transaction object? Is that possible?
              > >
              > > Thanks In Advance,
              > > Sarita
              > >
              > > "Priscilla Fung" <[email protected]> wrote:
              > > >
              > > >Hi Marek,
              > > >
              > > >In Weblogic 6.0, JNDI lookup of UserTransaction returns a reference to
              > the
              > > >singleton
              > > >Transaction Manager instance, which is thread-safe and can be used from
              > > >multiple
              > > >threads for transaction demarcations etc.
              > > >
              > > >-- Priscilla Fung, BEA Systems, Inc.
              > > >
              > > >"Marek Prochazka" <[email protected]> wrote:
              > > >>
              > > >>Hi all,
              > > >>
              > > >>in Weblogic, in a typical scenario, do a client provide exactly
              > > >>one JNDI lookup for the UserTransaction object (interface) or do
              > > >>the client have to provide a JNDI lookup for each transaction?
              > > >>
              > > >>In some EJB implementations, a JNDI lookup for UserTransaction
              > > >>returns always the same reference. For example, in JOnAS, you can
              > > >>have one static reference which is set when the client starts.
              > > >>Then, more threads can simultaneously use the same static
              > > >>UserTransaction reference without any conflict, since the
              > > >>implementation of UserTransaction recognizes, which thread invoked
              > > >>a particular method.
              > > >>
              > > >>In other words, can I make an assumption that two different JNDI
              > > >>lookups for UserTransaction returns different references or not?
              > > >>
              > > >>Thanks a lot,
              > > >>Marek Prochazka
              > > >>--------------------------------------------------------------
              > > >> Distributed Systems Research Group
              > > >> Department of Software Engineering
              > > >> Charles University, Faculty of Mathematics and Physics
              > > >> Malostranske namesti 25, 118 00 Prague 1, Czech Republic
              > > >> phone: +420-2-2191 4236
              > > >> http://nenya.ms.mff.cuni.cz/thegroup/
              > > >>--------------------------------------------------------------
              > > >>
              > > >
              > >
              

Maybe you are looking for

  • IPhone 5 - Verizon - Problems and Complaints

    Dear Apple, First I'd like to say how much I love all previous iPhones.  All updates made sense and worked perfectly.  Nothing was released before it was ready.   This new iPhone doesn't seem to work as I would have expected based on having owned the

  • Please solve this error for me

    This program gives an error as follows <----------------------------------------------------------------------> H:\Semester1\Java\Assignment 5\RandomLetterApplet.java:96: cannot resolve symbol symbol : method toString (char) location: class java.lang

  • How to convert HTML to PDF

    - runs on Linux, 2.4.24 Kernel. - We would like to be able convert the HTML report into a PDF file. - Ideally we would like to use open source code for the PDF generation We would like to be able to include both Text and Bitmaps in the PDF output Tha

  • Odd Behaviors With SuperDrive

    Recently, I tried to burn a DL DVD+R disc and surprisingly, was unable to even start the burning process. Ive used Toast10 and tried Disco to burn the disc but every time, it would get stuck at the Preparing Disc phase. The drive would spin the DL DV

  • Solaris Bandwidth Manager

    Hi every one. I just Installed the Solaris OS 5.10 10/08 on a new Dell Vostro 200. I downloaded the Solaris Bandwidth Manager Documentations but can't find the software itself in solaris. Does the software come bundled in solaris 10 or does one get i