2 Replies Latest reply on Sep 23, 2010 8:51 AM by David Marquez

    error tomcat+postgres

    David Marquez Newbie

      I am trying to  connect my gatein with postgres, but I get this error.
      I created a  database named jdbcjcr_portal.

       

       

      org.exoplatform.services.naming.InitialContextInitializer addPlugin
      SEVERE: Could not bind: java:jdbcjcr_portal
      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.apache.naming.NamingContext.rebind(NamingContext.java:223)
          at org.apache.naming.SelectorContext.rebind(SelectorContext.java:207)
          at javax.naming.InitialContext.rebind(InitialContext.java:425)
          at org.exoplatform.services.naming.InitialContextInitializer.addPlugin(InitialContextInitializer.java:173)
          at org.exoplatform.commons.InitialContextInitializer2.addPlugin(InitialContextInitializer2.java:64)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:616)
          at org.exoplatform.container.jmx.MX4JComponentAdapter.addComponentPlugin(MX4JComponentAdapter.java:148)
          at org.exoplatform.container.jmx.MX4JComponentAdapter.getComponentInstance(MX4JComponentAdapter.java:106)
          at org.exoplatform.container.management.ManageableComponentAdapter.getComponentInstance(ManageableComponentAdapter.java:68)
          at org.exoplatform.container.ConcurrentPicoContainer.getInstance(ConcurrentPicoContainer.java:400)
          at org.exoplatform.container.ConcurrentPicoContainer.getComponentInstanceOfType(ConcurrentPicoContainer.java:389)
          at org.exoplatform.container.CachingContainer.getComponentInstanceOfType(CachingContainer.java:139)
          at org.exoplatform.container.ExoContainer.createComponent(ExoContainer.java:311)
          at org.exoplatform.container.jmx.MX4JComponentAdapter.getComponentInstance(MX4JComponentAdapter.java:94)
          at org.exoplatform.container.management.ManageableComponentAdapter.getComponentInstance(ManageableComponentAdapter.java:68)
          at org.exoplatform.container.ConcurrentPicoContainer.getInstance(ConcurrentPicoContainer.java:400)
          at org.exoplatform.container.ConcurrentPicoContainer.getComponentInstanceOfType(ConcurrentPicoContainer.java:389)
          at org.exoplatform.container.CachingContainer.getComponentInstanceOfType(CachingContainer.java:139)
          at org.exoplatform.container.ExoContainer.createComponent(ExoContainer.java:311)
          at org.exoplatform.container.jmx.MX4JComponentAdapter.getComponentInstance(MX4JComponentAdapter.java:94)
          at org.exoplatform.container.management.ManageableComponentAdapter.getComponentInstance(ManageableComponentAdapter.java:68)
          at org.exoplatform.container.ConcurrentPicoContainer.getInstance(ConcurrentPicoContainer.java:400)
          at org.exoplatform.container.ConcurrentPicoContainer.getComponentInstanceOfType(ConcurrentPicoContainer.java:389)
          at org.exoplatform.container.CachingContainer.getComponentInstanceOfType(CachingContainer.java:139)
          at org.exoplatform.container.ExoContainer.createComponent(ExoContainer.java:311)
          at org.exoplatform.container.jmx.MX4JComponentAdapter.getComponentInstance(MX4JComponentAdapter.java:94)
          at org.exoplatform.container.management.ManageableComponentAdapter.getComponentInstance(ManageableComponentAdapter.java:68)
          at org.exoplatform.container.ConcurrentPicoContainer.getInstance(ConcurrentPicoContainer.java:400)
          at org.exoplatform.container.ConcurrentPicoContainer.getComponentInstancesOfType(ConcurrentPicoContainer.java:350)
          at org.exoplatform.container.CachingContainer.getComponentInstancesOfType(CachingContainer.java:111)
          at org.picocontainer.defaults.LifecycleVisitor.visitContainer(LifecycleVisitor.java:97)
          at org.exoplatform.container.ConcurrentPicoContainer.accept(ConcurrentPicoContainer.java:506)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:616)
          at org.picocontainer.defaults.AbstractPicoVisitor.traverse(AbstractPicoVisitor.java:32)
          at org.picocontainer.defaults.LifecycleVisitor.traverse(LifecycleVisitor.java:63)
          at org.picocontainer.defaults.LifecycleVisitor.start(LifecycleVisitor.java:113)
          at org.exoplatform.container.ConcurrentPicoContainer.start(ConcurrentPicoContainer.java:453)
          at org.exoplatform.container.ExoContainer.start(ExoContainer.java:186)
          at org.exoplatform.container.PortalContainer.start(PortalContainer.java:595)
          at org.exoplatform.container.ExoContainer.start(ExoContainer.java:180)
          at org.exoplatform.container.RootContainer.createPortalContainer(RootContainer.java:338)
          at org.exoplatform.container.RootContainer.registerPortalContainer(RootContainer.java:212)
          at org.exoplatform.portal.application.PortalController.afterInit(PortalController.java:114)
          at org.exoplatform.container.web.AbstractHttpServlet.init(AbstractHttpServlet.java:72)
          at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173)
          at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:993)
          at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4149)
          at org.apache.catalina.core.StandardContext.start(StandardContext.java:4458)
          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:57)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:616)
          at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
          at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

        • 1. Re: error tomcat+postgres
          Khoi Nguyen Novice

          How is your config file?

          • 2. Re: error tomcat+postgres
            David Marquez Newbie

            # DB
            gatein.db.data.dir=${gatein.data.dir}/db

             

            # JCR
            gatein.jcr.config.type=local
            gatein.jcr.datasource.name=java:jdbcjcr_portal
            gatein.jcr.datasource.dialect=pgsql

             

            gatein.jcr.datasource.driver=org.postgresql.Driver
            gatein.jcr.datasource.url=jdbc:postgresql://localhost:5432/jdbcjcr_portal
            gatein.jcr.datasource.username=postgres   
            gatein.jcr.datasource.password=postgres

             

            gatein.jcr.data.dir=${gatein.data.dir}/jcr
            gatein.jcr.storage.data.dir=${gatein.jcr.data.dir}/values
            gatein.jcr.index.data.dir=${gatein.jcr.data.dir}/lucene
            gatein.jcr.index.changefilterclass=org.exoplatform.services.jcr.impl.core.query.DefaultChangesFilter

             


            #######################################3

             

             

             


            #gatein.jcr.data.dir=${gatein.data.dir}/jcr
            #gatein.jcr.storage.data.dir=${gatein.jcr.data.dir}/values
            #gatein.jcr.cache.config=classpath:/conf/jcr/jbosscache/${gatein.jcr.config.type}/config.xml
            #gatein.jcr.lock.cache.config=classpath:/conf/jcr/jbosscache/${gatein.jcr.config.type}/lock-config.xml
            #gatein.jcr.index.data.dir=${gatein.jcr.data.dir}/lucene
            #gatein.jcr.index.changefilterclass=org.exoplatform.services.jcr.impl.core.query.DefaultChangesFilter
            #gatein.jcr.index.cache.config=classpath:/conf/jcr/jbosscache/cluster/indexer-config.xml
            #gatein.jcr.jgroups.config=classpath:/conf/jcr/jbosscache/cluster/udp-mux.xml

             

            # IDM
            gatein.idm.datasource.name=jdbcidm
            gatein.idm.datasource.driver=org.hsqldb.jdbcDriver
            gatein.idm.datasource.url=jdbc:hsqldb:file:${gatein.db.data.dir}/data/jdbcidm_${name}
            gatein.idm.datasource.username=sa
            gatein.idm.datasource.password=

             

            # Arjuna configuration
            com.arjuna.ats.arjuna.objectstore.objectStoreDir=${gatein.data.dir}/jta

             

            # EMail
            gatein.email.smtp.username=
            gatein.email.smtp.password=
            gatein.email.smtp.host=smtp.gmail.com
            gatein.email.smtp.port=465
            gatein.email.smtp.starttls.enable=true
            gatein.email.smtp.auth=true
            gatein.email.smtp.socketFactory.port=465
            gatein.email.smtp.socketFactory.class=javax.net.ssl.SSLSocketFactory