Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Debugging table creation

 
Kristopher Matthews
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Earlier today one of my tables was failing to be created - no message in any log or output that I could find, just the table wasn't there. So when my unit test attempted to store data in that table, it failed to do so. I eventually (through curse laden trial and error) discovered the culprit:



Commenting out the column annotation fixes the issue. Okay, so maybe that annotation doesn't belong there and is a stupid idea, .. but is there a way to debug this in the future? I'd like to see why the table isn't created, or at least some kind of hint that it wasn't created.
 
Kristopher Matthews
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Correction, it has nothing to do with that column annotation. It randomly fails to create the table about 80% of the time. The other 20% it seems to magically work.



Notice nothing about my other tables. Or that it is not dropping the sequence table first. Arrrrgh.
 
Kristopher Matthews
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Everything is working fine, this was just a litany of errors brought on by a late night and unfamiliarity.

The original problem was that my entity was named "User." The second problem was me not noticing that glassfish was only logging FAILED table create/drops, not successful ones. The third problem was me not refreshing the list of tables in the DB view.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic