This is an automated email from the ASF dual-hosted git repository. ramyav pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/olingo-odata4.git
The following commit(s) were added to refs/heads/master by this push: new a6ccb3d [OLINGO-1508]Setting event allocator in XMLInputFactory a6ccb3d is described below commit a6ccb3d5a481d0e7ac387a2a31150715987f09b7 Author: ramya vasanth <ramya.vasa...@sap.com> AuthorDate: Fri Jan 22 10:41:46 2021 +0530 [OLINGO-1508]Setting event allocator in XMLInputFactory --- .../olingo/client/core/serialization/AtomDeserializer.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/AtomDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/AtomDeserializer.java index 0136a10..9d8d2e4 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/AtomDeserializer.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/AtomDeserializer.java @@ -62,6 +62,7 @@ import org.apache.olingo.commons.api.edm.geo.Geospatial; import org.apache.olingo.commons.api.ex.ODataError; import org.apache.olingo.commons.api.format.ContentType; import org.apache.olingo.commons.core.edm.EdmTypeInfo; +import org.codehaus.stax2.ri.evt.Stax2EventAllocatorImpl; import com.fasterxml.aalto.stax.InputFactoryImpl; import org.apache.olingo.commons.api.ex.ODataErrorDetail; @@ -98,6 +99,14 @@ public class AtomDeserializer implements ODataDeserializer { FACTORY.setProperty(IS_SUPPORTING_EXTERNAL_ENTITIES, false); FACTORY.setProperty(SUPPORT_DTD, false); FACTORY.setProperty(IS_REPLACING_ENTITY_REFERENCES, false); + /* + * Setting the event allocator to Stax2 as EventAllocatorImpl from aalto + * has error as seen below + * Caused by: java.lang.NoClassDefFoundError: + * javax/xml/stream/events/XMLEvent at + * com.fasterxml.aalto.stax.InputFactoryImpl.createEventAllocator(InputFactoryImpl.java:594) + */ + FACTORY.setEventAllocator(new Stax2EventAllocatorImpl()); } private final AtomGeoValueDeserializer geoDeserializer;