0

私のtomcat(7.0.34)はエラーを次のように表示します

ネーミング コンテキストの作成に失敗しました: javax.naming.OperationNotSupportedException: コンテキストは読み取り専用です

起動時。しかし、私は理由を知りませんか?そして、それを修正する方法は?

アップデート

ログ:

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
4

3 に答える 3

3

Java EE 仕様のセクション 5.3.4 では、ネーミング コンテキストは読み取り専用である必要があり、変更要求で OperationNotSupportedExceptions をスローする必要があると規定されています。残念ながら、これはあなたの質問に直接答えるものではありませんが、ヒントになるかもしれません

仕様からの引用:

コンテナは、アプリケーション コンポーネント インスタンスがネーミング コンテキストへの読み取りアクセスのみを持つようにする必要があります。コンテナは、環境ネーミング コンテキストとそのサブコンテキストを変更する javax.naming.Context インターフェイスのすべてのメソッドから javax.naming.OperationNotSupportedException をスローする必要があります。

于 2013-03-11T15:35:02.810 に答える
-1

最近、同じエラーが発生しました。これは、JNDI サーバーの URL にスラッシュがないという構成エラーが原因でした。

だから私は持っていた

java.naming.provider.url=tcp:/10.211.55.3:7222

それ以外の

java.naming.provider.url=tcp://10.211.55.3:7222
于 2013-11-06T06:41:24.397 に答える