JNDI contexts

All,
As I understand it weblogic has an internal naming service that manages
the deployed enterprise beans and this is what JNDI uses when requesting
initial contexts and home references.
Presumably you can choose to use a different naming service and so this
must be configurable.
How do you confiure it?
What happens with naming services in a clustered environment? Presumably
this would have to be the case to support failover etc.
In a clustering environment is there any additional configuring that
needs to be done to support the clustering?
Thanks in advance
Aaron

Aaron Robinson wrote:
>
All,
As I understand it weblogic has an internal naming service that manages
the deployed enterprise beans and this is what JNDI uses when requesting
initial contexts and home references.Yes.
>
Presumably you can choose to use a different naming service and so this
must be configurable.Not really. By default our naming uses our JNDI store.
>
How do you confiure it?One option is to use a JNDI adapter for your own store and access it
from your applications instead of ours.
>
What happens with naming services in a clustered environment? Presumably
this would have to be the case to support failover etc.Yes.
>
In a clustering environment is there any additional configuring that
needs to be done to support the clustering?The documentation should have you covered.
>
Thanks in advance
Aaron--
Thanks,
Michael
-- BEA WebLogic is hiring!
Check our website: http://www.bea.com/

Similar Messages

  • JNDI Context Retrieval in EJB 3.0

    I have a doubt about JNDI context retrieval in EJB 3.0. I know that when I call a bean from another bean I can use this line:
    InitialContext ctx=new InitialContext();
    But I'd like to know whether in a Client I am obliged to pass this parameter:
    InitialContext ctx=new InitialContext(System.getProperties());
    This method was the one I called when I used EJB 2.1..Now in many examples I find both these approaches...I'd like to know what differentiates one from another and which is the standard in EJB 3.0?
    I read that when calling a bean from another bean I can use the first constructor with no parameters...but in clients I am obliged to give the param..why?
    Thanks!

    Correct me if I am wrong: the application client
    container is a "static" container: you need to know
    which EJB to call at develop time and you can not
    change it later without recompiling.That's not quite right. First, there's nothing special about the application client
    container with respect to retrieving Java EE dependencies that is not also true
    of Java EE web containers and EJB containers. The programming model for
    defining and accessing EE dependencies is exactly the same, independent of
    whether the code is running in an Application Client, EJB container, etc.
    It's true that dependencies are defined at development time, but one of the
    whole reasons for the level of indirection provided by Java EE dependencies
    is to allow the target of those dependencies to change without changing code.
    E.g, with EJB dependencies this is done using the ejb-link attribute in ejb-ref
    or ejb-local-ref. That specifies which EJB is the target of the ejb dependency
    without changing the code used to retrieve the dependency.
    >
    JNDI was designed to be more flexible: you can
    dynamically lookup EJB homes, then call a remote
    method you like at runtime. Is that flexibility lost
    with application client container. Is there any way
    to dynamically inquiry-invoke?In the Java EE programming model, components always define what their
    dependencies are so that the deployer can configure them. The idea of
    doing a direct global lookup without using a Java EE dependency is
    outside the scope of Java EE. It works in many implementations but the
    specifics are not portable.
    We have a presentation that covers some of these topics you might find
    interesting. See here :
    https://glassfish.dev.java.net/javaee5/ejb/compdependencies_xmlforum_nov15.pdf

  • "No JNDI context" error

    Hello.
    I'm currently using SQLDeveloper version 1.5.0.5.3 and since maybe three versions ago, I started getting frequently the following error when opening the application:
    {color:#ff0000}SEVERE 60 0 oracle.jdevimpl.db.adapter.DefaultContextWrapper failed to create naming Context for db connections at url: file:/C:/Documents and Settings/jvargem/Application Data/SQL Developer/system1.5.0.53.38/o.jdeveloper.db.connection.11.1.1.0.22.49.35/connections.xml
    SEVERE 61 16 oracle.jdevimpl.db.adapter.DefaultContextWrapper failed to create naming Context for db connections at url: file:/C:/Documents and Settings/jvargem/Application Data/SQL Developer/system1.5.0.53.38/o.jdeveloper.db.connection.11.1.1.0.22.49.35/connections.xml
    SEVERE 62 15 oracle.jdeveloper.db.DatabaseConnections DatabaseConnections has no JNDI context so cannot list connections.
    SEVERE 63 0 oracle.jdevimpl.db.adapter.DefaultContextWrapper failed to create naming Context for db connections at url: file:/C:/Documents and Settings/jvargem/Application Data/SQL Developer/system1.5.0.53.38/o.jdeveloper.db.connection.11.1.1.0.22.49.35/connections.xml
    SEVERE 64 0 oracle.jdevimpl.db.adapter.DefaultContextWrapper failed to create naming Context for db connections at url: file:/C:/Documents and Settings/jvargem/Application Data/SQL Developer/system1.5.0.53.38/o.jdeveloper.db.connection.11.1.1.0.22.49.35/connections.xml
    SEVERE 65 0 oracle.jdeveloper.db.DatabaseConnections DatabaseConnections has no JNDI context so cannot list connections.{color}
    When this error happens, no connections are displayed, which prevents me from using the application unless I create the connection all over again!
    As I said this happens frequently and afterwards I have to close and restart the application several times until the error goes away. The problem is that sometimes it doesn't go away and I have to restart the computer and restart all over again, hoping it will work.
    As anyone experienced this? Any idea of what may be happening and how to solve it?
    Thanks a lot
    João Vargem

    Please read the whole thread before posting.
    You did search the forum, which is great, but then read what people respond! There was only 1 reply here, so that shouldn't be too much work...
    If the latest version still gives you problems, do get back though.
    Regards,
    K.

  • OC4J 1.0.2.2.1 Creating 2 JNDI Contexts

    Hello,
    I have a problem when creating two JNDI contexts.
    I've got a very simple class that creates 2 contexts serially with 2 separate property objects.
    But the 2nd context seems to be being created with the first properties object. And yes I am closing the first.
    Here is it
    public class TestLookup
    private static void lookup(String name, String password)
    InitialContext ctx = null;
    try
    Properties p = new Properties();
    p.setProperty(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
    p.setProperty(Context.PROVIDER_URL, "ormi://localhost:23791");
    p.setProperty(Context.SECURITY_PRINCIPAL, name);
    p.setProperty(Context.SECURITY_CREDENTIALS, password);
    ctx = new InitialContext(p);
    ctx.lookup("Security");
    System.out.println("finish");
    catch (Exception e)
    try
    if (ctx != null)
    ctx.close();
    System.out.println("ctx closed");
    catch (Exception e2)
    e2.printStackTrace();
    e.printStackTrace();
    public static void main(String[] args)
    lookup("123", "admin");
    lookup("admin", "admin");
    Here is the output
    ctx closed
    java.lang.SecurityException: Invalid username/password for default (123)
    etc....
    ctx closed
    java.lang.SecurityException: Invalid username/password for default (123)
    etc....
    Any ideas anyone

    This may be problem with your userid/password. Please look the $OC4J_HOME/j2ee/home/config/principals.xml whether you have a right userid password.
    I did a quick test at looking up at "jdbc/OracleDS" for two users admin and SCOTT and this works fine both in 1.0.2.2.x an 9.0.2
    I got your errors when I had wrong passwords for these users
    regards
    Debu

  • Error in SQL Developer: Database Connections has no JNDI context so cannot

    Hello,
    I have installed SQL Developer 3.1.07 version on Linux. Previously I was able to create a connection and browse the existing tables, add tables, etc.
    Now when I launch SQL Developer, I see that no connections are displayed. Instead there are these three messages indicating an error. Can you please advice on how to resolve this?
    Thanks,
    Errors:
    SEVERE     44     0     oracle.jdeveloper.db.DatabaseConnections     DatabaseConnections has no JNDI context so cannot list connections.
    SEVERE     43     36     oracle.jdevimpl.db.adapter.DefaultContextWrapper     Failed to create naming Context for db connections at url: file:/home/user/.sqldeveloper/system3.1.07.42/o.jdeveloper.db.connection.11.1.1.4.37.59.48/connections.xml
    SEVERE     42     0     oracle.jdevimpl.db.adapter.DefaultContextWrapper     Failed to create naming Context for db connections at url: file:/home/user/.sqldeveloper/system3.1.07.42/o.jdeveloper.db.connection.11.1.1.4.37.59.48/connections.xml

    Hi uparthas,
    Here is a similar thread (Windows 7) marked as answered, and may be applicable to a Linux environment if you are using jdk1.7 rather than jdk1.6:
    Lost my connections.
    If that does not solve the issue, you might also wish to ...
    1. Exit SQL Developer
    2. Delete or rename the /home/user/.sqldeveloper/system3.1.07.42 directory
    3. Launch SQL Developer, perhaps without choosing to migrate settings from a prior install.
    Hope this helps,
    Gary
    SQL Developer Team

  • Faster way ?  properties file vs weblogic.xml jndi context

    Anyone knows what is faster way to get a value from a parameter,
    a) using a properties file
    b) using jndi context ( env-entries )
    Anyway to get new values from a runtime changed files ?
    Regards
    jsanza

    The real question is what are you trying to do, since that may make the
    decision. If you need to be able to change a parameter, either build
    parameter maintenance into your app (a page for example) or use the file
    method so you actually edit the stuff.
    JNDI is in-memory, which is fast. Pulling from disk will be pretty fast too
    on most systems (typically it is from memory if the file has been changed,
    since everything used gets cached by most OSs).
    Peace,
    Cameron Purdy
    Tangosol Inc.
    << Tangosol Server: How Weblogic applications are customized >>
    << Download now from http://www.tangosol.com/download.jsp >>
    "jsanza" <[email protected]> wrote in message
    news:3b72c402$[email protected]..
    >
    >
    Anyone knows what is faster way to get a value from a parameter,
    a) using a properties file
    b) using jndi context ( env-entries )
    Anyway to get new values from a runtime changed files ?
    Regards
    jsanza

  • How to initialize the jndi context?

    Hello!
    install the j2ee sdk 1.4 on a server that has the ip address 211.83.144.48.
    then I deploy a EJB ,but I want to call the method from another pc.
    The problem is that how I initialize the jndi context? How can get the url for "Context.PROVIDER_URL"?
    thks.

    You need to look document of the application server that u are using.
    Because this depends on application servers.

  • DatabaseConnections has no JNDI context so cannot list connections

    All my connections are missing and I cannot create or save new ones.
    The messagse from the logging page are:
    oracle.jdevimpl.db.adapter.DefaultContextWrapper -
    failed to create naming Context for db connections at url: file:/C:/Documents and Settings/PhilDeFrancesco/Application Data/SQL Developer/system1.5.1.54.40/o.jdeveloper.db.connection.11.1.1.0.22.49.42/connections.xml
    oracle.jdeveloper.db.DatabaseConnection
    DatabaseConnections has no JNDI context so cannot list connections

    The thread suggesting changes to .jar files did not work:
    http://forums.oracle.com/forums/ann.jspa?annID=737
    However,
    I found this on another thread and it worked for me.
    Connection problems with SQL Developer -- ANSWERED
    "Try removing the SQL Developer SYSTEM folder that is created on Startup.
    \Documents and Settings\<user>\Application Data\SQL Developer\system1.5.0.53.38.
    Note that this will remove any connections and settings created, but as you are not able to import or create connections, that should not be a concern. This system folder is created when you first invoke SQL Developer and is updated while you work, storing and preserving connections and various settings as you work. "

  • Start-up error "DatabaseConnections has no JNDI context so cannot list ..."

    Hi,
    Since this morning, every time I startup SQLDeveloper I nolonger see my database connections. All I see is a logging page with entries like the one given below.
    I have re-downloaded and installed sqldeveloper using sqldeveloper-2.1.1.64.45.zip, and I have also trashed the "system" folder(s) under:
    C:\Documents and Settings\anipatel\Datos de programa\SQL Developer
    ...but the error continues.
    I have not applied any Sqldeveloper updates nor have I updated any other software on the PC (OS XP Pro SP3).
    Any pointers as to how to resolve this issue?
    Thanks - Anit
    SEVERE     56     1329     oracle.ide.IdeCore     Exception firing mainWindowOpened to oracle.dbtools.raptor.RaptorDBAddin$1@10eb2f0
    SEVERE     52     1532     oracle.ide.IdeCore     Exception firing mainWindowOpened to oracle.ideimpl.jsr198.OracleIDE$1@871dcc
    SEVERE     49     0     oracle.jdeveloper.db.DatabaseConnections     DatabaseConnections has no JNDI context so cannot list connections.
    SEVERE     48     0     oracle.jdevimpl.db.adapter.DefaultContextWrapper     Failed to create naming Context for db connections at url: file:/C:/Documents and Settings/anipatel/Datos de programa/SQL Developer/system2.1.1.64.45/o.jdeveloper.db.connection.11.1.1.2.36.55.30/connections.xml
    SEVERE     47     390     oracle.jdevimpl.db.adapter.DefaultContextWrapper     Failed to create naming Context for db connections at url: file:/C:/Documents and Settings/anipatel/Datos de programa/SQL Developer/system2.1.1.64.45/o.jdeveloper.db.connection.11.1.1.2.36.55.30/connections.xml
    SEVERE     46     0     oracle.ide.IdeCore     Exception firing addinsLoaded to oracle.jdevimpl.vcs.VCSManagerImpl$6@7ac6c
    SEVERE     62     0     oracle.jdeveloper.db.DatabaseConnections     DatabaseConnections has no JNDI context so cannot list connections.
    SEVERE     61     0     oracle.jdevimpl.db.adapter.DefaultContextWrapper     Failed to create naming Context for db connections at url: file:/C:/Documents and Settings/anipatel/Datos de programa/SQL Developer/system2.1.1.64.45/o.jdeveloper.db.connection.11.1.1.2.36.55.30/connections.xml
    SEVERE     60     375     oracle.jdevimpl.db.adapter.DefaultContextWrapper     Failed to create naming Context for db connections at url: file:/C:/Documents and Settings/anipatel/Datos de programa/SQL Developer/system2.1.1.64.45/o.jdeveloper.db.connection.11.1.1.2.36.55.30/connections.xml
    SEVERE     57     281     oracle.ide.IdeCore     Exception firing mainWindowOpened to oracle.dbtools.raptor.RaptorDBAddin$1@154fc43
    SEVERE     55     2017     oracle.ide.IdeCore     Exception firing mainWindowOpened to oracle.ideimpl.jsr198.OracleIDE$1@1f4ff23
    SEVERE     50     0     oracle.ide.IdeCore     Exception firing addinsLoaded to oracle.jdevimpl.vcs.VCSManagerImpl$6@12801c5

    Bringing this old post back to add some information.
    Since our company upgraded versions (from "v-GO" with the circles in the system tray to "ESSO" with a big oracle O in the system tray), I no longer have to kill the SSO processes in order to run SQL Developer.
    Instead, I simply have to launch SQL Developer 3 times.
    First time: SQL Developer crashes. Just click OK.
    Second time: SQL Developer loads but no connections appear. However, it does load much faster than the first time.
    Third time: SQL Developer loads properly.
    I'd rather launch SQL developer 3 times than have it crash (1st time), remember that I have to kill all ESSO processes, then re-launch SQL Developer (2nd time), then re-launch ESSO. So, this is how I've been doing it for the last few months and it "works" every time.

  • Using JNDI Context with HTTP Tunneling (Detecting Connection Problems)

    Hi there,
    We are using connection to WL 5.1.0,SP6 cluster to create JNDI Context. Everything works fine until tcp/ip timeouts occur.
    After that ...
    Is there a way to subscribe for connection events?
    I don't want to use T3CLient for this, since WL advises not
    to do that. The recommended method is to create a Context and
    work with it.
    Help.
    For the curious here is one exception which we can not even
    trap. Is this fixed in SP8?:
    weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ MBuf used after writeTo() called ]
         at weblogic.socket.MBuf.checkNotWritten(MBuf.java:68)
         at weblogic.socket.MBuf.writeTo(MBuf.java:140)
         at weblogic.socket.JVMSocketHTTPClient.sendMsg(JVMSocketHTTPClient.java:253)
         at weblogic.socket.JVMAbbrevSocket.sendOutMsg(JVMAbbrevSocket.java:348)
         at weblogic.socket.JVMAbbrevSocket.sendMsg(JVMAbbrevSocket.java:237)
         at weblogic.rjvm.ConnectionManager.sendMsg(ConnectionManager.java:420)
         at weblogic.rjvm.RJVMImpl.send(RJVMImpl.java:494)
         at weblogic.rjvm.MsgAbbrevOutputStream.flushAndSendRaw(MsgAbbrevOutputStream.java:155)
         at weblogic.rjvm.MsgAbbrevOutputStream.flushAndSend(MsgAbbrevOutputStream.java:163)
         at weblogic.rjvm.MsgAbbrevOutputStream.sendRecv(MsgAbbrevOutputStream.java:186)
         at weblogic.rmi.internal.BasicOutgoingRequest.sendRecv(BasicOutgoingRequest.java:23)
         at weblogic.rmi.extensions.AbstractRequest.sendReceive(AbstractRequest.java:73)
         at

    Download Firmware 2.77 MB...
    TFTP Download , download both the files on the desktop only...
    Double click the TFTP.exe file and click run :
    For Server- Enter the IP Address of the router that you assigned.  By default, the router is 192.168.1.1...
    For Password- Enter the password you assigned the router. By default, the router’s password is “admin”.
    For File- Click the triple “…” button and browse for the .bin firmware file...
    Click Upgrade button to start upgrading.  A progress bar should show up to show the progress.
    Once the Upgrade is done press and hold the reset button for 30 seconds...Release the reset button...Unplug the power cable from your router, wait for 30 seconds and re-connect the power cable...Now re-configure your router...

  • How to add a custom jndi object into weblogic jndi context.

    Hi,
    I noticed that there is a standard way of adding jndi entry in the weblogic jndi context. One is through the console by specifying the jndi name (e.g DataSource) and this is added in config.xml and in its appropriate "jdbc/xxx-jdbc.xml". The question now is, I have an object which I would like to be included in the global weblogic jndi context.
    <entry key="java:comp/env/jms/wsnotificationCF">
    <bean class="org.apache.activemq.ActiveMQConnectionFactory">
    <property name="brokerURL" value="tcp://localhost:61616"/>
    </bean>
    </entry>
    or
    <entry key="java:comp/env/obj/UUID_CLASS_KEY" value="org.apache.servicemix.bpe.uuid.ActiveMQUUIDService"/>
    This is just a sample of a possible entry. Is there then a way I could add this object in weblogic jndi context ?
    Regards,
    Fritz

    Hi,
    I noticed that there is a standard way of adding jndi entry in the weblogic jndi context. One is through the console by specifying the jndi name (e.g DataSource) and this is added in config.xml and in its appropriate "jdbc/xxx-jdbc.xml". The question now is, I have an object which I would like to be included in the global weblogic jndi context.
    <entry key="java:comp/env/jms/wsnotificationCF">
    <bean class="org.apache.activemq.ActiveMQConnectionFactory">
    <property name="brokerURL" value="tcp://localhost:61616"/>
    </bean>
    </entry>
    or
    <entry key="java:comp/env/obj/UUID_CLASS_KEY" value="org.apache.servicemix.bpe.uuid.ActiveMQUUIDService"/>
    This is just a sample of a possible entry. Is there then a way I could add this object in weblogic jndi context ?
    Regards,
    Fritz

  • How to set jndi context to call EJB?

    Hello!
    install the j2ee sdk 1.4 on a server that has the ip address 211.83.144.48.
    then I deploy a EJB ,but I want to call the method from another pc.
    The problem is that how I initialize the jndi context? How can get the url for "Context.PROVIDER_URL"?
    thks.

    Hi there, I am having what appears to be a very similar problem.
    the code I am using for gaining the initial context is as follows:
    properties.put("java.naming.factory.initial",JNDI_FACT_CLASS_NAME);
    properties.put("java.naming.provider.url", s);
    return new InitialContext(properties);
    where these instantiated variables when pulled out of the hash are :
    java.naming.factory.initial : com.sun.appserv.naming.S1ASCtxFactory
    java.naming.provider.url : iiop://lich.ecs.soton.ac.uk:3700
    this works absolutely fine on the localhost machine, running both client and server, however when
    running on seperate machines I get the same ORB_COMM error as previously stated:
    WARNING: ORBUTIL.connectFailure
    org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:1739) com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:1757)
    ..etc..
    apparently this is caused by :
    java.net.ConnectException: Connection refused
    at sun.nio.ch.Net.connect(Native Method)
    at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:460)
    at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
    ...etc...
    the server is definately up and running, and can provide all other services to the remote client, using both the IP and the DNS resolved name, and JVT seems to work fine, just not corba look up's of a queue.
    I am using the Sun Application Platform Server 8 and the standard j2EE RI versions of corba , JNDI e.t.c
    if you could suggest any further reason why the localhost may be resolvable, but the remote may not I would drastically appreciate the help, as I have been scouring forums for 2 days now, and exhaused all
    other potential solutions.
    thanks
    Tim

  • JNDI context federation / external contexts

    I could not find any information whether or not Oracle Application Server supports federation of JNDI contexts.
    I wanted to add external context to its JNDI. I want java:comp/env/external to point to different JNDI provider. (similar to JBoss ExternalContext mbean).
    Anyone knows if that is possible?
    Thank you

    HI Arie,
    If you are accessing enterprise beans with J2EE clients (servlets, JSP, other enterprise beans, J2EE application clients), do not specify and use this arbitrary JNDI name. Instead, define EJB references in the clientsu2019 deployment descriptors and access the beans using these references. For more information, check the following link
    http://help.sap.com/saphelp_nw04/helpdata/en/a0/019b3e25f95f14e10000000a114084/content.htm
    if the above does not work try the following:--
    Try to lookup the Ejb by its JNDI name given in the EJB-J2ee-engine.xml file if it does not exist there  give any valid name and try to lookUp.
    or try to lookup the ejb by its default jndi name.
    "localejbs/bean name>"
    http://help.sap.com/saphelp_nw04/helpdata/en/38/3e5a4201301453e10000000a155106/frameset.htm
    in the Above link refer the second option "Lookup from a Non-J2EE Java Application"
    Siddharth
    Edited by: Siddharth Jain on Aug 22, 2008 7:13 AM

  • Initializing jndi context to call ejb??Help!!!

    hi!
    I installed j2ee sdk 1.4 ,deployed a ejb on my server.I tried to call the ejb following the example given by the
    book.:
    import javax.naming.*;
    import javax.rmi.*;
    import java.util.*;
    public class jndi {
    public static void main(String[] args) {
    try {
         Hashtable env = new Hashtable();
         Context initctx = new InitialContext();
         Object objref = initctx.lookup("java:comp/env/ejb/HelloRef");
    } catch (Exception ex) {
    System.err.println("Caught an unexpected exception!");
    ex.printStackTrace();
    the error occured:
    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
    then I try to initalize the jndi context:
    env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
    env.put(Context.PROVIDER_URL,"ldap://localhost:389");
    Context initctx = new InitialContext(env);
    It still does not work:
    javax.naming.CommunicationException: localhost:389. Root exception is java.net.ConnectException: Connection refused: connect
    Whatcan I do to call the ejb??

    Hi, I think your original code should work ok but you should check the JNDI name of the EJB you deployed.
    In order for your lookup to work properly the JNDI name of your EJB should be "java:comp/env/ejb/HelloRef" to match the lookup in your code.
    Object objref = initctx.lookup("java:comp/env/ejb/HelloRef");
    I'd try that first, you should find the EJB JNDI name in your deployment descriptors within the jar file.

  • Problem: empty JNDI Context, weird name space

    Hello,
    I am unable to deploy our EAR file and one of the suspicious things is that if I print out the 'InitialContext' (the JNDI Context), I get nothing!.
    Here is the code:
    InitialContext jndiContext = new InitialContext();
    System.out.println("CONTEXT: " + jndiContext);
    System.out.println("ENV: " + jndiContext.getEnvironment());
    System.out.println("NAME: " + jndiContext.getNameInNamespace());
    And this is the output I get:
    05/01/18 15:45:50 CONTEXT: javax.naming.InitialContext@18c4a7f
    05/01/18 15:45:50 CONTEXT ENV: {} <=== empty!?
    05/01/18 15:45:50 CONTEXT NAME: wgen <=== where is this 'wgen' coming from!?
    I see 2 issues here:
    1. Why is the Context environment empty? It shouldn't be empty!
    2. Where does the Context name of 'wgen' come from? I do not have 'wgen' mentioned anywhere in ejb-jar.xml
    So then I tried fixing issue 1 by creating the Context environment programmatically:
    java.util.Hashtable env = new java.util.Hashtable();
    env.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.ApplicationInitialContextFactory");
    env.put(javax.naming.Context.SECURITY_PRINCIPAL, "jazn.com/admin");
    env.put(javax.naming.Context.SECURITY_CREDENTIALS, "admin2");
    env.put(javax.naming.Context.PROVIDER_URL, "opmn:ormi://localhost:3201:OAS1.bray/wgen")
    InitialContext jndiContext = new InitialContext(env);
    This still produced an empty environment.
    Has anyone got aaaany ideas about this?
    Where is OAs/OC4J getting that 'wgen' context from? How do you populate the JNDI environment? It's as if the JNDI is completely brain-dead.... and it's possible that it's just misconfigured. All I have in my j2ee/config/ dir is a jndi.properties file that looks like this:
    java.naming.factory.initial=com.evermind.server.ApplicationInitialContextFactory
    java.naming.provider.url=opmn:ormi://localhost:6003:OAS1.bray/wgen
    java.naming.security.principal=admin
    java.naming.security.credentials=admin2
    Thanks,
    Otis

    I would say there is nothing wrong with JNDI in your oc4j. The very fact that the CONTEXT NAME is wgen, which is obtained from the
    java.naming.provider.url=opmn:ormi://localhost:6003:OAS1.bray/wgen
    shows jndi is functioning.
    To see more of you jndiContext, run
    listContext (jndiContext,"")
    after you have added the following method that iterates through the subContexts. Please note that getEnviroment returns the enviroment for the context, not the context itself. It might be empty indeed.
    private static void listContext (Context ctx, String indent) {
    try {
    NamingEnumeration list = ctx.listBindings("");
    while (list.hasMore()) {
    Binding item = (Binding)list.next();
    String className = item.getClassName();
    String name = item.getName();
    System.out.println(indent+className+" "+name);
    Object o = item.getObject();
    if (o instanceof javax.naming.Context)
    listContext ((Context)o,indent+" ");
    catch (NamingException ex) {
    ex.printStackTrace();
    System.err.println ("List error: "+ex);

  • JNDI context

    .what happens to the value contained in the JNDI, if the server is down ???

    The JBI specification does not call for the same JNDI context to be used for all components. It says (page 124):
    public javax.naming.InitialContext getNamingContext()Get the JNDI naming context for this component. This context is a standard JNDI InitialContext but its content will vary based based on the environment in which the JBI implementation is running.
    Returns: the JNDI naming context; must be non-null.
    I believe all app server-based JBI implementations hand out the same JNDI context, to allow access to Java EE resources bound by name. JBI implementations that are not based on an app server would not have such a motive, and are free to do other things with JNDI.

Maybe you are looking for

  • 23" ACD with pink in upper right quarter of screen, live with it?

    I've got a week 28 ACD that arrived as a portion of my not-yet-shipping Mac Pro order. From what I understand this is the new spec version (it certainly is very bright with vivid colors). I've been using it for about a week and can't shake the notion

  • FaceTime HD camera not working with Lync

    I finally managed to convince IT to get me a Mac instead of the standard (cringe) Dell laptop , but we can't make the enterprise MS Office 365 / Lync video work. This is frustrating for all concerned and threatens to hinder our efforts to expand the

  • Photos on my external drive

    Hi I have a number of wedding photos on my external drive but can't play them on laptops other PCs or anything else that's not iMAC. I have formated the external drive when I first connected it to the iMAC so perhaps that might be aproblem. Any solut

  • PLEASE HELP-Is there a way to spell check footnotes in indesign cs2 separately

    Is there a way to spell check footnotes in indesign or in incopy cs2 separately?

  • Subscription has not been renewed

    First of all, I'd like to let it clear that I think Skype service has become worse after Microsoft bought it. Second, I was charged for a 60 min mobile Brazil subscription, but It didn't not renew my subscription so far. It says my credits will be av