DBunit; confusion over case sensitivity on table/column names

前端 未结 5 1876
南方客
南方客 2021-01-13 18:25

I\'m getting this error when I start up my application

Caused by: org.dbunit.dataset.NoSuchColumnException: CLIENT.ID -  (Non-uppercase input column: ID) in          


        
5条回答
  •  一个人的身影
    2021-01-13 18:59

    I ran into the same error, fortunately we had some other test written earlier and found that in most of the tutorials the format the way the xml is written is for the FlatXMLDataSet if you are using XML data set then the correct version is as follow checkout the link at the bottom for more information.

    it should be in following format.

    
    
        idnamedepartmentstartDateendDate
                999
                TEMP
                TEMP DEPT
                2113-10-13
                2123-10-13
            

    For more information go to this link.

    http://dbunit.sourceforge.net/components.html#FlatXmlDataSet

    One more time I faced this error in another project, we have a hierarchy of model class, some how hibernate used to create a table Role with 7 columns but while running it with DBUnit it was unable to create the columns(Only 5 were created) hence it was throwing this error, Solution : Manually created this table and 3 more relationship tables which were not created by hibernate.

提交回复
热议问题