3 Replies Latest reply on Sep 29, 2009 5:09 AM by mos_lene

    weblogic jndi lookup from jboss in cluster

      I am having a problem with the following code in a jboss cluster environment.



      javax.naming.Context context = null;
      
      Properties properties = new Properties();
      properties.setProperty( Context.PROVIDER_URL, "t3://hostname:6131" );
      properties.setProperty( Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory" );
      
      context = new InitialContext( properties );
      
      out.println( context.lookup( "QueueConnectionFactory" ) );




      The above code works fine in default jboss server. I am using the following

      JBoss 5.1.0.GA ( using wlclient to connect )
      Weblogic 8.1

      I get CORBA.initialize exception in the cluster ( all environment ) and it works fine in default envirobment.

      Could someone please help me in this.

      Thanks,
      Ram

        • 1. Re: weblogic jndi lookup from jboss in cluster
          mos_lene

          Hi Ram,
          do you have any progress on that ? I would appreciate any input on this matter. I have exactly the same issue using JBoss 5.1.0 with Weblogic 9.2. Default configuration works just fine. It gives a CORBA.Initialize exception in cluster mode when calling

          Context ctx = new InitialContext(ht);

          I tried to change the
          properties.setProperty( Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory" );
          properties.setProperty( Context.PROVIDER_URL, "t3://hostname:6131" );

          with
          env.setProperty( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.cosnaming.CNCtxFactory" );
          env.setProperty( Context.PROVIDER_URL, "iiop://hostname:6131" );

          It didn't help, same problem - "default" works fine, "all"/cluster throws an exception.


          • 2. Re: weblogic jndi lookup from jboss in cluster
            brian.stansberry

            I doubt this has anything to do with clustering per se; rather it's that clustering is a feature in the "all" config, along with lots of other stuff that's not in default, e.g. deploy/iiop-service.xml.

            Does removing deploy/iiop-service.xml solve your problem? Alternatively, you could try making a new "cluster" config by copying default and then:

            1) Copy all/deploy/cluster to cluster/deploy/
            2) Copy all/deploy-hasingleton to cluster/
            3) Copy all/lib/* to cluster/lib/

            It gets a bit more complex if you want farming to work; I'll omit that for now.

            • 3. Re: weblogic jndi lookup from jboss in cluster
              mos_lene

              Copying weblogic.jar into "JBoss/common/lib" solves the problem.