문제

I'm trying to set a nullable BIGINT foreign key in my excel file to fill the data for my DbUnit test, but I'm getting the following exception when leaving the cell empty:

Caused by: org.dbunit.dataset.datatype.TypeCastException: Unable to typecast value <> of type <java.lang.String> to BIGINT

I've set the input in excel to number etc but it didn't help.

tried:

[NULL], [null], <null> 

Same exception expect the "value " changes ofc...

도움이 되었습니까?

해결책

Fixed it with adding:

ReplacementDataSet replacedDataSet = new ReplacementDataSet(dataSet); 
replacedDataSet.addReplacementObject("[NULL]", null);
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top