Announcement Announcement Module
No announcement yet.
Build Failing Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Build Failing

    Hi All:
    I am playing around with Roo just to get more comfortable with it.
    When I run 'perform tests' it fails. Also the log says

    Tests run: 9, Failures: 0, Errors: 8, Skipped: 0, Time elapsed: 6.119 sec <<< FAILURE!
    testCountEmployees(com.payroll.domain.EmployeeInte grationTest) Time elapsed: 0.243 sec <<< ERROR!
    org.springframework.transaction.CannotCreateTransa ctionException: Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Cannot open connection

    I had selected mySql as the DB. Do I need to change the connection setting somewhere (for hibernate?) to understand it correctly.

    Looks like a configuration issue from my side - I am hunting the docs now , int he meantime if someone can help , it would be great !

    T E S T S
    Running com.payroll.domain.EmployeeIntegrationTest
    Tests run: 9, Failures: 0, Errors: 8, Skipped: 0, Time elapsed: 6.137 sec <<< FAILURE!

    Results :

    Tests in error:
    testCountEmployees(com.payroll.domain.EmployeeInte grationTest)
    testFindEmployee(com.payroll.domain.EmployeeIntegr ationTest)
    testFindAllEmployees(com.payroll.domain.EmployeeIn tegrationTest)
    testFindEmployeeEntries(com.payroll.domain.Employe eIntegrationTest)
    testFlush(com.payroll.domain.EmployeeIntegrationTe st)
    testMerge(com.payroll.domain.EmployeeIntegrationTe st)
    testPersist(com.payroll.domain.EmployeeIntegration Test)
    testRemove(com.payroll.domain.EmployeeIntegrationT est)

    Tests run: 9, Failures: 0, Errors: 8, Skipped: 0

    [INFO] ------------------------------------------------------------------------
    [INFO] ------------------------------------------------------------------------
    [INFO] There are test failures.

    Please refer to C:\payroll\target\surefire-reports for the individual test results.
    [INFO] ------------------------------------------------------------------------
    [INFO] For more information, run Maven with the -e switch
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 1 minute 8 seconds
    [INFO] Finished at: Wed Jan 13 06:52:42 IST 2010
    [INFO] Final Memory: 16M/29M
    [INFO] ------------------------------------------------------------------------


  • #2
    It might be the issue described in There's an open Jira ticket as well. Please let us know if that doesn't sort it out for you.


    • #3
      Thanks Ben for your reply.

      Yeah , I did see the post that you had mentioned but it did not work for me but the following happened -

      1) I tried doing what is mentioned in the thread below (manual entry etc) but no luck

      2) I noticed that mySql version in my machine is 5.0.45 and pom.xml refers to 5.1.6

      3) I also noticed roo started telling me(after manual entry in file) that I should download the correct driver and install it (put it in mvn repository) to fix this.

      4) Due to lack of time I could not do step 3 above and did a shut down and now when I tried 'perform test' again (after reboot) , it worked !

      So - it might be that after step 1 (manual entry) I had to restart my mySql service again (I am on windows).

      Anyway its working now and I am diving deep into roo , so will keep posting.

      By the way - I could not see the full video which is posted in infoq, it stops after 30 mins - do you have this Video demo of yours hosted somewhere else too ?



      • #4
        Glad you could work it out. perform eclipse will take care of adding the MySQL driver to your application classpath, so that may have done the trick.

        AFAIK we are not hosting the videos anywhere else.


        • #5
          I was able to watch the full 1.5 hour video via InfoQ. The video is only hosted on the InfoQ site, as the InfoQ team recorded it and did all the production and hosting.


          • #6
            I faced the same problem again. I had suspected the mySql version mismatch. So I upgraded mySql version all works like charm now.

            The entry in the files still need to be edited manually.

            For what it's worth , noticed - in pom.xml the mysql version mentioned is 5.1.6 and mySql site has 5.1.41 as the latest version.

            Anyway - my local mySql version now is 5.1.41 and pom.xml version is 5.1.6 but they work , no more build errors in this case


            trying -
            ____ ____ ____
            / __ \/ __ \/ __ \
            / /_/ / / / / / / /
            / _, _/ /_/ / /_/ /
            /_/ |_|\____/\____/ 1.0.0.RELEASE [rev 564]