facebook

[Closed] Spring and hibernate -HowTo create the DB schema???

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #243685 Reply

    abtrapp
    Member

    Hi!

    I am trying the Spring and Hibernate plugins. Looks great but I have one problem. If I try to configure Hibernate within Spring with the

    <property name="hbm2ddl.auto">update</property>

    directive nothing happens, I get the error, that the table I am trying to access does not exist (tried create and create-drop too, no difference).

    Anybody an idea?

    The exception (in short: table not found. How if it is not created *smiles*)

    Exception in thread “main” org.springframework.jdbc.BadSqlGrammarException: Hibernate operation: could not load an entity: [pfad…MeinObjektle]; bad SQL grammar

    [select x0_.id as id0_, x0_.averageAccessTime as averageA2_0_0_ from MeinObjektle x0_ where x0_.id=?]; nested exception is java.sql.SQLException: Table not found in statement [select x0_.id as id0_, x0_.averageAccessTime as averageA2_0_0_ from MeinObjektle x0_ where x0_.id=?]

    #243686 Reply

    abtrapp
    Member

    Stupid me…

    <prop key="hibernate.hbm2ddl.auto">create-drop</prop>

    blind, blind, blind…

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: [Closed] Spring and hibernate -HowTo create the DB schema???

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