PUBLIC - Liferay Portal Community Edition
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-20005

Adding a new user doesnt work with PostgreSQL 9.0 read-writer configuration

    Details

    • Type: Bug Bug
    • Status: Closed
    • Resolution: No Longer Reproducible
    • Affects Version/s: 6.0.6 GA
    • Fix Version/s: 6.1.30 EE GA3, 6.2.0 CE M2
    • Labels:
      None
    • Environment:
      Debian Squeeze, PostgreSQL 9.0 (installed via Debian-Backports), one master-db, one slave-db (hotstandby, synchronized using the streaming replication feature of postgresql9), tomcat 6 shipped with debian squeeze, liferay-portal-6.0.6-20110225.war
    • Similar Issues:
      Show 4 results 

      Description

      Startup of liferay works, but adding a new user fails with "com.liferay.portal.kernel.exception.SystemException: java.sql.SQLException: Table not found in statement [select currentId from Counter where name = ?]". Please take a look at the attached part of catalina.out for full error message.

      We are using postgresql-9.0-801.jdbc4.jar.

      Our portal-ext.properties:

      jdbc.read.driverClassName=org.postgresql.Driver
      jdbc.read.url=jdbc:postgresql://<db-ip>:5432/<dbname>?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
      jdbc.read.username=user
      jdbc.read.password=pw

      jdbc.write.driverClassName=org.postgresql.Driver
      jdbc.write.url=jdbc:postgresql://<db-ip>:5432/<dbname>?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
      jdbc.write.username=user
      jdbc.write.password=pw

      spring.configs=\
      #META-INF/audit-spring.xml,\
      #META-INF/monitoring-spring.xml,\
      META-INF/base-spring.xml,\
      META-INF/hibernate-spring.xml,\
      META-INF/infrastructure-spring.xml,\
      META-INF/management-spring.xml,\
      META-INF/util-spring.xml,\
      META-INF/editor-spring.xml,\
      META-INF/jcr-spring.xml,\
      META-INF/messaging-spring.xml,\
      META-INF/scheduler-spring.xml,\
      META-INF/search-spring.xml,\
      META-INF/counter-spring.xml,\
      META-INF/document-library-spring.xml,\
      META-INF/lock-spring.xml,\
      META-INF/mail-spring.xml,\
      META-INF/portal-spring.xml,\
      META-INF/portlet-container-spring.xml,\
      META-INF/wsrp-spring.xml,\
      META-INF/mirage-spring.xml,\
      META-INF/dynamic-data-source-spring.xml,\
      META-INF/ext-spring.xml,\
      META-INF/workflow-spring.xml,\
      META-INF/messaging-core-spring.xml,\
      META-INF/messaging-misc-spring.xml,\
      META-INF/ldap-spring.xml
      #META-INF/service-builder-spring.xml,\
      #META-INF/cluster-spring.xml,\
      #META-INF/jpa-spring.xml,\
      #META-INF/poller-spring.xml,\
      #META-INF/counter-spring.xml,\
      #META-INF/rules-spring.xml,\
      #META-INF/memcached-spring.xml

      liferay.home=/path/to/liferay

      #Performance-Tuning:
      last.modified.check=false
      theme.css.fast.load=true
      javascript.fast.load=true

      The error doesnt occur with default databaseconfiguration.
      Any help greatly appreciated!

      With kind regards
      Sebastian

      1. catalina.out
        23 kB
        Sebastian Schaefer

        Activity

        Hide
        Ryan Wan added a comment -

        Hi Sebastian,

        Thanks for the report. I have test this with a new installed PostgreSQL 9.0.4-1, but I can't reproduce the issue you're having.
        Please ensure you are running Liferay in a clean environment that no other issues can involve.
        If you still experiencing from this problem, please update this ticket with more information on how you encountered this.

        Thanks.

        Show
        Ryan Wan added a comment - Hi Sebastian, Thanks for the report. I have test this with a new installed PostgreSQL 9.0.4-1, but I can't reproduce the issue you're having. Please ensure you are running Liferay in a clean environment that no other issues can involve. If you still experiencing from this problem, please update this ticket with more information on how you encountered this. Thanks.
        Hide
        Sebastian Schaefer added a comment -

        Hi Ryan,

        thanks for your effort. Unfortunately the problem still exists.
        Additional information:

        All three servers (Applicationserver with liferay, postgresql-master, postgresql-standby) are running on debian 6 (squeeze).
        We are using postgresql 9 shipped with debian-backports (version 9.0.4-1~bpo60+1). The setup of master and hot-standby is the same as discribed at http://www.postgresql.org/docs/9.0/interactive/warm-standby.html#STREAMING-REPLICATION.
        The application server is a clean debian with tomcat6 (6.0.28-9+squeeze1) and the liferay-portal-6.0.6-20110225.war.
        If i run liferay with default databaseconfig on a single database instance, everything works fine. But if i change to the configuration described in my ticket, i can run and browse liferay, i can see open database connections on both master and hot-standby, but i cannot add a new user.
        This is how i tryed it:
        Loginto liferay as test@liferay.com, go to the control panel, go to the user management section and add a user. After a few seconds i get an error message from liferay, that this function is not available, and the catalina.out contains the error "com.liferay.portal.kernel.exception.SystemException: java.sql.SQLException: Table not found in statement [select currentId from Counter where name = ?]". I checked the liferay database instance, and the table Counter with the culomn currentId exists. Which is not surprising as i can add a user if i run liferay with a default database connection.

        If you need more detailed information, please dont hesitate to ask!

        Thanks and best regards
        Sebastian

        Show
        Sebastian Schaefer added a comment - Hi Ryan, thanks for your effort. Unfortunately the problem still exists. Additional information: All three servers (Applicationserver with liferay, postgresql-master, postgresql-standby) are running on debian 6 (squeeze). We are using postgresql 9 shipped with debian-backports (version 9.0.4-1~bpo60+1). The setup of master and hot-standby is the same as discribed at http://www.postgresql.org/docs/9.0/interactive/warm-standby.html#STREAMING-REPLICATION . The application server is a clean debian with tomcat6 (6.0.28-9+squeeze1) and the liferay-portal-6.0.6-20110225.war. If i run liferay with default databaseconfig on a single database instance, everything works fine. But if i change to the configuration described in my ticket, i can run and browse liferay, i can see open database connections on both master and hot-standby, but i cannot add a new user. This is how i tryed it: Loginto liferay as test@liferay.com, go to the control panel, go to the user management section and add a user. After a few seconds i get an error message from liferay, that this function is not available, and the catalina.out contains the error "com.liferay.portal.kernel.exception.SystemException: java.sql.SQLException: Table not found in statement [select currentId from Counter where name = ?] ". I checked the liferay database instance, and the table Counter with the culomn currentId exists. Which is not surprising as i can add a user if i run liferay with a default database connection. If you need more detailed information, please dont hesitate to ask! Thanks and best regards Sebastian
        Hide
        Sebastian Schaefer added a comment -

        Hi Ryan,

        a collegue of mine just took a look at the counter-spring.xml and the portal.properties file. It seems that adding the line

        counter.jdbc.prefix=jdbc.write

        to portal-ext.properties does the trick. I will test it next week and keep you informed. If this is working i think its worth to add this to the liferay administration guide! Maybe this is also the solution for the problem described in the ticket http://issues.liferay.com/browse/LPS-12802 ?

        With kind regards
        Sebastian

        Show
        Sebastian Schaefer added a comment - Hi Ryan, a collegue of mine just took a look at the counter-spring.xml and the portal.properties file. It seems that adding the line counter.jdbc.prefix=jdbc.write to portal-ext.properties does the trick. I will test it next week and keep you informed. If this is working i think its worth to add this to the liferay administration guide! Maybe this is also the solution for the problem described in the ticket http://issues.liferay.com/browse/LPS-12802 ? With kind regards Sebastian

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Days since last comment:
              3 years, 49 weeks, 4 days ago

              Development

                Structure Helper Panel