Hi all,
With reference to this post http://www.mail-archive.com/[email protected]/msg02126.html , I tried connecting to magnolia's repo . I deployed magnolia in JBoss4.0.5. Code: final Hashtable env = new Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); env.put(Context.PROVIDER_URL, "localhost"); InitialContext ctx = new InitialContext(env); System.out.println("After context load"); Repository repository = (Repository) ctx.lookup("magnolia"); Before deploying magnoliaAuthor.war, I replaced the dummy context with Jboss context factory org.jnp.interfaces.NamingContextFactory in repositories.xml. I end up with following exception : INFO [STDOUT] After context load [RepositoryImpl] Starting repository... [RepositoryLock] Existing lock file D:\jboss-4.0.5.GA\server\default\tmp\deploy\tmp55149magnoliaAuthor-exp.w ar\repositories\magnolia\.lock detected. Repository was not shut down properly. [STDERR] javax.naming.NamingException: Could not dereference object [Root exception is javax.jcr.RepositoryException: The repository home D:\jboss-4.0.5.GA\server\default\tmp\deploy\tmp55149magnoliaAuthor-exp.w ar\repositories\magnolia appears to be in use since the file named .lock is locked by another process.] [STDERR] at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingCont ext.java:1150) [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:705) [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587) [STDERR] at javax.naming.InitialContext.lookup(InitialContext.java:351) [STDERR] at SampleServlet.doProcess(SampleServlet.java:50) [STDERR] at SampleServlet.doGet(SampleServlet.java:80) [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:697) [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:252) [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:173) [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilte r.java:96) [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:202) [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:173) [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.java:213) [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.java:178) [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAs sociationValve.java:175) [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.j ava:74) [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :126) [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :105) [STDERR] at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnecti onValve.java:156) [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve. java:107) [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1 48) [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:86 9) [STDERR] at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc essConnection(Http11BaseProtocol.java:664) [STDERR] at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint .java:527) [STDERR] at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorker Thread.java:112) [STDERR] at java.lang.Thread.run(Thread.java:595) [STDERR] Caused by: javax.jcr.RepositoryException: The repository home D:\jboss-4.0.5.GA\server\default\tmp\deploy\tmp55149magnoliaAuthor-exp.w ar\repositories\magnolia appears to be in use since the file named .lock is locked by another process. [STDERR] at org.apache.jackrabbit.core.util.RepositoryLock.acquire(RepositoryLock.ja va:129) [STDERR] at org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:229 ) [STDERR] at org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:521 ) [STDERR] at org.apache.jackrabbit.core.jndi.BindableRepository.createRepository(Bind ableRepository.java:174) [STDERR] at org.apache.jackrabbit.core.jndi.BindableRepository.init(BindableReposito ry.java:138) [STDERR] at org.apache.jackrabbit.core.jndi.BindableRepository.create(BindableReposi tory.java:125) [STDERR] at org.apache.jackrabbit.core.jndi.BindableRepositoryFactory.createInstance (BindableRepositoryFactory.java:59) [STDERR] at org.apache.jackrabbit.core.jndi.BindableRepositoryFactory.getObjectInsta nce(BindableRepositoryFactory.java:81) [STDERR] at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304) [STDERR] at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:11 25) [STDERR] at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingCont ext.java:1142) [STDERR] ... 26 more Does anybody know how to solve this problem or am I missing any steps in connecting to magnolia repo? Thanks, Lakshmi This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly prohibited and may be unlawful. ---------------------------------------------------------------- for list details see http://documentation.magnolia.info/docs/en/editor/stayupdated.html ----------------------------------------------------------------
