Hi!
I got a JNDI problem with accessing Magnolias repository.
Maybe you could help me.
I created a little Web App to access magnolia's repository the code is shown
below:
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"org.apache.jackrabbit.core.jndi" +
".provider.DummyInitialContextFactory");
env.put(Context.PROVIDER_URL, "localhost");
InitialContext ctx = new InitialContext(env);
// Obtain the repository through a JNDI lookup
Repository r = (Repository) ctx.lookup("magnoliaAuthor");
SimpleCredentials cred = new
SimpleCredentials("superuser",
"superuser".toCharArray());
// Create a new repository session, after authenticating
Session session = r.login(cred, null);
Workspace ws = session.getWorkspace();
Node rn = session.getRootNode();
"magnoliaAuthor" is the name of the deployed magnolia app.
When i run this code i get a javax.naming.NameNotFoundException.
The Webapp and Magnolia are running in the same servlet container (Tomcat).
At the moment I have not modified the tomcat initial configuration.
I'm using the Community Edition right now.
Can you say me which error I make in accessing the Repository?
Is this only a problem with the CE and could this code run on the EE?
Thank's in advance for your answers.
----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/docs/en/editor/stayupdated.html
----------------------------------------------------------------