[jboss-user] [JNDI and Naming] - Lookups from jboss 7 to jboss 4

Carlos Rodríguez do-not-reply at jboss.com
Sat Mar 3 18:07:56 EST 2012


Carlos Rodríguez [https://community.jboss.org/people/caalroja] created the discussion

"Lookups from jboss 7 to jboss 4"

To view the discussion, visit: https://community.jboss.org/message/721367#721367

--------------------------------------------------------------
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
[https://community.jboss.org/message/721367#721367]

Start a new discussion in JNDI and Naming at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2083]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120303/4da1dba6/attachment-0001.html 


More information about the jboss-user mailing list