Adeel created OLINGO-1605:
-----------------------------

             Summary: Geospatial data type is not implementing Serializable
                 Key: OLINGO-1605
                 URL: https://issues.apache.org/jira/browse/OLINGO-1605
             Project: Olingo
          Issue Type: Bug
          Components: odata4-commons
    Affects Versions: (Java) V4 4.9.0
            Reporter: Adeel
         Attachments: Switch.java, error.log

I implemented Odata4 JPA implementation using Apache Olingo 4.9.0. JPA library 
used for this implementation is: SAP Olingo JPA processor - 
[https://github.com/SAP/olingo-jpa-processor-v4/tree/main]  ,I use EclipseLink 
for persistence API access. 

 

When I use one of the Apache Olingo 4 Spatial data types 
(org.apache.olingo.commons.api.edm.geo) in my @Entity java classes then Spring 
Boot program fails to start with error:

 
 
Caused by: org.eclipse.persistence.exceptions.EntityManagerSetupException: 
Exception Description: Predeployment of PersistenceUnit [default] failed.
Internal Exception: Exception [EclipseLink-7155] (Eclipse Persistence Services 
- 2.7.13.v20230724-7ffb888abf): 
org.eclipse.persistence.exceptions.ValidationException
Exception Description: The type [class 
org.apache.olingo.commons.api.edm.geo.GeospatialCollection] for the attribute 
[geography] on the entity class [class com.cgi.inm.odata4.model.Switch] is not 
a valid type for a serialized mapping. The attribute type must implement the 
Serializable interface.
at 
org.eclipse.persistence.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:233)
 ~[eclipselink-2.7.13.jar:2.7.13.v20230724-7ffb888abf]
 
The tech stack for this program is:
 * Spring Boot 2.7.14
 * Java 8
 * Maven 4.0.0
 * Apache Olingo 4.9.0
 * SAP JPA Processor 1.0.9
After implementing Serializable interface at 
org.apache.olingo.commons.api.edm.geo.Geospatial.java the error has gone and I 
am able to read and write geospatial data type



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to