1 Reply Latest reply on Apr 19, 2004 10:18 PM by Ben Wang

    javax.naming.NamingException: Context is read only

    fredrikoe Newbie

      I've solved the problem I had before with the XML parsing. It was due to that I had multiple versions of the xalan and xercesImpl jars in my web app.

      However, now I get the following exception while trying to create a JBossCache instance:

      DEBUG ServiceMBeanSupport.jbossInternalStart > Starting TreeCache
      ERROR DummyTransactionManager.getInstance > binding of DummyTransactionManager failed
      javax.naming.NamingException: Context is read only
      at org.apache.naming.NamingContext.checkWritable(NamingContext.java:942)
      at org.apache.naming.NamingContext.bind(NamingContext.java:870)
      at org.apache.naming.NamingContext.bind(NamingContext.java:212)
      at org.apache.naming.NamingContext.bind(NamingContext.java:228)
      at org.apache.naming.SelectorContext.bind(SelectorContext.java:217)
      at javax.naming.InitialContext.bind(InitialContext.java:362)
      at org.jboss.cache.transaction.DummyTransactionManager.getInstance(DummyTransactionManager.java:41)
      at org.jboss.cache.DummyTransactionManagerLookup.getTransactionManager(DummyTransactionManagerLookup.java:17)
      at org.jboss.cache.TreeCache.startService(TreeCache.java:801)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:266)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:167)
      at org.fao.foris.networking.positionlist.PositionListDAO.getPositionListOutputMembers(PositionListDAO.java:1067)
      at org.fao.foris.networking.positionlist.display.PositionListDisplayHelper.generateXmlDocument(PositionListDisplayHelper.java:192)
      at org.fao.foris.networking.positionlist.display.web.PositionListPageItemAction.preview(PositionListPageItemAction.java:318)
      at org.fao.foris.networking.positionlist.display.web.PositionListPageItemAction.perform(PositionListPageItemAction.java:86)
      at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1787)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1586)
      at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:492)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:531)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
      at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
      at java.lang.Thread.run(Thread.java:534)
      INFO TreeCache.startService > cache mode is repl_async


      I know that The JNDI context in Tomcat is read-only and the DummyTransactionManager is trying to put some values in it so that's why it fails. I don't think there is a way to configure Tomcat so that you'll be able to modify the JNDI context. Does anybody know a workaround for this problem? And by the way, is anyone running JBossCache on Tomcat 4 without problems?

      Thanks.

      / Fredrik