Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JTS compatibility problem #1

Closed
etj opened this issue Feb 8, 2021 · 1 comment
Closed

JTS compatibility problem #1

etj opened this issue Feb 8, 2021 · 1 comment

Comments

@etj
Copy link
Member

etj commented Feb 8, 2021

An API change in JTS breaks compatibility:

https://github.com/locationtech/jts/blob/master/doc/JTS_Version_History.md#api-changes-1

Version 1.17.0

Release Date: July 1, 2020

Java Version: 1.8

API Changes

  • Change Polygon getExteriorRing and getInteriorRingN accessors to return LinearRing.
    • This is a binary incompatible change to the method signature. Recompilation is necessary. No source code changes are required.

Here the error stacktrace:

java.lang.NoSuchMethodError: org.locationtech.jts.geom.Polygon.getExteriorRing()Lorg/locationtech/jts/geom/LineString;
        at org.hibernatespatial.postgis.PGGeometryUserType.convertJTSPolygon(PGGeometryUserType.java:412)
        at org.hibernatespatial.postgis.PGGeometryUserType.convertJTSMultiPolygon(PGGeometryUserType.java:387)
        at org.hibernatespatial.postgis.PGGeometryUserType.conv2DBGeometry(PGGeometryUserType.java:355)
        at org.hibernatespatial.AbstractDBGeometryType.nullSafeSet(AbstractDBGeometryType.java:153)
        at org.hibernatespatial.GeometryUserType.nullSafeSet(GeometryUserType.java:201)
        at org.hibernate.type.CustomType.nullSafeSet(CustomType.java:140)
        at org.hibernate.persister.entity.AbstractEntityPersister.dehydrate(AbstractEntityPersister.java:2184)
        at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2430)
        at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2874)
        at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:79)
        at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273)
        at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:265)
        at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:184)
        at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
        at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)
        at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216)
        at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:383)
        at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:133)
        at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:76)
        at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:517)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:761)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:730)
        at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:485)
        at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:291)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)
        at com.sun.proxy.$Proxy58.persist(Unknown Source)
@etj
Copy link
Member Author

etj commented Feb 8, 2021

Fixed in c75cfe5.

Bumping up to 1.1.3.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant