Jndi.properties for WAR trouble

Hi All.
To access a remote enterprise bean, I have to populate the required JNDI properties in my web-tier code, when creating the context.
Trouble how to do this using jndi.properties file ? When I append path of file to CLASSPATH obviously it works (tested using simple session client) but when I deploy my war – properties file is invisible for my delegate. So question : How to include jndi.properties file in classpath for that WAR, or where I have to place it ?

InitialContext takes care of that already.
Do you use InitialContext to connect to your own components in the same container too? If so, specify the content of jndi.properties explicitely.
--olaf                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • Why ican't I find jndi.properties for TopicConnectionFactory lookup?

    I have a problem with IPlanetMessageQueue3.0 . Why i can't find jndi.properties for TopicConnectionFactory lookup ? Like this Context ctx = new
    InitialContext();TopicConnectionFactory tcf = (TopicConnectionFactory)ctx.lookup("TopicConnectionFactory"); What is value of
    Context.INITIAL_CONTEXT_FACTORY and Context.PROVIDER_URL ( I home jmqbroker://localhost:7676 ) for default configuration ?

    Have you used the object manager to create the ConnectionFactory object(s) in the JNDI store? If not, you need to use the tool to create the
    object(s) and store them in the JNDI server before you may use them.
    There is a simple help for this in the IPlanetMessageQueue3.0 installation bin directory. In the MQ installation bin directory, type the following
    command:
    imqobjmgr -H
    you will get examples on how to create JNDI objects and the values that you need to set up JNDI Context.

  • JNDI properties for JCAPS

    Hi I have installed the Logical Host of JCAPS .Also I can explore the different
    MBeans of it using JConsole.
    If I want to access those MBeans programmatically what would be the
    JNDI properties ?
    For examplke if I want to access JBoss 3.2.5 MBeans My sample code would be something like ....
    InitialContext ctx = null;
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
    env.put(Context.PROVIDER_URL, "jnp://localhost:1099");
    env.put(Context.URL_PKG_PREFIXES,"org.jboss.naming:org.jnp.interfaces");
    ctx = new InitialContext(env);
    So what would be my INITIAL_CONTEXT_FACTORY,PROVIDER_URL,URL_PKG_PREFIXES etc
    in this case ?
    If somebody has any idea please reply . When I was working with JBoss 3.2.5, I got all the related information from JBoss Administration Guide .
    Does JCAPS has any specific doc which can help me in this regard ?
    Regards,
    Ayan

    I use the following properties to connect to the jndi tree.
            env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.cosnaming.CNCtxFactory");
            env.put("java.naming.provider.url", "iiop://localhost:18002");But!
    I don't see any of my jcd's when I walk this tree.
    Can anyone tell me why? I'm expecting to see a list of jcds.
    When I look into the sun-ejb-jar.xml file, I see that I should be able to lookup the deployed service with the following name;
    ic.lookup("java:comp/env/ejb/local/stc/testHarness3Deployment1/deployedServices/CMap1_Collaboration_11")Are my assumptions correct, or is my jndi knowledge faulty?

  • Jndi properties for sasl, external mechanism

    We're having trouble connecting to an LDAP server over SSL. We have created the client/trust keystores, but do not know what the jndi properties should be. We want the authentication to come from the certificate not simple name/password. Do we leave principals, credentials and authorizationId with null values?

    If this to perform external authentication against Active Directory, have a look at the post titled "JNDI, Active Directory & Authentication (part 4) (SASL EXTERNAL)" available at
    http://forum.java.sun.com/thread.jspa?threadID=641047&tstart=0
    Good luck.

  • Sample weblogic jndi.properties for 7.0...

    I am looking for 2 things:
    1. what weblogic jars are required on the client to make a jndi lookup ?
    ( jndi specific jars )
    2. A sample jndi.properties file for weblogic.
    Thanks
    -- padhu

    I use the following properties to connect to the jndi tree.
            env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.cosnaming.CNCtxFactory");
            env.put("java.naming.provider.url", "iiop://localhost:18002");But!
    I don't see any of my jcd's when I walk this tree.
    Can anyone tell me why? I'm expecting to see a list of jcds.
    When I look into the sun-ejb-jar.xml file, I see that I should be able to lookup the deployed service with the following name;
    ic.lookup("java:comp/env/ejb/local/stc/testHarness3Deployment1/deployedServices/CMap1_Collaboration_11")Are my assumptions correct, or is my jndi knowledge faulty?

  • Jndi.properties usage

    Hi,
    I've developed an EJB application and a WAR to access it with JBoss which uses the jndi.properties to lookup the "java.naming.provider.url". Everything works fine for now but I don't like including the jndi.properties file inside the War.
    For ease of use I'd like to have as an extra deployment step so you deploy both the WAR and the jndi.properties file so I can change what server it looks at for the EJBs.
    I'm sure this is simple to do through an XML file but I can't seem to find much online about how to go about it.
    Could someone point me in the right direction?
    Cheers,
    Joe.

    Sorry, that was badly worded.
    Basically I want to be able to do something similar to this deployment:
    jboss/server/<instance>/deploy/myWebApp.war
    jboss/server/<instance>/deploy/jndi.properties (for webapp)
    So I can change the server listed in the jndi.properties easily.
    What I have proposed above is obviously wrong as only XML and compressed files can exist in the deploy directory. This leads me to believe that there is an XML solution similar to the way DataSources can be deployed in the JBoss deploy directory.
    At the moment I'm thinking about putting a homemade XML file somewhere are reading it off disk with the jndi information. I want to know if there is a more standard way of doing this.
    Thanks for your response,
    Joe.

  • Jndi.properties

    Hi Folks!
    First of all, please excuse my bad english ;-)
    Our problem:
    We have a Struts based web application running under OC4J 10g. We want to access our EJB's which are deployed on an other OC4J container. To do this, we have put our jndi.properties file in /WEB-INF/classes , but then we try to retrieve the initial context, the file is not loaded (this works this Tomcat etc.). The same, then we put this file into /WEB-INF/lib. After this, we monitored there the files has been searched: only at $J2EE_HOME/applib. Why??? Is there a way how we can say there to search for this file? We will pack the jndi.properties into the WAR file.
    Any suggestions?
    Thanks!

    Halil-Cem,
    Please excuse me for posting two years late, but I was searching the forum archives for "jndi.properties" and came across your post.
    You asked:
    Is there a way how we can say there to search for this file?Yes, through the "orion-web.xml" file. Mine has the following entry:
    &lt;!-- Uncomment this element to control web application class loader behavior.
        <web-app-class-loader search-local-classes-first="true"  include-war-manifest-class-path="true" />
    -->Hope it helps.
    Good Luck,
    Avi.

  • What are the XFA properties for a drop-down list?

    I am having trouble distinguishing between the "Text" and "Value" for a drop down list.
    I have a data drop-down list that is being populated by a database at runtime. I am using the "addItem" event while looping though the recordset. The "addItem" event takes 2 parameters:
    param1: A valid string representing the value to display in the field.
    param2: (Optional) A valid string representing the new items bound value. If empty, the default value is an empty string.
    What is the corresponding XFA properties for param1 and param2?
    If I want to reference "param2" somewhere else in the form, is it dropDownList.rawValue? is it dropDownList.value?

    reviewed the sample.zip form and xml file. The XML format is different from my file. Your file has one field named "item" with 3 records. <br /><data> <br />- <field> <br />  <item>1</item> <br />  <item>2</item> <br />  <item>3</item> <br />  </field> <br />  </data> <br /><br />My XML file has multiple fields and records. I need to populate the dropdown list with 1 field from XML file/DataConnection and bind the remainder of the DataConnection fields to the form fields. How can I achieve above with the sample example? <br />This is a portion of my xml file. <br /><?xml version = '1.0'?> <br /><ROWSET> <br />   <ROW num="1"> <br />      <ORG_OPER_NAME> U. S. OIL AND GAS, INC.</ORG_OPER_NAME> <br />      <ORGANIZATION_ID>6285</ORGANIZATION_ID> <br />      <OPERATION_TYPE_CODE>01</OPERATION_TYPE_CODE> <br />      <ORGOP_LINE_ID>1</ORGOP_LINE_ID> <br />      <ADDRESS1>P. O. BOX 9158</ADDRESS1> <br />      <CITY>HOUMA</CITY> <br />      <STATE>LA</STATE> <br />      <ZIP>703610000</ZIP> <br />      <CONTACT_NAME>ANTHONY P. AUTHEMENT</CONTACT_NAME> <br />      <PHONE_NUM>9858764651</PHONE_NUM> <br />   </ROW> <br />   <ROW num="2"> <br />      <ORG_OPER_NAME>103 TRUCK STOP, INC. </ORG_OPER_NAME> <br />      <ORGANIZATION_ID>101152</ORGANIZATION_ID> <br />      <OPERATION_TYPE_CODE>13</OPERATION_TYPE_CODE> <br />      <ORGOP_LINE_ID>1</ORGOP_LINE_ID> <br />      <ADDRESS1>4007 WHITE'S FERRY RD. </ADDRESS1> <br />      <CITY>WEST MONROE</CITY> <br />      <STATE>LA</STATE> <br />      <ZIP>712910000</ZIP> <br />      <CONTACT_NAME>103 TRUCK STOP, INC. </CONTACT_NAME> <br />      <PHONE_NUM>3183966200</PHONE_NUM> <br />   </ROW> <br />   <ROW num="3"> <br />      <ORG_OPER_NAME>3 S COMPANY</ORG_OPER_NAME> <br />      <ORGANIZATION_ID>5699</ORGANIZATION_ID> <br />      <OPERATION_TYPE_CODE>01</OPERATION_TYPE_CODE> <br />      <ORGOP_LINE_ID>1</ORGOP_LINE_ID> <br />      <ADDRESS1>RR #2, BOX 99</ADDRESS1> <br />      <CITY>EUREKA SPRINGS</CITY> <br />      <STATE>AR</STATE> <br />      <ZIP>726320000</ZIP> <br />      <CONTACT_NAME>NO CONTACT GIVEN</CONTACT_NAME> <br />   </ROW> <br />   <ROW num="4"> <br />      <ORG_OPER_NAME>3-T EXPLORATION, INC.</ORG_OPER_NAME> <br />      <ORGANIZATION_ID>6847</ORGANIZATION_ID> <br />      <OPERATION_TYPE_CODE>01</OPERATION_TYPE_CODE> <br />      <ORGOP_LINE_ID>1</ORGOP_LINE_ID> <br />      <ADDRESS1>BANKONE TOWER</ADDRESS1> <br />      <CITY>WICHITA FALLS</CITY> <br />      <STATE>TX</STATE> <br />      <ZIP>763082825</ZIP> <br />      <CONTACT_NAME>NO CONTACT GIVEN</CONTACT_NAME> <br />   </ROW> <br />   <ROW num="5"> <br />      <ORG_OPER_NAME>3-T OIL CO. INC.</ORG_OPER_NAME> <br />      <ORGANIZATION_ID>6395</ORGANIZATION_ID> <br />      <OPERATION_TYPE_CODE>01</OPERATION_TYPE_CODE> <br />      <ORGOP_LINE_ID>1</ORGOP_LINE_ID> <br />      <ADDRESS1>RT. 1, BOX 81</ADDRESS1> <br />      <CITY>WEIRGATE</CITY> <br />      <STATE>TX</STATE> <br />      <ZIP>759770000</ZIP> <br />      <CONTACT_NAME>NO CONTACT GIVEN</CONTACT_NAME> <br />   </ROW> <br /></ROWSET>

  • Problem in Jndi lookup for  ITaskService

    HI,
    I am trying to initiate oracle bpm Human task programatically by using Java remotely.
    for this I am using following JNDI lookup for ITaskService.
    Hashtable ht = new
                  Hashtable<IWorkflowServiceClientConstants.CONNECTION_PROPERTY,java.lang.String>();
              ht.put(IWorkflowServiceClientConstants.CONNECTION_PROPERTY.EJB_INITIAL_CONTEXT_FACTORY, 
                     "weblogic.jndi.WLInitialContextFactory");
              ht.put(IWorkflowServiceClientConstants.CONNECTION_PROPERTY.EJB_PROVIDER_URL, "t3://localhost:7001");
              ht.put(IWorkflowServiceClientConstants.CONNECTION_PROPERTY.EJB_SECURITY_PRINCIPAL, "username"); 
              ht.put(IWorkflowServiceClientConstants.CONNECTION_PROPERTY.EJB_SECURITY_CREDENTIALS, "password");
              Context ctx  = new InitialContext(ht);
    ITaskService taskService = (ITaskQueryService)ctx.lookup("ejb/bpel/services/workflow/TaskServiceBean");
    taskService.initiateTask(task);
    It the right approach or not.
    Please help.

    To access human workflow api remotely try using the following code :
    Map properties = new HashMap();
      properties.put(IWorkflowServiceClientConstants.CONNECTION_PROPERTY.EJB_PROVIDER_URL, "t3://localhost:8001");
      properties.put(IWorkflowServiceClientConstants.CONNECTION_PROPERTY.EJB_SECURITY_CREDENTIALS, "welcome1");
      properties.put(IWorkflowServiceClientConstants.CONNECTION_PROPERTY.EJB_SECURITY_PRINCIPAL, "weblogic");
    IWorkflowServiceClient wfSvcClient =
      WorkflowServiceClientFactory.getWorkflowServiceClient(WorkflowServiceClientFactory.REMOTE_CLIENT, properties, null);
      //Get the task query service
      ITaskQueryService querySvc = wfSvcClient.getTaskQueryService();
      //Login as weblogic
      IWorkflowContext ctx = querySvc.authenticate("weblogic","welcome1".toCharArray(),null);
    after getting the workflow context, you can call any method like query task list. perform actions etc. just see the api doc.
    Regards,
    Anshul

  • Application specific key-value pairs in jndi.properties

    Hello,
    Can I specify my application specific key-value pair in jndi.properties?
    I tried something like this
    java.naming.factory.initial=.jndi.WLInitialContextFactory
    java.naming.provider.url=t3://localhost:7001
    myVar=myVal
    When i tried looking up "myVar" from my client program, I got an error.
    The other parameters like weblogic.jndi.WLInitialContextFactory are picked up.
    Anyhelp will be appreciated
    Vasim

    We have a similar problem.
    We would like to configure our PROVIDER_URL for a specific web application - not
    for the entire server. Since the URL should be different in development, test
    and production environments, we would prefer to just set it in the deployment
    descriptor. And we have a lot of code that just uses
    ctx = new InitialContext();
    when looking up EJBs, queues etc.
    Actually, to take the problem one step further, it should be expected that later
    we will have EJB's deployed on different machines/clusters - so we will actually
    need specific urls for each EJB.
    Is there a good way to do this? Or will we have to custom-develop our own jndi
    configuration standard using application parameters to set which JNDI provider
    each EJB should be looked up with?
    Alternativaely, can we "import" the JNDI trees of the app server in the JNDI tree
    of the web servers?
    So, how should we go about this?
    Robert Patrick <[email protected]> wrote:
    Vasim wrote:
    Hi Robert,
    You are right. But The object "myVar" which I am trying to look upis not in
    the JNDI tree nor am I interesed in binding it . But my requirementis that
    I have one application specific variable which I am trying to lookup and I
    dont want to have a separare config file for this..and hence the question..So, put the properties you want in the jndi.properties file and load
    the properties
    file from your code by doing something like this:
    Properties props = new Properties();
    ClassLoader cl = Thread.currentThread().getContextClassLoader();
    if (cl == null)
    cl = System.getSystemClassLoader();
    InputStream is = cl.getResourceAsStream("jndi.properties");
    props.load(is);
    Personally, I would not use this file and would create an application-specific
    file
    or, as Daniel suggested, define your properties as a System property
    and use
    System.getProperty("myVar").
    btw, is jndi.properties only for those objects which are bound to jnditree?
    jndi.properties is only used for creating the JNDI InitialContext. The
    whole idea
    of this file is that in remote client code (without the jndi.properties
    file), you
    need to do something like this to tell the JNDI classes how to connect
    to the JNDI
    provider:
    Properties props = new Properties();
    props.put(Context.PROVIDER_URL, "t3://myservername:7001");
    props.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    InitialContext ctx = new InitialContext(props);
    but inside the server, you only need to do this because the server is
    the provider
    and already knows how to connect to itself:
    InitialContext ctx = new InitialContext();
    Therefore, the jndi.properties file allows you to externalize this property-setting
    code that sets up the properties to be passed to the InitialContext constructor
    so
    that the remote client code can now look exactly like the code inside
    the server.
    The InitialContext constructor will look for this jndi.properties file
    in your
    classpath and load it to get the necessary configuration information
    to determine
    how to connect to the JNDI provider.
    Hope this helps,
    Robert

  • What needs to be in my jndi.properties file to get oracle accessed by a jndi client

    I am trying to write a connection pool class that use jndi
    to locate the data base. I use "bindds" bind my OracleDataSource
    object with the name of 'test/jdbc/test'. I should then be able to do a lookup like: OracleDataSource ods =
    (OracleDataSource) ctx.lookup (test/jdbc/test)
    All Oracle code examples use (Context.INITIAL_CONTEXT_FACTORY,
    "com.sun.jndi.fscontext.RefFSContextFactory");
    Is this correct? And what other things should be in my jndi.properties file to access the naming service with comes with
    Oracle (Jserver)? For example to I need to include a Context.PROVIDER_URL value. I would think Oracle would have some
    standard way of accessing its own Naming service. Thanks David

    This implies that ODP.NET does NOT need to be installed on a client. However, I cannot find OraOPs9.dll on a machine with Client Release 9.2 installed. Should OraOps?.dll automatically come with a Client installation of 9.2 or higher?
    ODP.NET needs to be installed on the client. OraOps9.dll is part of ODP.NET, not the Oracle Client.
    Also, if an application is built with the 10g ODP.NET, can it be run from a machine with OraOps9.dll?
    If an application is built with 10g ODP.NET, it can be run with 9.2 ODP.NET as long as you do not use any 10g APIs. The new features in 10g ODP.NET are included in the doc and the ODP.NET FAQ for your reference.

  • JMS destination and queue in jndi.properties

    I am using activemq to create a very simple jms application.
    But there is a point I have not understand.The administered connection factory object that I use is org.activemq.jndi.ActiveMQInitialContextFactory which is the ActiveMq specific object. Do I have to do the same with the destination object?I read that Destination is also an administered object so I have to use an object of the ActiveMq? Specifically in the jndi properties where I define the queue property the value must be:
    1.an activeMq object
    2.a java class that implements the javax.jsm.Queue interface
    3.a physical name of another server?
    and in the code where I look up the destination object
    Destination destination = (Destination) jndiContext.lookup(queueProp);What exactly will be the queueProp? I would appreciate an example
    Thanking you in advance.

    I've read the documentation but I am afraid I miss some points.
    First of all I use the following code from an example in the net where the <b> activemq.jar is >/b> used and the jndi.properties is not used at all and the following code is working:package jms;
    import org.activemq.ActiveMQConnectionFactory;
    import javax.jms.Connection;
    import javax.jms.DeliveryMode;
    import javax.jms.Destination;
    import javax.jms.ExceptionListener;
    import javax.jms.JMSException;
    import javax.jms.Message;
    import javax.jms.MessageConsumer;
    import javax.jms.MessageProducer;
    import javax.jms.Session;
    import javax.jms.TextMessage;
    * Hello world!
    public class App {
        public static void main(String[] args) throws Exception {
            thread(new HelloWorldBroker(args), true);
            Thread.sleep(1000);
            thread(new HelloWorldProducer(), false);
            thread(new HelloWorldProducer(), false);
            thread(new HelloWorldConsumer(), false);
            Thread.sleep(1000);
            thread(new HelloWorldConsumer(), false);
                   Thread.sleep(1000);
            thread(new HelloWorldConsumer(), false);
            thread(new HelloWorldProducer(), false);
                    Thread.sleep(1000);
                 thread(new HelloWorldProducer(), false);
            thread(new HelloWorldConsumer(), false);
        public static void thread(Runnable runnable, boolean daemon) {
            Thread brokerThread = new Thread(runnable);
            brokerThread.setDaemon(daemon);
            brokerThread.start();
        public static class HelloWorldBroker implements Runnable {
            private final String[] args;
            public HelloWorldBroker(String[] args) {
                this.args = args;
            public void run() {
                org.activemq.broker.impl.Main.main(args);
        public static class HelloWorldProducer implements Runnable {
            public void run() {
                try {
                    // Create a ConnectionFactory
                    ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("tcp://localhost:61616");
                    // Create a Connection
                    Connection connection = connectionFactory.createConnection();
                    connection.start();
                    // Create a Session
                    Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
                    // Create the destination (Topic or Queue)
                    Destination destination = session.createQueue("TEST.FOO");
                    // Create a MessageProducer from the Session to the Topic or Queue
                    MessageProducer producer = session.createProducer(destination);
                    producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
                    // Create a messages
                    String text = "Hello world! From: " + Thread.currentThread().getName() + " : " + this.hashCode();
                    TextMessage message = session.createTextMessage(text);
                    // Tell the producer to send the message
                    System.out.println("Sent message: "+ message.hashCode() + " : " + Thread.currentThread().getName());
                    producer.send(message);
                    // Clean up
                    session.close();
                    connection.close();
                catch (Exception e) {
                    System.out.println("Caught: " + e);
                    e.printStackTrace();
        public static class HelloWorldConsumer implements Runnable, ExceptionListener {
            public void run() {
                try {
                    // Create a ConnectionFactory
                    ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("tcp://localhost:61616");
                    // Create a Connection
                    Connection connection = connectionFactory.createConnection();
                    connection.start();
                    connection.setExceptionListener(this);
                    // Create a Session
                    Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
                    // Create the destination (Topic or Queue)
                    Destination destination = session.createQueue("TEST.FOO");
                    // Create a MessageConsumer from the Session to the Topic or Queue
                    MessageConsumer consumer = session.createConsumer(destination);
                    // Wait for a message
                    Message message = consumer.receive(1000);
                    if (message instanceof TextMessage) {
                        TextMessage textMessage = (TextMessage) message;
                        String text = textMessage.getText();
                        System.out.println("Received: " + text);
                    } else {
                        System.out.println("Received: " + message);
                    consumer.close();
                    session.close();
                    connection.close();
                } catch (Exception e) {
                    System.out.println("Caught: " + e);
                    e.printStackTrace();
            public synchronized void onException(JMSException ex) {
                System.out.println("JMS Exception occured.  Shutting down client.");
    }But I want to make it work with jndi.properties.
    So I am trying to use a code where connectionFactory and Destination are loaded from the jndi properties.After experimenting with code
    the following is working
         try {
                   connectionFactory = (ConnectionFactory) jndiContext.lookup("connectionFactory");               
                  Destination destination = (Destination) jndiContext.lookup("QUEUE/MYQUEUE");        
              Connection connection = connectionFactory.createConnection();
              Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);if only I go to the activeqm/bin folder and open the broker.If I did that in the previous code(with no jndi prop)
    there was an exception that was saying that the port was already used.So I do not understand why in the one case opening broker is necessary for the connection and on the other hand it causes a problem.
    Moreover in the case that I invoke broker from bin folder. In this case I would like to ask a question.The activemq.xml is necessary? If yes it is there where we define the queue?
    If not where else apart from the jndi.properties do we define queue?
    Please if is possible provide me with an example of the necessary places that we define a queue.
    Thank you

  • Unable to access  Remote EJB with jndi.properties in classpath

    Hi
    I'm trying to use remote interfaces with my adf web layer.
    Created remote datacontrol for my model part and my model EAR is deployed in another Oracle App Server instance(S1).
    My web layer is deployed in another Oracle App Server(S2). My page def uses the remote interfaces.
    Following are the files which are needed to have ejb ref entry.
    ---- orion-web.xml ----
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <orion-web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/orion-web-10_0.xsd"
    schema-major-version="10" schema-minor-version="0"
    servlet-webdir="/servlet/" >
    <ejb-ref-mapping name="MySessionEJB" location="MySessionEJB"
    remote-server-ref="true"
    jndi-properties-file="jndi.properties"></ejb-ref-mapping>
    </orion-web-app>
    --- web.xml ---
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee">
    <description>Empty web.xml file for Web Application</description>
    <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>client</param-value>
    </context-param>
    <context-param>
    <param-name>oracle.adf.view.faces.USE_APPLICATION_VIEW_CACHE</param-name>
    <param-value>true</param-value>
    </context-param>
    <context-param>
    <param-name>CpxFileName</param-name>
    <param-value>com.home.view.DataBindings</param-value>
    </context-param>
    <filter>
    <filter-name>PCF</filter-name>
    <filter-class>oracle.webcache.adf.filter.FacesPageCachingFilter</filter-class>
    </filter>
    <filter>
    <filter-name>adfBindings</filter-name>
    <filter-class>oracle.adf.model.servlet.ADFBindingFilter</filter-class>
    </filter>
    <filter>
    <filter-name>adfFaces</filter-name>
    <filter-class>oracle.adf.view.faces.webapp.AdfFacesFilter</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>PCF</filter-name>
    <servlet-name>Faces Servlet</servlet-name>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>FORWARD</dispatcher>
    </filter-mapping>
    <filter-mapping>
    <filter-name>adfBindings</filter-name>
    <url-pattern>*.jsp</url-pattern>
    </filter-mapping>
    <filter-mapping>
    <filter-name>adfBindings</filter-name>
    <url-pattern>*.jspx</url-pattern>
    </filter-mapping>
    <filter-mapping>
    <filter-name>adfFaces</filter-name>
    <url-pattern>*.jsp</url-pattern>
    </filter-mapping>
    <filter-mapping>
    <filter-name>adfFaces</filter-name>
    <url-pattern>*.jspx</url-pattern>
    </filter-mapping>
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet>
    <servlet-name>AFCStatsServlet</servlet-name>
    <servlet-class>oracle.webcache.adf.servlet.AFCStatsServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet>
    <servlet-name>resources</servlet-name>
    <servlet-class>oracle.adf.view.faces.webapp.ResourceServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>resources</servlet-name>
    <url-pattern>/adf/*</url-pattern>
    </servlet-mapping>
    <session-config>
    <session-timeout>1</session-timeout>
    </session-config>
    <mime-mapping>
    <extension>html</extension>
    <mime-type>text/html</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>txt</extension>
    <mime-type>text/plain</mime-type>
    </mime-mapping>
    <welcome-file-list>
    <welcome-file>login.jsp</welcome-file>
    </welcome-file-list>
    <jsp-config/>
    <ejb-ref>
    <ejb-ref-name>MySessionEJB</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <remote>com.home.model.MySessionEJBRemote</remote>
    <ejb-link>MySessionEJB</ejb-link>
    </ejb-ref>
    </web-app>
    and this jndi.properties file in placed in the WEB-INF/classes folder.
    java.naming.factory.initial=oracle.j2ee.rmi.RMIInitialContextFactory
    java.naming.security.principal=oc4jadmin
    java.naming.security.credentials=welcome123
    java.naming.provider.url=opmn:ormi://S1:6003:Test_Instance/test-ejb
    The same web application if I run it in Jdeveloper its able to open the welcome.jspx which calls the remote EJB method on load. But when I deploy it Oracle Server 10.1.3.1.0 the error "500 Internal Server Error" shows up and in log file following exception can be found
    avax.faces.el.EvaluationException: oracle.jbo.JboException: JBO-29000: Unexpected exception caught: oracle.jbo.JboException, msg
    =JBO-29000: Unexpected exception caught: javax.naming.NameNotFoundException, msg=MySessionEJB not found
    Seems like the jndi properties is ignored during the Context creation for lookup.
    Please advice where I'm missing the configuration.

    http://docs.sun.com/source/819-0079/dgjndi.html

  • Jndi.properties location in EAR

    Hello,
    in a environment of Tomcat+APACHE as webserver and OC4J as a backend server, putting jndi.properties in WEB-INF/classes will do the job, BUT if we use the OHS as the webserver, I am not succeeding to let the webapp view the sessions even after puting in WEB-INF/classes or in the EAR file META-INF, unless I deploy the ear of the webapp with the sessions ear as his parent.
    My aim is to deploy the webapp without a parent, all my interfaces are in the WEB_INF/lib/xxx.jar, so I should not be needing the sessions applications.
    Note: context.getEnvironment().size() is retrieving 0 !!
    Thanks

    Generally speaking, jndi.properties should be placed in the root of the classpath. In your case: WEB-INF/classes.
    In orion-web.xml include
    <web-app-class-loader search-local-classes-first="true"
    include-war-manifest-class-path="false" />
    Two possible workarounds are:
    - Create a JAR with just the jndi.properties. Add it to your WEB-INF/lib.
    - Last resort: Put it in $OC4J_HOME/j2ee/home/applib

  • JNDI Properties file

    Hi,
    Im having trouble setting up my first J2EE EJB and client program. I have managed to pinpoint the problem to be with the selection of the JNDI service provider (keep getting a NoInitialContextException).
    Both client and EJB are on the same machine, and Im using Sun's app server v8 . Could someone tell me what I should have in the jndi.properties file, and where this file should be put. I have tried hard-coding the details into the program, but w/o success.
    I assume that using the jndi.properties file will assign a provider globally across all applications in this server - is this true?
    Thanks.

    I read somewhere that the standard j2ee.jar file (which I have in my classpath) contains a default jndi.properties file to allow basic JNDI access.
    If this is true, then the problem is not with these properties. Heres what I have:
    I compiled the classes using javac, no problems (j2ee.jar is in the classpath).
    I am trying to run the client using java -classpath ClientApp.jar FirstClient, where ClientApp.jar is the stubs/skeletons produced at deployment. This method keeps throwing a NoInitialContextException.: need to specify class name . . .
    I also tried using appclient, but that threw even more errors (not entirely sure whats going on here).
    I have checked over my code, and as far as I can see the problem is not in there - Im sure its something to do with the classpath or something - is there a classpath I should be adding to get the client working?
    Why is J2EE so hard to learn? I find myself struggling more with footery errors than I do actuially reading and learning about how to use it.
    Thanks.

Maybe you are looking for

  • Will Adobe Acrobat 8.0 Standard Work With Adobe Reader 8.2.4?

    Hello, I have a question, but haven't found an answer to this yet. Can anyone tell me please:  Will Adobe Acrobat 8.0 Standard work with Adobe Reader 8.2.4? I had Adobe Acrobat 6.0 Standard on my computer & it was working with Adobe Reader 8, but don

  • Warning 11 message in log files

    I had Sun One Identity Synchronization for Windows working with AD. I removed the Message Queue when I upgrade another DS on the machine which broke the Idsync. I have reinstalled the packages for IMS3_0_1 that I removed. The Message Queue is startin

  • My name is displayed instead of my publishing company's name......

    My name is displayed instead of my publishing company's name for my books in iBookstore. I cannot find where to change it in iTunes Connect. Any suggestions (besides opening a ticket)?

  • Ovi Suite Install location

    Hi, By default Ovi Suite doesn't prompt for installation folder, how can i instruct the installer to install in a specific location? (e.g., on secondary hard disk, etc) I am using Win7 x64. Thanks,

  • Deployment Descriptor - run time modification

    As EJB spec states that deployment descriptor is for dynamic modification of EJB properties. I don't understand that once we give these (EJBs) JAR files to customer, how customer can change deployment descriptors which are hidden inside JAR files. Is