JBoss Community

Lookups from jboss 7 to jboss 4

created by Carlos Rodríguez in JNDI and Naming - View the full discussion

Hello, a couple years ago I created and deployed 2 applications that work together on jboss 4. Now, I want to migrate one of them (because the other one is too coupled to jboss 4) to jboss 7  but I have a problem when I make the lookups calls. When I make a lookup on my current server (jboss 7) everything works good, but when I try to make the jboss 4 lookups this message is shown

 

 

17:35:06,898 ERROR [stderr] (http--127.0.0.1-8080-4) javax.naming.NameNotFoundException: map-server/ClientBean/remote -- service jboss.naming.context.java.map-server.ClientBean.remote

17:35:06,902 ERROR [stderr] (http--127.0.0.1-8080-4)      at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:97)

17:35:06,902 ERROR [stderr] (http--127.0.0.1-8080-4)      at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:177)

17:35:06,902 ERROR [stderr] (http--127.0.0.1-8080-4)      at org.jboss.as.naming.InitialContext.lookup(InitialContext.java:113)

17:35:06,903 ERROR [stderr] (http--127.0.0.1-8080-4)      at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:213)

17:35:06,903 ERROR [stderr] (http--127.0.0.1-8080-4)      at javax.naming.InitialContext.lookup(InitialContext.java:392)

 

 

- My original Initial Context code (when the the app was on jboss 4) was this:

 

 

     Properties env = new Properties();

     env.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");

     env.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");

     env.put("java.naming.provider.url", url);

     InitialContext ctx = new InitialContext(env);

 

 

and I used to make the lookups this way:

 

 

     client = (Client) ctx.lookup("Appear/ClientBean/remote");

 

 

- My new Initial Context code (Jboss 7) is this:

 

 

     Properties env = new Properties();

     env.put("java.naming.factory.initial", "org.jboss.as.naming.InitialContextFactory"); //this change

     env.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");

     env.put("java.naming.provider.url", Params.getValue("com.ogangi.mimampp3.NAMING_PROVIDER_URL"));

     InitialContext ctx = new InitialContext(env);

 

 

and a I still make same the lookups:

 

 

     client = (Client) ctx.lookup("Appear/ClientBean/remote");

 

 

Any Idea?

Reply to this message by going to Community

Start a new discussion in JNDI and Naming at Community