我的 tomcat(7.0.34) 显示错误为
Creation of the naming context failed: javax.naming.OperationNotSupportedException: Context is read only
启动时。但我不知道为什么?以及如何解决?
更新
日志:
Info: Starting Servlet Engine: Apache Tomcat/7.0.34
Mar 11, 2013 9:43:18 PM org.apache.catalina.core.NamingContextListener lifecycleEvent
Critical: Creation of the naming context failed: javax.naming.OperationNotSupportedException: Context is read only
Mar 11, 2013 9:43:18 PM org.apache.coyote.AbstractProtocol start
Info: Starting ProtocolHandler ["ajp-bio-8081"]
Mar 11, 2013 9:43:18 PM org.apache.catalina.core.StandardService startInternal
Info: Starting service ChongWuXingQiu
Mar 11, 2013 9:43:18 PM org.apache.catalina.core.StandardEngine startInternal
Info: Starting Servlet Engine: Apache Tomcat/7.0.34
Mar 11, 2013 9:43:18 PM org.apache.catalina.core.NamingContextListener lifecycleEvent
Critical: Creation of the naming context failed: javax.naming.OperationNotSupportedException: Context is read only
Mar 11, 2013 9:43:18 PM org.apache.coyote.AbstractProtocol start
Info: Starting ProtocolHandler ["ajp-bio-8082"]
Mar 11, 2013 9:43:18 PM org.apache.catalina.startup.Catalina start
Info: Server startup in 1753 ms
最佳答案
Java EE 规范在第 5.3.4 节中指出,命名上下文必须是只读的,并且必须在更改请求时抛出 OperationNotSupportedExceptions。不幸的是,这并没有直接回答你的问题,但可能是一个提示
引自spec :
The container must ensure that the application component instances have only read access to their naming context. The container must throw the javax.naming.OperationNotSupportedException from all the methods of the javax.naming.Context interface that modify the environment naming context and its subcontexts.
关于jakarta-ee - tomcat启动时出现 "javax.naming.OperationNotSupportedException"是什么原因,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15340218/