Closed bigalnz closed 10 months ago
Can you post the stack trace?
Sure.
PS: I think it is something to do with the way I am sending my test data to the DB. If I write:
Point
THEN I cant retrieve hc from the database without the deserialization exception.
java.lang.IllegalStateException: Failed to execute CommandLineRunner
at
org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:774)
~[spring-boot-3.1.2.jar:3.1.2]
at
org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:755)
~[spring-boot-3.1.2.jar:3.1.2]
at
org.springframework.boot.SpringApplication.run(SpringApplication.java:319)
~[spring-boot-3.1.2.jar:3.1.2]
at
org.springframework.boot.SpringApplication.run(SpringApplication.java:1306)
~[spring-boot-3.1.2.jar:3.1.2]
at
org.springframework.boot.SpringApplication.run(SpringApplication.java:1295)
~[spring-boot-3.1.2.jar:3.1.2]
at com.nz.kiwi.KiwiApplication.main(KiwiApplication.java:50) ~[main/:na]
at
java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:577) ~[na:na]
at
org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:50)
~[spring-boot-devtools-3.1.2.jar:3.1.2]
Caused by: org.springframework.orm.jpa.JpaSystemException: could not
deserialize
at
org.springframework.orm.jpa.vendor.HibernateJpaDialect.convertHibernateAccessException(HibernateJpaDialect.java:320)
~[spring-orm-6.0.11.jar:6.0.11]
at
org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:229)
~[spring-orm-6.0.11.jar:6.0.11]
at
org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:550)
~[spring-orm-6.0.11.jar:6.0.11]
at
org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:61)
~[spring-tx-6.0.11.jar:6.0.11]
at
org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:242)
~[spring-tx-6.0.11.jar:6.0.11]
at
org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:152)
~[spring-tx-6.0.11.jar:6.0.11]
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
~[spring-aop-6.0.11.jar:6.0.11]
at
com.blazebit.persistence.spring.data.base.repository.EntityViewAwareCrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke(EntityViewAwareCrudMethodMetadataPostProcessor.java:143)
~[blaze-persistence-integration-spring-data-base-3.1-1.6.9.jar:1.6.9]
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
~[spring-aop-6.0.11.jar:6.0.11]
at
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
~[spring-aop-6.0.11.jar:6.0.11]
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
~[spring-aop-6.0.11.jar:6.0.11]
at
org.springframework.data.repository.core.support.SurroundingTransactionDetectorMethodInterceptor.invoke(SurroundingTransactionDetectorMethodInterceptor.java:57)
~[spring-data-commons-3.1.2.jar:3.1.2]
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
~[spring-aop-6.0.11.jar:6.0.11]
at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:244)
~[spring-aop-6.0.11.jar:6.0.11]
at jdk.proxy4/jdk.proxy4.$Proxy143.findAll(Unknown Source) ~[na:na]
at
java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:577) ~[na:na]
at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
~[spring-aop-6.0.11.jar:6.0.11]
at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:196)
~[spring-aop-6.0.11.jar:6.0.11]
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
~[spring-aop-6.0.11.jar:6.0.11]
at
org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:137)
~[spring-tx-6.0.11.jar:6.0.11]
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
~[spring-aop-6.0.11.jar:6.0.11]
at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:244)
~[spring-aop-6.0.11.jar:6.0.11]
at jdk.proxy4/jdk.proxy4.$Proxy143.findAll(Unknown Source) ~[na:na]
at
com.nz.kiwi.implementation.ChickTimerServiceImpl.findAll(ChickTimerServiceImpl.java:32)
~[main/:na]
at
java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:577) ~[na:na]
at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
~[spring-aop-6.0.11.jar:6.0.11]
at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:196)
~[spring-aop-6.0.11.jar:6.0.11]
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
~[spring-aop-6.0.11.jar:6.0.11]
at
org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:756)
~[spring-aop-6.0.11.jar:6.0.11]
at
org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123)
~[spring-tx-6.0.11.jar:6.0.11]
at
org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:391)
~[spring-tx-6.0.11.jar:6.0.11]
at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)
~[spring-tx-6.0.11.jar:6.0.11]
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
~[spring-aop-6.0.11.jar:6.0.11]
at
org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:756)
~[spring-aop-6.0.11.jar:6.0.11]
at
org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708)
~[spring-aop-6.0.11.jar:6.0.11]
at
com.nz.kiwi.implementation.ChickTimerServiceImpl$$SpringCGLIB$$0.findAll(
On Sun, Aug 27, 2023 at 9:58 PM Karel Maesen @.***> wrote:
Can you post the stack trace?
— Reply to this email directly, view it on GitHub https://github.com/GeoLatte/geolatte-geom/issues/160#issuecomment-1694624076, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACSLKRDFZYASX5VGOJPRKLTXXMK2XANCNFSM6AAAAAA4AFPCWQ . You are receiving this because you authored the thread.Message ID: @.***>
-- "Beat it punk!"
Do I need the to string method on the entity?
On Sun, Aug 27, 2023 at 9:58 PM Karel Maesen @.***> wrote:
Can you post the stack trace?
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
-- "Beat it punk!"
The stacktrace tells me that Hibernate tries to use object deserialisation when reading the value, which means Hibernate doesn't recognize it as a Geometry type. Most often this is due to a configuration problem. Are you sure that Hibernate Spatial is used? You should see an INFO log message to that effect when Hibernate is initializing.
We're discussing this further on the Hibernate-User Zulip channel
I have a Spring Boot 3.2 project which requires me to store WGS84 point data in MySql8 but I am getting a cannot deserialize error from Hibernate when I try to recall from the database a entity with point data attached.
I am inserting a test record into the database with SQL:
But then when I try to findAll(); on this repo I get the hibernate deserialization error.
What is wrong here?