Are you sure? I checked with your suggestion and its still not working. I changed jcr/local to jcrlocal both in jcr-ds.xml and in my code. I also didn't understand the logic behind your solution. Would you please explain.
Thanks and regards, Kalyan Sarkar José Blas Camacho Taboada wrote: > > I had a similar problem with jboss. I put jcrlocal without / and it worked > properly... > > > regards > > 2007/4/4, kalyansarkar108 <[EMAIL PROTECTED]>: >> >> >> I am trying the wiki article >> http://wiki.apache.org/jackrabbit/JackrabbitOnJBoss Jackrabbit on >> JBoss and >> getting a javax.naming.NameNotFoundException: jcr not bound. >> >> jcr-ds.xml >> --------------- >> <connection-factories> >> <tx-connection-factory> >> <jndi-name>jcr/local</jndi-name> >> <xa-transaction/> >> <rar-name>jackrabbit-jca-1.2.3.rar</rar-name> >> <connection-definition>javax.jcr.Repository >> </connection-definition> >> <config-property name="homeDir" >> type="java.lang.String">E:/JCR-REPO/testrepo</config-property> >> <config-property name="configFile" >> type="java.lang.String >> ">E:/JCR-REPO/testrepo/repository.xml</config-property> >> <config-property name="bindSessionToTrasaction" >> type="java.lang.Boolean">true</config-property> >> </tx-connection-factory> >> </connection-factories> >> >> jboss console >> ----------------- >> 11:50:39,593 INFO [RepositoryImpl] Starting repository... >> 11:50:39,625 INFO [LocalFileSystem] LocalFileSystem initialized at path >> E:\JCR-REPO\testrepo\repository >> 11:50:39,812 INFO [NodeTypeRegistry] no custom node type definitions >> found >> 11:50:39,828 INFO [LocalFileSystem] LocalFileSystem initialized at path >> E:\JCR-REPO\testrepo\version >> 11:50:43,015 INFO [LocalFileSystem] LocalFileSystem initialized at path >> E:\JCR-REPO\testrepo\version\blobs >> 11:50:43,125 INFO [RepositoryImpl] initializing workspace 'default'... >> 11:50:43,125 INFO [LocalFileSystem] LocalFileSystem initialized at path >> E:\JCR-REPO\testrepo\workspaces\defaul >> t >> 11:50:46,765 INFO [LocalFileSystem] LocalFileSystem initialized at path >> E:\JCR-REPO\testrepo\workspaces\defaul >> t\blobs >> 11:50:47,015 INFO [RepositoryImpl] workspace 'default' initialized >> 11:50:47,375 INFO [SearchIndex] Index initialized: >> E:/JCR-REPO/testrepo/repository/index >> 11:50:47,421 INFO [SearchIndex] Index initialized: >> E:\JCR-REPO\testrepo\workspaces\default/index >> 11:50:47,421 INFO [RepositoryImpl] Repository started >> 11:50:47,421 INFO [jcr/local] Created repository >> ([EMAIL PROTECTED]) >> 11:50:47,421 INFO [jcr/local] Created repository handle >> ([EMAIL PROTECTED] >> ) >> 11:50:47,437 INFO [ConnectionFactoryBindingService] Bound >> ConnectionManager >> 'jboss.jca:service=ConnectionFacto >> ryBinding,name=jcr/local' to JNDI name 'java:jcr/local' >> >> My code to lookup the repository >> ----------------------------------------- >> Hashtable env = new Hashtable(); >> env.put(Context.INITIAL_CONTEXT_FACTORY, >> "org.jnp.interfaces.NamingContextFactory"); >> env.put(Context.PROVIDER_URL, "jnp://localhost:1099"); >> env.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces"); >> Context ctx = new InitialContext(env); >> Repository repository = (Repository) ctx.lookup("java:jcr/local"); >> >> And I get >> ------------ >> Exception in thread "main" javax.naming.NameNotFoundException: jcr not >> bound >> at org.jnp.server.NamingServer.getBinding(NamingServer.java:529) >> at org.jnp.server.NamingServer.getBinding(NamingServer.java:537) >> at org.jnp.server.NamingServer.getObject(NamingServer.java:543) >> at org.jnp.server.NamingServer.lookup(NamingServer.java:267) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java >> :39) >> at >> sun.reflect.DelegatingMethodAccessorImpl.invoke( >> DelegatingMethodAccessorImpl.java:25) >> at java.lang.reflect.Method.invoke(Method.java:585) >> at >> sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294) >> at sun.rmi.transport.Transport$1.run(Transport.java:153) >> at java.security.AccessController.doPrivileged(Native Method) >> at sun.rmi.transport.Transport.serviceCall(Transport.java:149) >> at >> sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460) >> at >> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java >> :701) >> at java.lang.Thread.run(Thread.java:595) >> at >> sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown >> Source) >> at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source) >> at sun.rmi.server.UnicastRef.invoke(Unknown Source) >> at org.jnp.server.NamingServer_Stub.lookup(Unknown Source) >> at >> org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625) >> at >> org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587) >> at javax.naming.InitialContext.lookup(Unknown Source) >> at MyHop.main(MyHop.java:46) >> >> Can anybody figure out what I am missing? >> >> Thanks in advance >> ~ Kalyan Sarkar >> -- >> View this message in context: >> http://www.nabble.com/Jackrabbit-1.2.3-on-JBoss-4.0.4-GA-tf3524371.html#a9832523 >> Sent from the Jackrabbit - Users mailing list archive at Nabble.com. >> >> > > > -- > > José B. Camacho Taboada > > -- View this message in context: http://www.nabble.com/Jackrabbit-1.2.3-on-JBoss-4.0.4-GA-tf3524371.html#a9835503 Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
