This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have David & Dawn Griffiths on-line!
See this thread for details.
Win a copy of Head First Android this week in the Android forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

illegalArgumentException, HSQLDB, and Hibernate

 
Ranch Hand
Posts: 141
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Greetings,

So I whipped up a java/swing/hibernate/hsqldb desktop app in Eclipse.

pertinent.cfg.xml


...seems ok as code runs through my HibernateUtil.java fine.
My StudentOfDistrict class has a constructor that takes an array of Strings.


Since I'm just in the prototyping stage right now I manually start the HSQLDB server from within a CommandWindow before attempting to execute the app from within Eclipse.
as
M$prompt> java -classpath hsqldb.jar org.hsqldb.Server

this does bring up the server

then executing the app connection to server is made, all goes well until I actually try to create a new instance of StudentOfDistrict ( insert a row into students_of_district)

but

fails with a illegalArgumentException

I know the database server is up and a connection is made, but I don't know if the table students_of_district is getting automatically created by Hibernate prior to trying to insert.

Any ideas?

TIA,

Still-learning Steve
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
what is the stack trace?
 
Stuart Rogers
Ranch Hand
Posts: 141
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My bad... the offending snippet had nothing to do with HSQLDB or Hibernate... I had the wrong date-formatting within my constructor



where in my EDA_utils.java


DoH!

But, thanks for looking on a Saturday night! Now it's Miller Time!

CASE CLOSED


Still-learning Steve
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for dropping an update, it helps.
reply
    Bookmark Topic Watch Topic
  • New Topic