Results 1 to 6 of 6

Thread: Build Failing

  1. #1
    Join Date
    Sep 2008
    Posts
    21

    Unhappy 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] ------------------------------------------------------------------------
    [ERROR] BUILD FAILURE
    [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] ------------------------------------------------------------------------





    Thanks
    Rohit

  2. #2
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    It might be the issue described in http://forum.springsource.org/showthread.php?t=82859. There's an open Jira ticket as well. Please let us know if that doesn't sort it out for you.
    Ben Alex
    Project Founder, Spring UAA, Spring Roo and Spring Security

  3. #3
    Join Date
    Sep 2008
    Posts
    21

    Thumbs up

    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 database.properties 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 ?

    Thanks.

  4. #4
    Join Date
    Mar 2008
    Location
    Sydney, AU
    Posts
    974

    Default

    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.
    Stefan Schmidt
    Software Engineer, Spring Roo
    SpringSource - a division of VMware
    twitter @schmidtstefan

  5. #5
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    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.
    Ben Alex
    Project Founder, Spring UAA, Spring Roo and Spring Security

  6. #6
    Join Date
    Sep 2008
    Posts
    21

    Default

    Hi:
    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 datbase.properties 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

    regds,
    rohit

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •