2 Replies Latest reply on Mar 16, 2010 10:20 PM by guy bashan

    Seam, Hiberante and javax.naming.NamingException: Context is read only

    guy bashan Apprentice

      Hi,


      I have been using Seam for over an year and never was able to solve an exception that I am getting whenever the server going up. everything is working fine, but I keep getting this exception (I am working with Hibernate):




      11:34:23,301 WARN  [SessionFactoryObjectFactory] Could not bind factory to JNDI
      javax.naming.NamingException: Context is read only
           at org.apache.naming.NamingContext.checkWritable(NamingContext.java:903)
           at org.apache.naming.NamingContext.bind(NamingContext.java:831)
           at org.apache.naming.NamingContext.rebind(NamingContext.java:208)
           at org.hibernate.util.NamingHelper.bind(NamingHelper.java:97)
           at org.hibernate.impl.SessionFactoryObjectFactory.addInstance(SessionFactoryObjectFactory.java:113)
           at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:338)
           at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1327)
           at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)
           at org.jboss.seam.persistence.HibernateSessionFactory.createSessionFactory(HibernateSessionFactory.java:165)
           at org.jboss.seam.persistence.HibernateSessionFactory.startup(HibernateSessionFactory.java:79)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:597)
           at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
           at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144)
           at org.jboss.seam.Component.callComponentMethod(Component.java:2249)
           at org.jboss.seam.Component.callCreateMethod(Component.java:2172)
           at org.jboss.seam.Component.newInstance(Component.java:2132)
           at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304)
           at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278)
           at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:116)
           at org.jboss.seam.init.Initialization.init(Initialization.java:740)
           at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:36)
           at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934)
           at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429)
           at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
           at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
           at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
           at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630)
           at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:556)
           at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:491)
           at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206)
           at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
           at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
           at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
           at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
           at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
           at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
           at org.apache.catalina.core.StandardService.start(StandardService.java:516)
           at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
           at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:597)
           at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
           at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)