jakarta-ee - tomcat启动时出现 "javax.naming.OperationNotSupportedException"是什么原因

标签 jakarta-ee tomcat jndi

我的 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/

相关文章:

java - 是否有任何 native 机制可以让我们覆盖现有部署的 Struts2 应用程序中的类?

java - 找不到符号 HibernateUtil

tomcat - IDEA中查看Tomcat上下文启动异常

ldap - JNDI-LDAP 分页

java - 在 Shiro 中为 JNDILdapRealm 配置授权

java - JPA:读取并坚持一个事务,同时阻塞不同线程中的读取

tomcat - JAXB - Tomcat 服务器上的 permGen 错误

java - Tomcat server.xml SSLEnable 问题

jakarta-ee - EJB 请求对自身的引用?

java - 可自行部署的 Java EE 应用程序