Closed glassfishrobot closed 11 years ago
Reported by flopma
flopma said: Oopps, please change the issue description formatting as it is rendered very badly now! Thx!
jesseplymale said: I'm using Jersey version 1.14. I noticed this problem too. It happened when I first was unmarshalling a Java bean to JSON using the POJO method (which included nulls). Then I turned off the JSONConfiguration.FEATURE_POJO_MAPPING, so that it was only using the JSONConfiguration.natural() method. I tried calling a web service with the earlier JSON that I had saved off, and it gave me the "No more parsing elements." error above. I was able to avoid the problem by removing the elements from the JSON which had null values. I'm curious what a better fix would be.
michalgajdos said: Merged into trunk (1.16-SNAPSHOT).
Was assigned to michalgajdos
This issue was imported from java.net JIRA JERSEY-1459
Marked as fixed on Friday, November 23rd 2012, 3:23:24 am
Hi,
I'm trying to unmarshall a REST response I get from a Jira instance v5.1.6. REST format is always JSON from this version of JIRA.
The error I get is a
JSONConfig uses the natural notation.
I ran the code in debug mode and saw that in the method StAXStreamConnector.bridge(), in the while loop, there is no check concerning event XMLStreamConstants.END_DOCUMENT and the exception is raised exactly after the last element of the JSON response, at a point where the inputstream is at its end and the depth level is still at 1 (what I couldn't explain).
The while loop expects the depth level to be 0 for a perfectly parsed input.
Could you take a look and help me on this ?
The JSON response is as follows
Thx, – Issa
Environment
java version "1.7.0_05" Java(TM) SE Runtime Environment (build 1.7.0_05-b06) Java HotSpot(TM) 64-Bit Server VM (build 23.1-b03, mixed mode)
activation-1.1.jar bcprov-jdk16-1.46.jar commons-codec-1.6.jar commons-collections-3.2.1.jar commons-configuration-1.9.jar commons-configuration-1.9-javadoc.jar commons-configuration-1.9-sources.jar commons-digester-1.8.1.jar commons-httpclient-3.1.jar commons-lang-2.6.jar commons-lang3-3.1.jar commons-lang3-3.1-javadoc.jar commons-lang3-3.1-sources.jar jackson-core-asl-1.9.2.jar jackson-jaxrs-1.9.2.jar jackson-mapper-asl-1.9.2.jar jackson-xc-1.9.2.jar jaxb-api-2.2.2.jar jaxb-impl-2.2.3-1.jar jcl-over-slf4j-1.7.1.jar jcl-over-slf4j-1.7.1-javadoc.jar jcl-over-slf4j-1.7.1-sources.jar jersey-apache-client-1.14.jar jersey-apache-client-1.14-javadoc.jar jersey-apache-client-1.14-sources.jar jersey-client-1.14.jar jersey-client-1.14-javadoc.jar jersey-client-1.14-sources.jar jersey-core-1.14.jar jersey-core-1.14-javadoc.jar jersey-core-1.14-sources.jar jersey-json-1.14.jar jersey-json-1.14-javadoc.jar jersey-json-1.14-sources.jar jettison-1.1.jar jsr311-api-1.1.1.jar jzlib-1.0.7.jar logback-classic-1.0.7.jar logback-classic-1.0.7-javadoc.jar logback-classic-1.0.7-sources.jar logback-core-1.0.7.jar mail-1.4.jar slf4j-api-1.7.1.jar sshj-0.8.1.jar sshj-0.8.1-javadoc.jar sshj-0.8.1-sources.jar stax-api-1.0.1.jar stax-api-1.0-2.jar xml-apis-1.0.b2.jar
Affected Versions
[1.14]