I created a different branch "exception"
# spring
t
I created a different branch "exception"
m
Thanks a lot. I’m receiving a different exception:
Copy code
java
java.lang.IllegalArgumentException: Parameter specified as non-null is null: method com.tiarebalbi.springdatakotlinnullablequery.Model.<init>, parameter name

	at com.tiarebalbi.springdatakotlinnullablequery.Model.<init>(Model.kt)
	at com.tiarebalbi.springdatakotlinnullablequery.Model.<init>(Model.kt:9)
	at com.tiarebalbi.springdatakotlinnullablequery.Model_Instantiator_gylfud.newInstance(Unknown Source)
	at org.springframework.data.convert.KotlinClassGeneratingEntityInstantiator$DefaultingKotlinClassInstantiatorAdapter.createInstance(KotlinClassGeneratingEntityInstantiator.java:240)
That one is perfectly fine because the saved model does not fit the loaded one – there are missing fields. Using parameter defaulting should help.
t
Sorry my bad, this is the error that we are looking for..

https://i.imgur.com/4El6SFa.png

I'm going to update the example I was able to reproduce in my main project
Done
In the end that was my mistake to use the wrong model... 😅
m
Thanks a lot. I was able to locate the issue on our side. Parameter defaulting for absent, primitive types causes the NPE as we attempt to cast
null
into
boolean
. I filed https://jira.spring.io/browse/DATACMNS-1200.
I pushed a fix with
Copy code
<dependency>
    <groupId>org.springframework.data</groupId>
    <artifactId>spring-data-commons</artifactId>
    <version>2.1.0.DATACMNS-1200-SNAPSHOT</version>
</dependency>
t
Great!!! Thanks a lot!