-
1. Re: client fails to run on template project
sharkman Jul 26, 2002 4:24 AM (in response to davidfreer)Do you have an file named "jndi.properties" in the directory from which you start the client which contains these lines:
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.provider.url=localhost
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
If not, make one.
- Stefan -
2. Re: client fails to run on template project
joelvogt Jul 26, 2002 6:05 AM (in response to davidfreer)Or something like:
java.util.Hashtable props = new java.util.Hashtable();
props.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
props.put(Context.PROVIDER_URL, localhost);
props.put("java.naming.rmi.security.manager", "yes");
props.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces
");
Then,
Context context = new InitialContext(props);
If you don't want to/can't use a props file -
3. Re: client fails to run on template project
alwyn Jul 30, 2002 12:32 AM (in response to davidfreer)Hi,
What if it still fails with same error even though the file exists and have
precisely the contents in your post? -
4. Re: client fails to run on template project
knowuse Aug 1, 2002 10:19 AM (in response to davidfreer)Hoi,
I think that there are some pieces missing, this worked for me.
props.put(InitialContext.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
props.put(InitialContext.PROVIDER_URL, "localhost");
props.put("java.naming.rmi.security.manager", "yes");
props.put(InitialContext.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
Doei Diego -
5. Re: client fails to run on template project
mtran Aug 6, 2002 9:52 PM (in response to davidfreer)Hi,
I have the exact same problem...My template's JSP is under the webapp/test/jsp/index.jsp. And under webapp/test/WEB_INF/lib, my *.jar and &.war files are there. Under webapp/WEB_INF, i have the web.xml et jboss-web.xml. I've mounted those directories. But still, when acessing the index.jsp, i have this message :
javax.naming.NamingException: Cannot create resource instance
What could I possibly forgot to set up?
oh, btw, where should i copy the jndi.properties file?
Thx,
Meg