6 Replies Latest reply on Dec 8, 2006 3:23 PM by shawdav1

    Can't use MySQL with Portal 2.4

    simplex-software

      Greetings,

      After having followed the documentation in order to configure JBoss Portal 2.4.0 to work with MySQL i have lots of execeptions in the log file, such that:
      org.hibernate.MappingException: Unknown entity: org.jboss.portal.core.impl.portlet.state.PersistentState

      or

      org.hibernate.hql.ast.QuerySyntaxException: ObjectNode is not mapped [from ObjectNode where path=:path or path is null]

      or even

      com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'MODIFIABLE' at row 1

      I checked several times and I didn't miss anything which allows me to think that ... it simply doesn't work. I'm systematically posting questions on this site and I don't ever get any answer, so it won't be different this time. but who knows, if someone cares ...

      Many thanks,

      Nicolas

        • 1. Re: Can't use MySQL with Portal 2.4
          shawdav1

          Hi:

          Using the binary files under Windows & JDK5 & MySQL 5.1:

          1. INSTALL JBAS FROM JEMS INSTALLER

          * jems-installer-1.2.0.CR1 (jboss-4.0.5.GA)
          - Select A JSR168 portal service on top of EJB3 Profile.
          - Enable deployment isolation
          - Set ADMIN password to [your choice]

          2. DELETE DEFAULT DATABASE BINDING

          * jboss\server\default\deploy\portal-hsqldb-ds.xml

          3. INSTALL MYSQL DATABASE BINDING

          * jboss\server\default\deploy\portal-mysql-ds.xml
          * configure to your database name and password

          4. INSTALL MYSQL CONNECTOR

          jboss\server\default\lib\mysql-connector-java-5.0.3-bin.jar

          Cheers,

          David

          • 2. Re: Can't use MySQL with Portal 2.4
            claprun
            • 3. Re: Can't use MySQL with Portal 2.4
              simplex-software

              Many thanks to everybody for your answers. This is exacly what I did and, however, it doesn't seem to work. I kepp using HSQLDB.

              Kind regards,

              nicolas

              • 4. Re: Can't use MySQL with Portal 2.4
                claprun

                You modified your configuration to work around data truncation in MySQL 5 and it's still not working? You will probably need to wipe out your DB and restart Portal for it to work.

                • 5. Re: Can't use MySQL with Portal 2.4
                  shawdav1

                  Hi Nicolas:

                  This is a working example of the truncation configuration in portal-mysql-ds.xml:

                  <?xml version="1.0" encoding="UTF-8"?>

                  <local-tx-datasource>
                  <jndi-name>PortalDS</jndi-name>
                  <connection-url>jdbc:mysql://localhost:3306/your_database_name?useServerPrepStmts=false&amp;jdbcCompliantTruncation=false</connection-url>
                  <driver-class>org.gjt.mm.mysql.Driver</driver-class>
                  <user-name>your_portal_database_user_name</user-name>
                  your_portal_database_user_password
                  </local-tx-datasource>


                  Also, have you granted permissions to your_portal_database_user_name on the portal database you created in MySQL?

                  Sorry if this seems simplistic but this configuration works very well so I'm wondering if you have typographic errors somewhere.

                  David

                  • 6. Re: Can't use MySQL with Portal 2.4
                    shawdav1

                    Funny, for some reason "password" got stripped when I pasted and saved this:

                    your_user_password
                    </local-tx-datasource>