[jboss-user] [JNDI/Naming/Network] - env-entry lookup problem in jboss

luker74 do-not-reply at jboss.com
Fri Feb 9 06:35:37 EST 2007


Hi all,
i'm trying to lookup an env-entry from a java client program, and also from a servlet, but in all cases jboss says that the env-entry is not bound.
I use jboss3.2.8sp1 my code is:

	    Properties properties = new Properties();
	    properties.put("java.naming.factory.initial",
	    "org.jnp.interfaces.NamingContextFactory");
	    properties.put("java.naming.factory.url.pkgs",
	    "org.jboss.naming:org.jnp.interfaces");
	    properties.put("java.naming.provider.url", "jnp://10.26.1.183:1099");
	    properties.put("jnp.disableDiscovery", "true"); 
	    properties.put("j2ee.clientName", "orologio-client");
            InitialContext ic = new InitialContext(properties);
      try {  
        envEntry = (String)ic.lookup("OROLOG");      
      } catch (NamingException ne) {
            throw new ServiceLocatorException(ne);
      }
           

and the ebj-jar.xml is :
<ejb-jar>
  <enterprise-beans>
    
     ...........
         <env-entry>
            The caller of the factory
            <env-entry-name>OROLOG</env-entry-name>
            <env-entry-type>java.lang.String</env-entry-type>
            <env-entry-value>it.ausystems.progettoejb.dao.OrologioDAOImpl</env-entry-value>
         </env-entry>
     ........
    
  </enterprise-beans>
</ejb-jar>
  


the problem is:
11:35:47,654 INFO  [STDOUT] it.ausystems.progettoejb.dao.OrologioDAOException: javax.naming.NameNotFoundException: OROLOG not bound


can you help me?

thanks

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4013577#4013577

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4013577



More information about the jboss-user mailing list