• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Debugging table creation

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic