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.

Similar Messages

  • 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

  • Looking for tips on a OC4J/JNDI lookup problem

    Hello All,
    I am running into a situation where a user I have setup in Oracle Enterprise Manager 10G Instance Level Security is not able to access our JNDI resources. We have tried providing all the roles(including administrators) to this user, but to no success. For some reason it works in standalone though.
    Our exception is fired when deploying the application and the spring configuration tells the app to fetch the jms connection factory from JNDI.
    Caused by: javax.naming.NoPermissionException: Not allowed to look up jms/ConnectionFactory, check the namespace-access tag setting in orion-application.xml for details
    +     at com.evermind.server.rmi.RMIClientConnection.handleLookupResponse(RMIClientConnection.java:873)+
    +     at com.evermind.server.rmi.RMIClientConnection.handleOrmiCommandResponse(RMIClientConnection.java:337)+
    +     at com.evermind.server.rmi.RMIClientConnection.dispatchResponse(RMIClientConnection.java:296)+
    +     at com.evermind.server.rmi.RMIClientConnection.processReceivedCommand(RMIClientConnection.java:278)+
    +     at com.evermind.server.rmi.RMIConnection.handleCommand(RMIConnection.java:152)+
    +     at com.evermind.server.rmi.RMIConnection.listenForOrmiCommands(RMIConnection.java:127)+
    +     at com.evermind.server.rmi.RMIConnection.run(RMIConnection.java:107)+
    +     at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)+
    +     at java.lang.Thread.run(Thread.java:595)+
    +     at com.evermind.server.rmi.RMICall.warningExceptionOriginatesFromTheRemoteServer(RMICall.java:109)+
    +     at com.evermind.server.rmi.RMICall.throwRecordedException(RMICall.java:91)+
    +     at com.evermind.server.rmi.RMIClientConnection.waitForJndiResponse(RMIClientConnection.java:425)+
    +     at com.evermind.server.rmi.RMIClientConnection.lookup(RMIClientConnection.java:233)+
    +     at com.evermind.server.rmi.RMIClient.lookup(RMIClient.java:302)+
    +     at com.evermind.server.rmi.RMIClientContext.lookup(RMIClientContext.java:56)+
    +     ... 43 more+
    I wonder if there is a specific role that OC4J is looking for to allow the app to use JNDI? One thread I read earlier mentioned granting the user RMI permission. Any tips on where this could be configured?
    Our namespace section of the orion application xml file is below...
         <namespace-access>
              <read-access>
                   <namespace-resource root="">
                        <security-role-mapping name="&lt;jndi-user-role&gt;">
                             <group name="administrators" />
                        </security-role-mapping>
                   </namespace-resource>
              </read-access>
              <write-access>
                   <namespace-resource root="">
                        <security-role-mapping name="&lt;jndi-user-role&gt;">
                             <group name="administrators" />
                        </security-role-mapping>
                   </namespace-resource>
              </write-access>
         </namespace-access>
    Any thoughts or recommendations for isolating and troubleshooting the problem would be highly appreciated.
    Many Thanks in Advance Guys!

    What Mylenium said. Although, perhaps with Forge Freeform and a huge amount of work, you might be able to fake it.

  • OC4J JNDI lookup problem

    I'm developing a simple struts app in JDeveloper where the model component connects to an Oracle database. The webapp works fine when I deploy it... I just want to get it running locally in the embedded OC4J server. I get this stack trace error:
    javax.naming.NameNotFoundException: java:/comp/env not found
    at com.evermind.server.rmi.RMIContext.lookup(RMIContext.java:164)
    at com.evermind.server.ApplicationContext.lookup(ApplicationContext.java:333)
    at com.evermind.server.ApplicationContext.lookup(ApplicationContext.java:120)
    at javax.naming.InitialContext.lookup(InitialContext.java:347)
    at lsqtms.LoginModel.checkLoginAgainstDB(LoginModel.java:34)
    at lsqtms.LoginAction.execute(LoginAction.java:45)
    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
    at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:649)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
    at java.lang.Thread.run(Thread.java:534)
    Here is my code to access this connection pool:
    Context initContext = new InitialContext();
    Context envContext = (Context) initContext.lookup("java:/comp/env"); //error occurs here
    javax.sql.DataSource ds = (javax.sql.DataSource) envContext.lookup("Oracle");
    Connection conn = ds.getConnection();     // retreive db connection from pool     
    I've tried to edit the OC4J preferences for the DataSource and JNDI and data-sources.xml... no luck...
    I read the OC4J article on datasources and I'm not really sure what I'm doing - I apologize for being a "newbie." How can I fix this so that I can write and debug code locally.
    Thanks
    Doug

    To web.xml add
    <resource-ref>
      <res-ref-name>jdbc/OracleDS</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
    </resource-ref>Obtaing Connection with
    InitialContext initialContext = new InitialContext();
        javax.sql.DataSource ds = (javax.sql.DataSource)initialContext.lookup("java:comp/env/jdbc/OracleDS");
    java.sql.Connection conn = ds.getConnection();

  • 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.

  • 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

  • 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

  • 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 lookup name in a standalone oc4j instance

    Hi,
    Could you please let me know how to create a JNDI lookup name for a database in a stanalone OC4j Instance?
    Both OC4J and oracle 9i database are in the same server.
    Thanks in advance,
    Sukonya

    Hi,
    I have the oracle 9i database as well as the oc4j instance in my local machine.I am trying to deploy a J2ee Application on the OC4j instance,using eclipse IDE.I have not created any connection pool or datasource in the oc4j instance but after i build the application I see that the connection pool and datasource instance have been created in the OC4j instance.
    following are the contents of the build.xml file(for the ant build tool)
    <?xml version="1.0" encoding="UTF-8" ?>
    - <project name="TicketLoggingSystem" default="bind-web-app" basedir="../">
    <property name="app.server" value="D:/oc4j/j2ee/home" />
    <property name="dest.dir" value="${basedir}/dest" />
    <property name="war.file" value="${dest.dir}/TicketLoggingSystem.war" />
    <property name="ear.file" value="${dest.dir}/TicketLoggingSystem.ear" />
    <property name="web.inf" value="${basedir}/WEB-INF" />
    <property name="web.classes" value="${dest.dir}/classes" />
    <property name="app.xml" value="${basedir}/application.xml" />
    <property name="src.dir" value="${basedir}/src" />
    <property name="oc4j.host" value="localhost" />
    <property name="oc4j.admin.port" value="23791" />
    <property name="oracle.home" value="D:/oc4j" />
    <property name="j2ee.home" value="${oracle.home}/j2ee/home" />
    <property name="oc4j.admin.username" value="oc4jadmin" />
    <property name="oc4j.admin.password" value="welcome" />
    <property name="oc4j.ormi" value="ormi://${oc4j.host}:${oc4j.admin.port}" />
    <property name="app.name" value="TicketLoggingSystem" />
    <property name="jdbc.url" value="jdbc:oracle:thin:@localhost:1521:80" />
    <property name="jdbc.username" value="scott" />
    <property name="jdbc.password" value="tiger" />
    <property name="connection.driver" value="oracle.jdbc.driver.OracleDriver" />
    <property name="connection.datasource" value="oracle.jdbc.pool.OracleDataSource" />
    <property name="xa.location" value="jdbc/xa/MpsiDS" />
    - <!-- Delete dest folder
    -->
    - <target name="init">
    <delete dir="${dest.dir}" includeemptydirs="true" />
    <mkdir dir="${dest.dir}" />
    <mkdir dir="${web.classes}" />
    </target>
    - <!-- Compile all Java files
    -->
    - <target name="wscompile">
    - <javac srcdir="${src.dir}" destdir="${web.classes}" deprecation="on" debug="on">
    <exclude name="**/*.properties,**/*.xml" />
    - <classpath>
    <fileset dir="${web.inf}/lib" includes="*.jar" />
    <fileset dir="${app.server}/lib" includes="servlet.jar" />
    </classpath>
    </javac>
    </target>
    - <!-- Build Web archive file
    -->
    - <target name="buildWar" depends="init,wscompile">
    - <war destfile="${war.file}" webxml="${web.inf}/web.xml">
    - <fileset dir="${basedir}">
    <include name="content*/**" />
    </fileset>
    <webinf dir="${web.inf}" includes="*.xml,*.tld" excludes="web.xml" />
    <classes dir="${web.inf}/classes" />
    <lib dir="${web.inf}/lib" includes="*.jar" />
    </war>
    </target>
    - <!-- Build Enterprsie Archive
    -->
    - <target name="buildEar" depends="buildWar">
    - <ear destfile="${ear.file}" appxml="${app.xml}">
    <fileset dir="${dest.dir}" includes="*.war" />
    </ear>
    </target>
    - <!-- Checking availability of oc4j
    -->
    - <target name="check-oc4j-available">
    <echo message="------> Checking to see if OC4J is started ." />
    <echo message="[checking oc4j on machine =${oc4j.host}]" />
    <echo message="[port=${oc4j.admin.port}]" />
    - <condition property="oc4j.started">
    <socket server="${oc4j.host}" port="${oc4j.admin.port}" />
    </condition>
    </target>
    - <!-- Remove data source
    -->
    - <target name="remove-data-source" depends="check-oc4j-available" if="oc4j.started">
    <echo message="Removing DataSource" />
    - <java jar="${j2ee.home}/admin.jar" fork="true">
    <arg value="${oc4j.ormi}" />
    <arg value="${oc4j.admin.username}" />
    <arg value="${oc4j.admin.password}" />
    <arg value="-application" />
    <arg value="${app.name}" />
    <arg value="-removeDataSource" />
    <arg value="-location" />
    <arg value="jdbc/TicketLoggingSystem" />
    </java>
    <echo message="Removed DataSource Successfully" />
    </target>
    - <!-- Undeploy
    -->
    - <target name="undeploy" depends="remove-data-source" description="Undeploying the application" if="oc4j.started">
    <echo message="Undeploying the Application ${app.name}" />
    - <java jar="${j2ee.home}/admin.jar" fork="true">
    <arg value="${oc4j.ormi}" />
    <arg value="${oc4j.admin.username}" />
    <arg value="${oc4j.admin.password}" />
    <arg value="-undeploy" />
    <arg value="${app.name}" />
    </java>
    <echo message="Undeploying the Application ${app.name} is Successful" />
    </target>
    - <!-- Deploy
    -->
    - <target name="deploy" depends="undeploy,buildEar" if="oc4j.started">
    <echo message="Deploying the Application ${app.name}" />
    - <java jar="${j2ee.home}/admin.jar" fork="true">
    <arg value="${oc4j.ormi}" />
    <arg value="${oc4j.admin.username}" />
    <arg value="${oc4j.admin.password}" />
    <arg value="-deploy" />
    <arg value="-file" />
    <arg value="${ear.file}" />
    <arg value="-deploymentName" />
    <arg value="${app.name}" />
    </java>
    <echo message="Deploying the Application ${app.name} is Successful" />
    </target>
    - <!-- Create data source
    -->
    - <target name="create-data-source" depends="check-oc4j-available" if="oc4j.started">
    <echo message="Creating DataSource for Application ${app.name}" />
    - <java jar="${j2ee.home}/admin.jar" fork="true">
    <arg value="${oc4j.ormi}" />
    <arg value="${oc4j.admin.username}" />
    <arg value="${oc4j.admin.password}" />
    <arg value="-application" />
    <arg value="${app.name}" />
    <arg value="-installDataSource" />
    <arg value="-jar" />
    <arg value="${oracle.home}/jdbc/lib/ojdbc14dms.jar" />
    <arg value="-url" />
    <arg value="${jdbc.url}" />
    <arg value="-connectionDriver" />
    <arg value="${connection.driver}" />
    <arg value="-location" />
    <arg value="jdbc/TicketLoggingSystem" />
    <arg value="-username" />
    <arg value="${jdbc.username}" />
    <arg value="-password" />
    <arg value="${jdbc.password}" />
    <arg value="-className" />
    <arg value="${connection.datasource}" />
    </java>
    <echo message="Created DataSource Successfully for Application ${app.name}" />
    </target>
    - <!-- Binding web-app
    -->
    - <target name="bind-web-app" depends="deploy,create-data-source" if="oc4j.started">
    <echo message="executing bind web app" />
    - <java jar="${j2ee.home}/admin.jar" fork="true">
    <arg value="${oc4j.ormi}" />
    <arg value="${oc4j.admin.username}" />
    <arg value="${oc4j.admin.password}" />
    <arg value="-bindWebApp" />
    <arg value="${app.name}" />
    - <!-- app deployname
    -->
    <arg value="${app.name}" />
    - <!-- web module name
    -->
    <arg value="default-web-site" />
    - <!-- web site name
    -->
    <arg value="/${app.name}" />
    - <!-- context root
    -->
    </java>
    <echo message="Access the application using: http://${oc4j.host}:8888/${app.name}" />
    </target>
    </project>
    Following are the contents of Oc4J home->services->jdbc resources:
    Datasource:
    Name jdbc/TicketLoggingSystem
    Application TicketLoggingSystem
    JNDI Location jdbc/TicketLoggingSystem
    Connection Pool
    Managed by OC4j
    Test
    when i click the datasource name,I see that its type is Native datasource with no related connection pool.
    Whereas for the default datasource oracleDS,
    Type     Managed Data Source
    Connection Pool     Example Connection Pool
    However on deployment a connection pool is also created along with the datasource
    Name jdbc/TicketLoggingSystem_connectionPool
    Application TicketLoggingSystem
    ConnectionFactory class : oracle.jdbc.pool.OracleDataSource
    Do we need to bind this connection pool to our datasource?If yes how is it done.And if that is not required,why is this connection pool created?Are the datasource and connection pool already bound to each other?
    Also when I test either the datasource or connection pool,it says
    Confirmation     
    Connection to "jdbc/TicketLoggingSystem_connectionPool" established successfully
    or
    Connection to "jdbc/TicketLoggingSystem" established successfully.
    and displays both the connection pool and datasource details together for both the tests.
    In my java code,while trying to establish connection to the database what should I mention in lookup i.e,
    InitialContext context = new InitialContext();
    DataSource dataSource = (DataSource) context.lookup("     jdbc/TicketLoggingSystem or      jdbc/TicketLoggingSystem_connectionPool");
    con = dataSource.getConnection();
    Sorry if I am sounding novice.Thanks a lot in advance,
    Sukanya

  • How to write the jndi lookup for ejb using oc4j server in jdeveloper

    Hi All,
    i am new to the JDeveloper. i want to develop the session bean in JDeveloper using the OC4J server. how to write the jndi lookup in cllient. what are the xml files need to deploy the application. where can i mention the JNDI name in xml file. so please provide the information as soon as possible.
    regards
    ram

    There is quite in-depth information in the Enterprise JavaBeans Developer's Guide.
    Section 2 (Understanding EJB Application Development) explains the xml files needed and Section 29 (Accessing an EJB from a Client) explains how to do a JNDI lookup.
    Hope this helps.

  • Problem using JDBC (JNDI) DataSource and data-sources.xml w/ OC4J

    I have a JClient application developed in JDev X. It works fine when using a JDBC URL for the connection (which then writes the connection into the BC4J.xcfg files, one for each application module). However, I would like the app to retrieve the data source from the server's data-sources.xml file. However, when, on the configurations tab of the application module I set the connection type to JDBC DataSource, and give it the JNDI name, it does not work, either with the embedded OC4J or the stand-alone OC4J. Any suggestions???
    In the stand alone OC4J I verified that the data source exists (using java -jar admin.jar ormi://nemethzoltan3 admin welcome -application adatklinika -testDataSource -location jdbc/adatklinikaCoreDS) ... so the data source is defined in the data-sources.xml. Of course the error I get is JBO-30003.
    If I just try to "test" the data source in Jdeveloper (using the context menu of the app module, and setting it to use the adatklinikaCoreDS) I get a JNDI error: unable to lookup data source and at level 3 a "javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial". I checked, the data source is defined under tools->embedded OC4J properties->data sources.
    If I try to run the main form, simply nothing happens.
    Please help!!!

    Ok, figured out why running from jdeveloper wasn't working: the embedded OC4J server wasn't started (start it by running an html page from your project or something...and make sure you don't have a stand-alone oc4j running). AND more importantly it didn't have the library "embedded oc4j client" library included (project properties -> profiles -> development -> libraries)...which is needed for whatever reason.
    Now to try and get it working with the stand-alone OC4J...

Maybe you are looking for

  • Haven't been able to use Safari Browser for months, it keeps crashing seconds after I launch it

    I haven't been able to use my Safari Browser for months. Each time I launch it, it crashes.

  • Can I restrict itunes to just one user account in windows 7

    Hi there, I have just bought an iPhone and was wondering if it possible to set up two user accounts on my PC that are entirely separate from one another (OS Windows 7). The reason being is that I want to be able to use my iphone with iTunes on one ac

  • Status of Book Order

    I created a book and sent the order Sunday. The status of the order has been "printing" since that time (2 days). Is that normal? There is no FedEx tracking nr shown yet.

  • Oracle 9i client and COM+ transaction = error

    Hello, I'm using Oracle 9i client with Microsoft COM+/ADO/VB 6.0 sp5 and MSDAORA provider. Trying Oracle 9i client on Windows 2000 Server or Windows 2003 Server or even my own dev. Pc (XP) results in error: " -2147168229 Cannot connect to the transac

  • Change iCloud language

    Every mail I recive from iCloud (registration new device, find my iPhone notification, etc.) it's in japanese language... I have tried to change language in iCloud from the site icloud.com but there it is correct (italian). What I can do? thx