org.dbunit.dataset.NoSuchTableException: Did not find table 'xxx' in schema 'null'

后端 未结 7 620
没有蜡笔的小新
没有蜡笔的小新 2020-12-06 06:46

I know there have been discussions wrt to dbunit here. I have read most of them but I cant seem to find a solution to my problem.

I have set up hibernate and spring.

相关标签:
7条回答
  • 2020-12-06 07:27

    I ran into the same error and had both my entity configured in hibernate.cfg.xml and I was using hbm2ddl to generate the tables, so I searched on and found that my entity mapping contained a field named "POSITION" which is a reserved term. When I changed it to "POS" the table was generated correctly.

    You can check if your table is being generated by debugging the resultSet iteration in

    org.dbunit.database.DatabaseDataSet.initialize().

    0 讨论(0)
提交回复
热议问题