NoSuchColumnException from 1.1.0 to 1.2.1
See original GitHub issueI’ve upgraded spring-test-dbunit from 1.1.0 to 1.2.1, and I am getting this kind of errors for some datasets that doesn’t contains all the fields of a specific table.
org.dbunit.dataset.NoSuchColumnException: clou_desire_user.COMPANY - (Non-uppercase input column: company) in ColumnNameToIndexes cache map. Note that the map's column names are NOT case sensitive.
at org.dbunit.dataset.AbstractTableMetaData.getColumnIndex(AbstractTableMetaData.java:117)
at org.dbunit.dataset.AbstractTable.getColumnIndex(AbstractTable.java:78)
at org.dbunit.dataset.DefaultTable.getValue(DefaultTable.java:197)
at org.dbunit.dataset.CompositeTable.getValue(CompositeTable.java:119)
at org.dbunit.operation.InsertOperation.equalsIgnoreMapping(InsertOperation.java:143)
at org.dbunit.operation.AbstractBatchOperation.execute(AbstractBatchOperation.java:162)
at org.dbunit.operation.CompositeOperation.execute(CompositeOperation.java:79)
at com.github.springtestdbunit.DbUnitRunner.setupOrTeardown(DbUnitRunner.java:194)
at com.github.springtestdbunit.DbUnitRunner.beforeTestMethod(DbUnitRunner.java:66)
at com.github.springtestdbunit.DbUnitTestExecutionListener.beforeTestMethod(DbUnitTestExecutionListener.java:186)
at org.springframework.test.context.TestContextManager.beforeTestMethod(TestContextManager.java:249)
at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:72)
at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:82)
at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:73)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:224)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:83)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:68)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:163)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:27)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:74)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:211)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:67)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
Any suggestions?
Issue Analytics
- State:
- Created 8 years ago
- Comments:14 (1 by maintainers)
Top Results From Across the Web
Developers - NoSuchColumnException from 1.1.0 to 1.2.1 -
I've upgraded spring-test-dbunit from 1.1.0 to 1.2.1, and I am getting this kind of errors for some datasets that doesn't contains all the...
Read more >org.dbunit.dataset.NoSuchColumnException - Stack Overflow
Run the HsqldbexampleApplicationTests.contextLoads() test. It passes. Get into StaticResource.java , and change one of the @Column annotations.
Read more >org.appfuse : appfuse : 2.0-m2 - Maven Central Repository Search
Test-first development is promoted when using AppFuse, and all the infrastructure is in place to do integration testing, unit/mock testing, as well as...
Read more >Changes - DBUnit
Added constructors to NoSuchColumnException taking table name and column name as arguments - set old constructors to deprecated, gommma.
Read more >dbunit-user Mailing List for dbUnit (Page 2) - SourceForge
NoSuchColumnException : Table1.ORIGIN - (Non-uppercase input column: origin) in ColumnNameToIndexes cache Table1. Note that the Table1's column names are NOT ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I updated DBUnit to 2.5.3, SpringTestDbUnit to 1.3.0, to workaround this issue; and used the @DatabaseSetups, and used (I’m on Java8) a series of repeatable @DatabaseSetup as mentioned by @djeisonselzlein; but at this point my XML datasets are not loaded anymore… I feel like having a too short blanket here… 😐
Sounds like a core DBUnit issue. Perhaps you can share some code that demonstrates the issue?