11 Replies Latest reply on May 21, 2008 6:51 PM by peterj

    Error setting up MySql as DefaultDS

    pepelara

      Hi,

      I am using Jboss 4.0.0 and MySql 5.0 and I am trying to use MySql as DefaultDS.
      I have followed the steps indicated in
      http://wiki.jboss.org/auth/wiki/en/SetUpAMysqlDatasource?action=e&windowstate=normal&mode=view

      But now I have a problem. When I start Jboss, at then console messages I read,

      15:44:30,395 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
      MBeans waiting for other MBeans:
      ObjectName: jboss.ejb:service=EJBTimerService,persistencePolicy=database
      state: FAILED
      I Depend On: jboss.jca:service=DataSourceBinding,name=DefaultDS

      Depends On Me: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server
      version for the right syntax to use near 'INTERVAL bigint,
      INSTANCEPK other,
      INFO other,
      ' at line 5

      MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM:
      ObjectName: jboss.ejb:service=EJBTimerService,persistencePolicy=database
      state: FAILED
      I Depend On: jboss.jca:service=DataSourceBinding,name=DefaultDS

      Depends On Me: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTERVAL bigint,
      INSTANCEPK other,
      INFO other,
      ' at line 5

      If anyone can help me I will appreciate.

      Regarding,
      Jose Alvarez de Lara (pepelara)

        • 1. Re: Error setting up MySql as DefaultDS
          peterj

          Is it really 4.0.0? Or is is 4.0.3.SP1 or 4.0.5 or some other versions?

          Did you include a type-mapping entry in your *-ds.xml file. This entry is critical for the app server to perform the correct database mappings.

          • 2. Re: Error setting up MySql as DefaultDS
            pepelara

            Thanks Peter for your interesting, indeed.

            Yes, it is 4.0.0. I looked for it because I am using EJB 2.0 and I was not sure what version use. This is my *-ds.xml,


            <datasources>
            <local-tx-datasource>

            <jndi-name>DefaultDS</jndi-name>
            <connection-url>jdbc:mysql://localhost:3306/myDB</connection-url>
            <driver-class>com.mysql.jdbc.Driver</driver-class>

            <user-name>some user</user-name>
            <password>some password</password>

            <!--
            <security-domain>MySqlDbRealm</security-domain>
            <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
            <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker</valid-connection-checker-class-name>

            <new-connection-sql>select * from books</new-connection-sql>
            <check-valid-connection-sql>select id from books</check-valid-connection-sql>
            -->

            <!-- Typemapping for JBoss 4.0.0 -->
            <metadata>
            <type-mapping>mySQL</type-mapping>
            </metadata>

            </local-tx-datasource>
            </datasources>


            I took it from the instruction in Jboss.org (http://wiki.jboss.org/wiki/MySQL)

            Can you see anything wrong?

            Regarding,
            Jose Alvarez de Lara

            • 3. Re: Error setting up MySql as DefaultDS
              peterj

              Use Code, not Quote, when posting xml contents.

              The type-mapping looks correct. I have this working on 4.0.4, 4.0.5, 4.2.x and 5.0.0.betax, not sure why it is not working on 4.0.0.

              By the way, you should be able to write EJB 2.0 apps on 4.0.5 and even 4.2.2.

              • 4. Re: Error setting up MySql as DefaultDS
                pepelara

                Thanks a lot.

                I will download the 4.0.5 version.

                Is it just 4.0.5 or anything more?
                I mean some thing like ServicePack X, you know.

                Please, give me the exactly version. Or even I could try with 4.2.2. I have to think of it.

                Regarding,
                Jose Alvarez de Lara

                • 5. Re: Error setting up MySql as DefaultDS
                  jaikiran

                   

                  "pepelara" wrote:


                  Or even I could try with 4.2.2. I have to think of it.



                  JBoss-4.2.2 GA is the latest stable version. If you don't have any specific requirement about the version of JBoss you are using, then i would recommend you go for 4.2.2 GA (You will require JDK 1.5 with this version of JBoss).


                  • 6. Access to task instance
                    varundoda

                    Hi,

                    I am new to jBPM. I am working on websale example which
                    comes in built in jBPM-jpdl-3.2.2. The problem is when I create a new
                    instance of the process then any user (manager, shipper, admin, user)
                    is able to see and perform the task in its tasklist. I want the task to
                    appear in the tasklist of whom it has been assigned and only assigned
                    user should be able to perform it. Please help.

                    • 7. Re: Access to task instance
                      jaikiran

                       

                      "varundoda" wrote:
                      Hi,

                      I am new to jBPM. I am working on websale example which
                      comes in built in jBPM-jpdl-3.2.2. The problem is when I create a new
                      instance of the process then any user (manager, shipper, admin, user)
                      is able to see and perform the task in its tasklist. I want the task to
                      appear in the tasklist of whom it has been assigned and only assigned
                      user should be able to perform it. Please help.


                      varundoda,

                      This question is not related to what is being discussed in this thread. Please open a separate topic in the JBoss jBPM forum at http://www.jboss.com/index.html?module=bb&op=viewforum&f=217

                      • 8. Re: Error setting up MySql as DefaultDS
                        pepelara

                        Hi Peter,

                        I have downloaded 4.2.2 GA and it works.

                        Now I have to update Tomcat with the OpenSSL, but I am not sure if needed because I have an Info message on the console,

                        07:01:38,614 INFO [Embedded] Catalina naming disabled
                        07:01:39,024 INFO [AprLifecycleListener] The Apache Tomcat Native library which
                        allows optimal performance in production environments was not found on the java
                        .library.path…

                        I have to study it.

                        Anyway Thanks a lot,
                        Jose Alvarez de Lara

                        • 9. Re: Error setting up MySql as DefaultDS
                          jaikiran

                           

                          "pepelara" wrote:

                          07:01:39,024 INFO [AprLifecycleListener] The Apache Tomcat Native library which
                          allows optimal performance in production environments was not found on the java
                          .library.path…



                          See if this http://wiki.jboss.org/wiki/HowToAddAprToJBoss helps.



                          • 10. Re: Error setting up MySql as DefaultDS
                            pepelara

                            Hi jaikiran,

                            The link relates on Linux. I am working on Windows Vista. I have been visiting some pages, I mean Apache Tomcat Native Library and The Apache Portable Runtime Project and I have not found anything about a solution for my case.

                            Further, I do not think it is absolutely necessary for the use I am going to do of JBoss. I have downloaded from the Spanish mirror the APR source and I have to compile it, a hard work! So I am going to wait for the binary issue.

                            Regarding,
                            Jose Alvarez de Lara

                            • 11. Re: Error setting up MySql as DefaultDS
                              peterj

                              Actually, the link refer to both Linux and Windows. The steps are pretty much the same - download JBoss native for your platform and extract it into the bin directory such that you end up with bin\native.

                              But you are correct in assuming that you do not absolutely need APR - JBossAS runs fine without it. The warning you get is just that, a warning that APR is not running, you can ignore it.