5 Replies Latest reply on Mar 25, 2010 1:48 PM by Art Munro

    Gatein and Postgresql DB

    Art Munro Novice

      Tried to follow the user guide for mysql but used the postgre settings but did not work,,  I have configured the following settings.  Are there any other settings that need to be done?

       

      db = gatein_portal

      user = dbuser

      pass = dbpassword

       

      user has full access to db.  and the db server is located on a seperate server

       

      root/gatein/conf/configuration.properties file

       

      # JCR
      gatein.jcr.config.type=local
      gatein.jcr.datasource.name=jdbcjcr
      gatein.jcr.datasource.dialect=auto
      gatein.jcr.datasource.driver=org.postgresql.Driver
      gatein.jcr.datasource.url=jdbc:postgresql://ipaddress_of_db:5432/gateindb_${container.name.suffix}
      gatein.jcr.datasource.username=dbuser
      gatein.jcr.datasource.password=dbpassword

       

       

      thoughts?

       

      ps mu idm is connected to ldap for users.  Im assuming i dont need to change anything in the config file for that.

        • 1. Re: Gatein and Postgresql DB
          Prabhat Jha Master

          I am assuming you are using 3.0.0.Final version. What error are you getting? Also you mentioned that you modified root/gatein/conf/configuration.properties file. It should be $GATEIN_HOME/server/default/conf/gatein/configuration.properties

          • 2. Re: Gatein and Postgresql DB - on Tomcat
            Art Munro Novice

            Sorry should have put more on the environment.  This is on Ubunto 8.04 and the tomcat deployment with jdk1.6 and postgresql type 4 driver

             

            A dresh install on server A and DB on Server B.  change configs as above and resulting stack...

             

             

            SEVERE: Error while destroying a portal session

            java.lang.NullPointerException

            at org.exoplatform.portal.application.PortalSessionListener.onSessionCreated(PortalSessionListener.java:75)

            at org.exoplatform.container.web.AbstractHttpSessionListener.sessionCreated(AbstractHttpSessionListener.java:71)

            at org.apache.catalina.session.StandardSession.tellNew(StandardSession.java:397)

            at org.apache.catalina.session.StandardSession.setId(StandardSession.java:369)

            at org.apache.catalina.session.ManagerBase.createSession(ManagerBase.java:827)

            at org.apache.catalina.connector.Request.doGetSession(Request.java:2324)

            at org.apache.catalina.connector.Request.getSession(Request.java:2074)

            at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:833)

            at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:844)

            at org.apache.jasper.runtime.PageContextImpl._initialize(PageContextImpl.java:146)

            at org.apache.jasper.runtime.PageContextImpl.initialize(PageContextImpl.java:124)

            at org.apache.jasper.runtime.JspFactoryImpl.internalGetPageContext(JspFactoryImpl.java:107)

            at org.apache.jasper.runtime.JspFactoryImpl.getPageContext(JspFactoryImpl.java:63)

            at org.apache.jsp.index_jsp._jspService(index_jsp.java:46)

            at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)

            at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

            at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)

            at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)

            at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)

            at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

            at org.exoplatform.web.CacheUserProfileFilter.doFilter(CacheUserProfileFilter.java:68)

            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

            at org.exoplatform.services.security.web.SetCurrentIdentityFilter.doFilter(SetCurrentIdentityFilter.java:76)

            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

            at org.exoplatform.web.filter.ExtensibleFilter$ExtensibleFilterChain.doFilter(ExtensibleFilter.java:112)

            at org.exoplatform.web.filter.ExtensibleFilter.doFilter(ExtensibleFilter.java:84)

            at org.exoplatform.web.filter.GenericFilter.doFilter(GenericFilter.java:66)

            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

            at org.exoplatform.web.login.ClusteredSSOFilter.doFilter(ClusteredSSOFilter.java:73)

            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)

            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

            at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)

            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)

            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)

            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)

            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)

            at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)

            at java.lang.Thread.run(Thread.java:619)

            Mar 25, 2010 8:32:05 AM org.exoplatform.web.CacheUserProfileFilter doFilter

            WARNING: An error occured while cache user profile

            org.apache.jasper.JasperException: java.lang.RuntimeException: Cannot instantiate component key=org.exoplatform.portal.config.UserPortalConfigService type=org.exoplatform.portal.config.UserPortalConfigService found at jndi:/localhost/portal/WEB-INF/conf/configuration.xml

            at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522)

            at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:416)

            at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)

            at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)

            at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

            at org.exoplatform.web.CacheUserProfileFilter.doFilter(CacheUserProfileFilter.java:68)

            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

            at org.exoplatform.services.security.web.SetCurrentIdentityFilter.doFilter(SetCurrentIdentityFilter.java:76)

            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

            at org.exoplatform.web.filter.ExtensibleFilter$ExtensibleFilterChain.doFilter(ExtensibleFilter.java:112)

            at org.exoplatform.web.filter.ExtensibleFilter.doFilter(ExtensibleFilter.java:84)

            at org.exoplatform.web.filter.GenericFilter.doFilter(GenericFilter.java:66)

            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

            at org.exoplatform.web.login.ClusteredSSOFilter.doFilter(ClusteredSSOFilter.java:73)

            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)

            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

            at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)

            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)

            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)

            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)

            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)

            at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)

            at java.lang.Thread.run(Thread.java:619)

            Caused by: java.lang.RuntimeException: Cannot instantiate component key=org.exoplatform.portal.config.UserPortalConfigService type=org.exoplatform.portal.config.UserPortalConfigService found at jndi:/localhost/portal/WEB-INF/conf/configuration.xml

            at org.exoplatform.container.jmx.MX4JComponentAdapter.getComponentInstance(MX4JComponentAdapter.java:113)

            at org.exoplatform.container.management.ManageableComponentAdapter.getComponentInstance(ManageableComponentAdapter.java:68)

            at org.picocontainer.defaults.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:322)

            at org.picocontainer.defaults.DefaultPicoContainer.getComponentInstanceOfType(DefaultPicoContainer.java:313)

            at org.exoplatform.container.CachingContainer.getComponentInstanceOfType(CachingContainer.java:134)

            at org.apache.jsp.index_jsp._jspService(index_jsp.java:61)

            at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)

            at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

            at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)

            ... 30 more

            Caused by: java.lang.RuntimeException: Cannot instantiate component key=org.exoplatform.portal.config.DataStorage type=org.exoplatform.portal.config.DataStorageImpl found at jndi:/localhost/portal/WEB-INF/conf/configuration.xml

            at org.exoplatform.container.jmx.MX4JComponentAdapter.getComponentInstance(MX4JComponentAdapter.java:113)

            at org.exoplatform.container.management.ManageableComponentAdapter.getComponentInstance(ManageableComponentAdapter.java:68)

            at org.picocontainer.defaults.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:322)

            at org.picocontainer.defaults.DefaultPicoContainer.getComponentInstanceOfType(DefaultPicoContainer.java:313)

            at org.exoplatform.container.CachingContainer.getComponentInstanceOfType(CachingContainer.java:134)

            at org.exoplatform.container.ExoContainer.createComponent(ExoContainer.java:197)

            at org.exoplatform.container.jmx.MX4JComponentAdapter.getComponentInstance(MX4JComponentAdapter.java:84)

            ... 38 more

            Caused by: java.lang.RuntimeException: Cannot instantiate component key=org.exoplatform.portal.pom.data.ModelDataStorage type=org.exoplatform.portal.pom.config.POMDataStorage found at jndi:/localhost/portal/WEB-INF/conf/configuration.xml

            at org.exoplatform.container.jmx.MX4JComponentAdapter.getComponentInstance(MX4JComponentAdapter.java:113)

            at org.exoplatform.container.management.ManageableComponentAdapter.getComponentInstance(ManageableComponentAdapter.java:68)

            at org.picocontainer.defaults.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:322)

            at org.picocontainer.defaults.DefaultPicoContainer.getComponentInstanceOfType(DefaultPicoContainer.java:313)

            at org.exoplatform.container.CachingContainer.getComponentInstanceOfType(CachingContainer.java:134)

            at org.exoplatform.container.ExoContainer.createComponent(ExoContainer.java:197)

            at org.exoplatform.container.jmx.MX4JComponentAdapter.getComponentInstance(MX4JComponentAdapter.java:84)

            ... 44 more

            Caused by: java.lang.RuntimeException: Cannot instantiate component key=org.exoplatform.portal.pom.config.POMSessionManager type=org.exoplatform.portal.pom.config.POMSessionManager found at jndi:/localhost/portal/WEB-INF/conf/configuration.xml

            at org.exoplatform.container.jmx.MX4JComponentAdapter.getComponentInstance(MX4JComponentAdapter.java:113)

            at org.exoplatform.container.management.ManageableComponentAdapter.getComponentInstance(ManageableComponentAdapter.java:68)

            at org.picocontainer.defaults.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:322)

            at org.picocontainer.defaults.DefaultPicoContainer.getComponentInstanceOfType(DefaultPicoContainer.java:313)

            at org.exoplatform.container.CachingContainer.getComponentInstanceOfType(CachingContainer.java:134)

            at org.exoplatform.container.ExoContainer.createComponent(ExoContainer.java:197)

            at org.exoplatform.container.jmx.MX4JComponentAdapter.getComponentInstance(MX4JComponentAdapter.java:84)

            ... 50 more

            Caused by: java.lang.RuntimeException: Cannot instantiate component key=org.exoplatform.services.jcr.RepositoryService type=org.exoplatform.services.jcr.impl.RepositoryServiceImpl found at jndi:/localhost/portal/WEB-INF/conf/configuration.xml

            at org.exoplatform.container.jmx.MX4JComponentAdapter.getComponentInstance(MX4JComponentAdapter.java:113)

            at org.exoplatform.container.management.ManageableComponentAdapter.getComponentInstance(ManageableComponentAdapter.java:68)

            at org.picocontainer.defaults.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:322)

            at org.picocontainer.defaults.DefaultPicoContainer.getComponentInstanceOfType(DefaultPicoContainer.java:313)

            at org.exoplatform.container.CachingContainer.getComponentInstanceOfType(CachingContainer.java:134)

            at org.exoplatform.container.ExoContainer.createComponent(ExoContainer.java:197)

            at org.exoplatform.container.jmx.MX4JComponentAdapter.getComponentInstance(MX4JComponentAdapter.java:84)

            ... 56 more

            Caused by: java.lang.RuntimeException: Cannot instantiate component key=org.exoplatform.services.jcr.config.RepositoryServiceConfiguration type=org.exoplatform.services.jcr.impl.config.RepositoryServiceConfigurationImpl found at jndi:/localhost/portal/WEB-INF/conf/configuration.xml

            at org.exoplatform.container.jmx.MX4JComponentAdapter.getComponentInstance(MX4JComponentAdapter.java:113)

            at org.exoplatform.container.management.ManageableComponentAdapter.getComponentInstance(ManageableComponentAdapter.java:68)

            at org.picocontainer.defaults.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:322)

            at org.picocontainer.defaults.DefaultPicoContainer.getComponentInstanceOfType(DefaultPicoContainer.java:313)

            at org.exoplatform.container.CachingContainer.getComponentInstanceOfType(CachingContainer.java:134)

            at org.exoplatform.container.ExoContainer.createComponent(ExoContainer.java:197)

            at org.exoplatform.container.jmx.MX4JComponentAdapter.getComponentInstance(MX4JComponentAdapter.java:84)

            ... 62 more

            Caused by: java.lang.reflect.InvocationTargetException

            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

            at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

            at java.lang.reflect.Constructor.newInstance(Constructor.java:513)

            at org.exoplatform.container.ExoContainer.createComponent(ExoContainer.java:207)

            at org.exoplatform.container.jmx.MX4JComponentAdapter.getComponentInstance(MX4JComponentAdapter.java:84)

            ... 68 more

            Caused by: org.exoplatform.services.jcr.config.RepositoryConfigurationException: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (The connection attempt failed.)

            at org.exoplatform.services.jcr.impl.config.JDBCConfigurationPersister.init(JDBCConfigurationPersister.java:141)

            at org.exoplatform.services.jcr.impl.config.RepositoryServiceConfigurationImpl.<init>(RepositoryServiceConfigurationImpl.java:89)

            ... 74 more

            Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (The connection attempt failed.)

            at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:855)

            at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)

            at org.exoplatform.services.jcr.impl.config.JDBCConfigurationPersister.openConnection(JDBCConfigurationPersister.java:201)

            at org.exoplatform.services.jcr.impl.config.JDBCConfigurationPersister.init(JDBCConfigurationPersister.java:132)

            ... 75 more

            Caused by: org.postgresql.util.PSQLException: The connection attempt failed.

            at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:150)

            at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)

            at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125)

            at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)

            at org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:22)

            at org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:30)

            at org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24)

            at org.postgresql.Driver.makeConnection(Driver.java:393)

            at org.postgresql.Driver.connect(Driver.java:267)

            at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:37)

            at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290)

            at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:877)

            at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:851)

            ... 78 more

            Caused by: java.net.UnknownHostException: ipaddress

            at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)

            at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)

            at java.net.Socket.connect(Socket.java:525)

            at java.net.Socket.connect(Socket.java:475)

            at java.net.Socket.<init>(Socket.java:372)

            at java.net.Socket.<init>(Socket.java:186)

            at org.postgresql.core.PGStream.<init>(PGStream.java:62)

            at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:76)

            ... 90 more

            • 3. Re: Gatein and Postgresql DB - on Tomcat
              Patrice Lamarque Novice

              Caused by: java.net.UnknownHostException: ipaddress

               

              can you ping the ipaddress you put in configuration.properties from gatein's host ?

              • 4. Re: Gatein and Postgresql DB - on Tomcat
                Art Munro Novice

                Sorry that was a  recreate error...

                 

                I can ping the DB and this is the bottom of the trace... looks ike the portal part of configs is not loading...

                 

                ... 74 more

                Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (FATAL: database "gateindb_${container.name.suffix}" does not exist)

                at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:855)

                at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)

                at org.exoplatform.services.jcr.impl.config.JDBCConfigurationPersister.openConnection(JDBCConfigurationPersister.java:201)

                at org.exoplatform.services.jcr.impl.config.JDBCConfigurationPersister.init(JDBCConfigurationPersister.java:132)

                ... 75 more

                Caused by: org.postgresql.util.PSQLException: FATAL: database "gateindb_${container.name.suffix}" does not exist

                at org.postgresql.core.v3.ConnectionFactoryImpl.readStartupMessages(ConnectionFactoryImpl.java:464)

                at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:112)

                at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)

                at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125)

                at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)

                at org.postgresql.jdbc3.Jdbc3Connection.<init>(Jdbc3Connection.java:24)

                at org.postgresql.Driver.makeConnection(Driver.java:393)

                at org.postgresql.Driver.connect(Driver.java:267)

                at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:37)

                at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290)

                at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:877)

                at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:851)

                • 5. Re: Gatein and Postgresql DB
                  Art Munro Novice

                  if i hard code _portal the connection works.  something to do with the loading of the config file.  replacing the _portal from the container.name.suffix

                   

                  Note this is on tomcat bundle

                   

                  Art