5 Replies Latest reply on May 5, 2003 9:21 PM by cuanglim

    Problem with JBoss 3.0.6 and MySQL

      I have a webapp talking to an entity EJB bean using JBoss to host both. When I run with the default HSQL database everything works fine, and when I configure for MySQL things SEEM to work fine -- except I always get some annoying error messages (see attachment).

      I need to get rid of these warning messages. Can anyone help me?

      I have also attached my jbosscmp-jdbc.xml and titan-service.xml files. (The name comes from the JBoss 3.0 workbook which was my starting point.)

      Thanks.

        • 1. Re: Problem with JBoss 3.0.6 and MySQL
          davidjencks

          I know little about mysql except that some versions do not support transactions. Possibly that is causing the exceptions.

          • 2. Re: Problem with JBoss 3.0.6 and MySQL

            Thanks for your suggestion. Sounds reasonable.

            I tried a quick fix by changing the deployment descriptor ejb-jar.xml to the following. (It specifies that if the client has a transaction open to suspend it temporarily and resume later on.)

            Unfortunately that doesn't help. I'll try to download a more recent version of mysql and see if that works.
            ================================
            <container-transaction>

            <ejb-name>StockEJB</ejb-name>
            <method-name>*</method-name>

            <!-- debug: some versions of mysql do not support transactions
            <trans-attribute>Required</trans-attribute>
            -->
            <trans-attribute>NotSupported</trans-attribute>
            </container-transaction>
            ==================

            • 3. Re: Problem with JBoss 3.0.6 and MySQL

              Oops! I was a little careless applying the fix. This time it worked fine.

              So turning off Tx when using mysql3.23.54 causes the warning messages to go away. I will try to find a version of mysql that does not have this problem.

              Thanks for your help.

              • 4. Re: Problem with JBoss 3.0.6 and MySQL
                cuanglim

                Hi,

                Can I see your mysql-service.xml? I want to know how to turn off the Tx, I also have the same problem here.

                Is it need to define the database in jbosscmp-jdbc.xml?

                Thanks.

                Regards,
                Han Lin

                • 5. Re: Problem with JBoss 3.0.6 and MySQL
                  cuanglim

                  Hi,

                  I managed to connect to database now, but after login, I've got this error :

                  type Status report

                  message /logon.jsp

                  description The requested resource (/logon.jsp) is not available.

                  And in the server.log I got this :

                  2003-05-06 10:12:27,562 INFO [org.apache.struts.action.RequestProcessor] Processing a 'POST' for path '/corporateLogon'
                  2003-05-06 10:12:27,626 INFO [STDOUT] In User Pfc Xref Bean select Pfc by User:select CID,PFC_CODE from USER_PFC_XREF where UID = ?
                  2003-05-06 10:12:27,633 INFO [STDOUT] Here in User Pfc Xref
                  2003-05-06 10:12:27,784 INFO [STDOUT] In User Pfc Xref Bean select User by Pfc:select UID from USER_PFC_XREF where CID = ? and PFC_CODE = ?
                  2003-05-06 10:12:27,788 INFO [STDOUT] Here in User Pfc Xref
                  2003-05-06 10:12:27,789 INFO [STDOUT] pfc1
                  2003-05-06 10:12:27,811 INFO [STDOUT] In User Pfc Xref Bean select User by Pfc:select UID from USER_PFC_XREF where CID = ? and PFC_CODE = ?
                  2003-05-06 10:12:27,815 INFO [STDOUT] Here in User Pfc Xref
                  2003-05-06 10:12:27,816 INFO [STDOUT] pfc2
                  2003-05-06 10:12:27,817 WARN [org.jboss.resource.connectionmanager.LocalTxConnectionManager$LocalConnectionEventListener] prepare called on a local tx. You are not getting the semantics you expect!
                  2003-05-06 10:12:27,818 WARN [org.jboss.resource.connectionmanager.LocalTxConnectionManager$LocalConnectionEventListener] prepare called on a local tx. You are not getting the semantics you expect!
                  2003-05-06 10:12:30,043 INFO [org.apache.struts.action.RequestProcessor] Processing a 'POST' for path '/retrieveLogonDetail'
                  2003-05-06 10:12:30,055 INFO [STDOUT] In User Pfc Xref Bean select User by Pfc:select UID from USER_PFC_XREF where CID = ? and PFC_CODE = ?
                  2003-05-06 10:12:30,058 INFO [STDOUT] Here in User Pfc Xref

                  FYI, the application itself can run on another machine which is used jboss-2.4.4-tomcat-4.0.1.

                  Here I attached my xml config files.

                  Please Advise.

                  Regards,
                  Han Lin