javax.naming.NamingException: java:comp namespace cannot be modified
Hi,
I'm using the SunAppServer that is part of the Java Studio Creator 2 update 1 (version 8.2 I believe) and have the following problem I need help solving:
In my web app I have a Springframework ApplicationContext being instantiated via a Listener (org.springframework.web.context.ContextLoaderListener). This is in turn instantiating a java bean that is trying to bind an object into JNDI under a name in the formate "java:/com/mycompany/mybean", which fails with the following exception:
javax.naming.NamingException: java:comp namespace cannot be modified
at com.sun.enterprise.naming.java.javaURLContext.createSubcontext(javaURLContext.j ava:261)
at com.sun.enterprise.naming.SerialContext.createSubcontext(SerialContext.java:588 )
at com.sun.enterprise.naming.SerialContext.createSubcontext(SerialContext.java:617 )
at javax.naming.InitialContext.createSubcontext(InitialContext.java:427)
Is it a permission issue? (how do I rectify?)
Do I need to bind not under java:comp ? (if so, how?)
Any help much appreciated,
Regards,
Sean
P.S. Similar code works fine under OC4J

