facebook

Table ‘test.test_book’ doesn’t exist

  1. MyEclipse IDE
  2.  > 
  3. Off Topic
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #232337 Reply

    randyl
    Member

    Hello,
    I try to test the new release 4.0 M2 for Eclipse 3.1 and using the Laliluna tutorial Struts Hibernate Integration Tutorial. I encountered error that I can’t figure out, thought there are some that I was able to soloved. Im a novice. I have a database called test and a table book. My problem is when I try to run a test application and insert a sample data. an error occured that “Table ‘test.test_book’ doesn’t exist”. I don’t know why it refer to test_book table wherein what I have is just a book.
    BTW, i’m using windows 2000 advance and mysql.

    Here is the error:
    ——————————————————————-
    net.sf.hibernate.exception.SQLGrammarException: could not insert: [pejman.library.Book]
    at net.sf.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:69)
    at net.sf.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
    at net.sf.hibernate.persister.AbstractEntityPersister.convert(AbstractEntityPersister.java:1331)
    at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:540)
    at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:426)
    at net.sf.hibernate.impl.ScheduledIdentityInsertion.execute(ScheduledIdentityInsertion.java:28)
    at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2449)
    at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:943)
    at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:868)
    at net.sf.hibernate.impl.SessionImpl.saveWithGeneratedIdentifier(SessionImpl.java:786)
    at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.java:749)
    at pejman.test.LibraryTest.createBook(LibraryTest.java:66)
    at pejman.test.LibraryTest.main(LibraryTest.java:41)
    Caused by: java.sql.SQLException: Table ‘test.test_book’ doesn’t exist
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2921)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1570)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1665)
    at com.mysql.jdbc.Connection.execSQL(Connection.java:2978)
    at com.mysql.jdbc.Connection.execSQL(Connection.java:2902)
    at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:930)
    at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1159)
    at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1076)
    at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1061)
    at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:518)
    ——————————————————————————

    thanks,
    randy

    #232376 Reply

    Riyad Kalla
    Member

    Moving to OT > Soft Dev.

    Randy when posting a question like this it is usually a good idea to post snippes of the code ou are executing that is throwing the exception, your db schema and the hibernate mapping file so we can get a big picture of what is going on.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Table ‘test.test_book’ doesn’t exist

You must be logged in to post in the forum log in