Results 1 to 7 of 7

Thread: My first roo project

Hybrid View

  1. #1

    Default My first roo project

    Hi,
    I tried my first Roo project. It was actually so easy to work with.

    I have one problem though. One of my entities' integration test fails randomly.
    java.lang.AssertionError: Data on demand for 'TestEntity' failed to initialize correctly
    The problem here is that failure is random. Sometimes my mvn test just runs successfully. But sometimes it fails. So am just not able to figure out, what could possible be wrong. Any ideas ? Why dod might fail intermittently ?

    -Sathya

  2. #2

    Default

    And just a bit more information about this is i have a few more entities in my project. Only this particular entity fails randomly. After a while if I keep hitting mvn test, is starts passing the tests all the time. This entity is a subclass with one table per class inheritance strategy

  3. #3

    Default

    Quote Originally Posted by sathyakumar View Post
    And just a bit more information about this is i have a few more entities in my project. Only this particular entity fails randomly. After a while if I keep hitting mvn test, is starts passing the tests all the time. This entity is a subclass with one table per class inheritance strategy
    I switched to MySQL from HYPERSONIC_IN_MEMORY. Haven't faced the problem yet.

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

    Default

    Just a guess here, but 'Test' is usually a reserved word so you would be better off not choosing this in your class name.

    HTH,
    Stefan
    Stefan Schmidt
    Software Engineer, Spring Roo
    SpringSource - a division of VMware
    twitter @schmidtstefan

  5. #5
    Join Date
    Jun 2008
    Posts
    13

    Default

    Have you _really_ solved the problem?
    I'm facing the same with Oracle and MySQL.

  6. #6
    Join Date
    Jan 2007
    Posts
    5

    Default

    I'm also seeing an intermittent failure like this with PostgreSQL 8.3 against Roo 1.0.2.

  7. #7
    Join Date
    Jan 2007
    Posts
    5

    Default

    It would appear this is because of the testRemove integration test, the changes to the database aren't being rolled back. This results in the random lookup every so often landing on the deleted item that it can't look up from the database. Two factors seem to be in play here, both the order the tests are run in as well as whether or not the random lookup happens to land on the deleted item.

Posting Permissions

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