我正在开发一个使用Jersey Servlet (1.18.1)的Java Web服务项目。当将EAR文件部署到Jboss WildFly (8.1.0)时,出现了以下错误,并且我不确定为什么会出错,因为这个相同的EAR文件在JBoss7 (7.1.1)中部署并且100%工作正常。
错误堆栈跟踪如下:
java.lang.UnsupportedOperationException: JBAS011859: Naming context is read-only
at org.jboss.as.naming.WritableServiceBasedNamingStore.requireOwner(WritableServiceBasedNamingStore.java:126)
at org.jboss.as.naming.WritableServiceBasedNamingStore.createSubcontext(WritableServiceBasedNamingStore.java:116)
at org.jboss.as.naming.NamingContext.createSubcontext(NamingContext.java:338)
at org.jboss.as.naming.InitialContext.createSubcontext(InitialContext.java:229)
at org.jboss.as.naming.NamingContext.createSubcontext(NamingContext.java:346)
at javax.naming.InitialContext.createSubcontext(InitialContext.java:464)
at com.sun.jersey.server.impl.cdi.CDIExtension$1.stepInto(CDIExtension.java:280)