I have also tried the following but they also did not work...
String configFile =
"/Library/Tomcat/Home/jackrabbitrepo/repository.xml";
String repHomeDir = "/Library/Tomcat/Home/jackrabbitrepo";
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"org.apache.jackrabbit.core.jndi" + ".provider.DummyInitialContextFactory");
env.put(Context.PROVIDER_URL, "localhost"); //Also tried
localhost:8080/jackrabbit
InitialContext ctx = new InitialContext(env);
repo = (Repository) ctx.lookup("jackrabbit.repository");
Here I also tried to register a new name to use but that doesn't work for me
since I do not have permission to create a .lock file in the repHomeDir and
I don't want to run NetBeans as root to allow this (and I am not even sure
it will work anyway).
String configFile =
"/Library/Tomcat/Home/jackrabbitrepo/repository.xml";
String repHomeDir = "/Library/Tomcat/Home/jackrabbitrepo";
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"org.apache.jackrabbit.core.jndi" + ".provider.DummyInitialContextFactory");
env.put(Context.PROVIDER_URL, "localhost"); //Also tried
localhost:8080/jackrabbit
InitialContext ctx = new InitialContext(env);
RegistryHelper.registerRepository(ctx,
"repo",
configFile,
repHomeDir,
true);
repo = (Repository) ctx.lookup("repo");
--
View this message in context:
http://www.nabble.com/JNDI-and-Jackrabbit-tp25101779p25102296.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.