Skip to content
This repository has been archived by the owner on Nov 5, 2022. It is now read-only.

missing required text content in Google response #101

Closed
GoogleCodeExporter opened this issue Apr 6, 2015 · 13 comments
Closed

missing required text content in Google response #101

GoogleCodeExporter opened this issue Apr 6, 2015 · 13 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. get a full contact feed.
2.
3.

What is the expected output? What do you see instead?
expect: full feed. works 99% of the time.

What I see: (gdata java client)

com.google.gdata.util.ParseException: [Line 1, Column 4020, element
gd:orgTitle] Missing required text content
    at com.google.gdata.util.XmlParser.throwParseException(XmlParser.java:720)
    at com.google.gdata.util.XmlParser.parse(XmlParser.java:683)
    at com.google.gdata.util.XmlParser.parse(XmlParser.java:606)
    at com.google.gdata.data.BaseFeed.parseAtom(BaseFeed.java:759)
    at com.google.gdata.util.ParseUtil.parseFeed(ParseUtil.java:200)
    at com.google.gdata.util.ParseUtil.readFeed(ParseUtil.java:168)
    at com.google.gdata.data.BaseFeed.readFeed(BaseFeed.java:741)
    at com.google.gdata.client.Service.getFeed(Service.java:965)
    at com.google.gdata.client.Service.getFeed(Service.java:898)
    at com.google.gdata.client.GoogleService.getFeed(GoogleService.java:623)
    at com.google.gdata.client.Service.query(Service.java:1202)
    at com.google.gdata.client.Service.query(Service.java:1145)


What version of the product are you using? On what operating system?
gdata 1.27.0

Please provide any additional information below.


Original issue reported on code.google.com by mark.swa...@gmail.com on 12 Jan 2009 at 6:11

@GoogleCodeExporter
Copy link
Author

Mark,
   Could you provide the following details, so that we can reproduce the issue:

1. Code snippet that led to this failure (since which "query" is called affects 
the
parse behavior).
2. full stack trace

Thanks.

Original comment by vbarat...@gmail.com on 10 Feb 2009 at 4:48

  • Changed state: Started

@GoogleCodeExporter
Copy link
Author

As per the contact xml schema
(http://code.google.com/apis/contacts/docs/2.0/schema/contact_atom.rnc)  
"element
gd:orgTitle { xsd:string }", orgtitle cannot be empty.  it looks like there are
contacts that dont have the person's job role thats causing the problem.

Original comment by vbarat...@gmail.com on 10 Feb 2009 at 4:55

@GoogleCodeExporter
Copy link
Author

I'm having the same problem when querying contacts:

Caused by: com.google.gdata.util.ParseException: [Line 421, Column 657, element
gd:orgTitle] Missing required text content
       at com.google.gdata.util.XmlParser.throwParseException(Unknown Source)
       at com.google.gdata.util.XmlParser.parse(Unknown Source)
       at com.google.gdata.util.XmlParser.parse(Unknown Source)
       at com.google.gdata.data.BaseFeed.parseAtom(Unknown Source)
       at com.google.gdata.data.BaseFeed.readFeed(Unknown Source)
       at com.google.gdata.client.Service.getFeed(Unknown Source)
       at com.google.gdata.client.Service.getFeed(Unknown Source)
       at com.google.gdata.client.GoogleService.getFeed(Unknown Source)
       at com.google.gdata.client.Service.query(Unknown Source)
       at com.google.gdata.client.Service.query(Unknown Source)

I'm also using 1.27.0

Original comment by fyang...@gmail.com on 24 Feb 2009 at 2:34

@GoogleCodeExporter
Copy link
Author

It looks like there are some contacts with stale orgTitle information.  I've 
opened
up an internal bug to investigate this on our servers (internal bug #1696355). 

In the meantime, you could try finding which contact is causing issues by 
examing the
xml response.  Once you do that, you can try updating that contact through the 
Gmail
contacts interface.

Here are instructions for getting a trace of the xml with the Java client.  With
console logging enabled, run your code with following jvm flags turned on:

com.google.gdata.util.LoggableInputStream.level = ALL
com.google.gdata.util.LoggableOutputStream.level = ALL

If you have not used java logging system before, here is one of the ways to do 
it:

1. Create a text file "logging.properties" with following lines:

handlers = java.util.logging.ConsoleHandler
.level = ALL
java.util.logging.ConsoleHandler.level = ALL
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
com.google.gdata.util.XmlParser.level=INFO

2. pass this file as jvm_flag to your binary
"-Djava.util.logging.config.file=logging.properties".

3. Alternatively you can try this one of the contacts examples shipped with the
client library, by updating build-smaples/contacts.xml, by adding the following 
line
to "sample.contacts.run" rule
<jvmarg 
value="-Djava.util.logging.config.file=/home/vbarathan/logging.properties"/>

Original comment by mon...@gmail.com on 6 Mar 2009 at 7:44

@GoogleCodeExporter
Copy link
Author

Any update on this issue ? It's been driving us CRAZY for weeks. Other apps 
(gsyncit
seems to show up often, but there are others) write contacts with the empty 
orgTitle,
which then blows up the client library when we read the data. Should I be 
looking at
hacking the client library to remove the check, or is there a plan afoot to 
clean up
the data in the service ?
Thanks.

Original comment by the.davi...@gmail.com on 13 Mar 2009 at 1:49

@GoogleCodeExporter
Copy link
Author

David,
  Looks like its a combination of issues between server-side code and the
client-library.  Could send the problematic xml blob (I dont have the right set 
of
data to prove my theory).  You can use the
http://googlecodesamples.com/oauth_playground/ to retrieve the xml.

  Yes we can relax the rules in the client-library, but i would like to make sure
that im solving the right problem.  Sorry about the delay in tackling this 
issue.

Cheers.

Original comment by vbarat...@gmail.com on 13 Mar 2009 at 11:58

@GoogleCodeExporter
Copy link
Author

Hi, sorry for the delay. Been in airplanes for a couple of days.
So, I can not reproduce the problem with a test account (I don't know what it 
takes
to get the bad orgTitle content in there). I do have the syndrome happening on 
300+
live user accounts though, and have been able to single-step through the client 
code
using one of those accounts (and also get packet traces of the wire data). I 
can't
just post that data here since it's real user data and hence sensitive. 
I can report that it always contains <gd:orgTitle></gd:orgTitle> (empty).
If there's a way to securely send you the data or a few affected usernames so 
you can
investigate, please let me know. You can get me at : david@nuevasync.com

Original comment by the.davi...@gmail.com on 15 Mar 2009 at 10:21

@GoogleCodeExporter
Copy link
Author

David,
    We have a fix in client library that will be available in upcoming release
(within next 2 weeks).  Also we are fixing this in server-side to handle this 
field
consistently.

Cheers.

Original comment by vbarat...@gmail.com on 16 Mar 2009 at 1:48

@GoogleCodeExporter
Copy link
Author

For those (like me) who are too impatient to wait for an official fix, attached 
is a 
patch.

Enjoy!

Original comment by baolongnt@gmail.com on 22 Mar 2009 at 3:34

Attachments:

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

You may find that the same patch has to be done for orgName as well.

Original comment by the.davi...@gmail.com on 25 Mar 2009 at 9:30

@GoogleCodeExporter
Copy link
Author

This should be fixed now.  Let use know if you have any issues.

Original comment by mon...@gmail.com on 27 Mar 2009 at 2:25

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

David/Baolngnt,
    Just to be clear, the Contacts API server has a fix.  so you wont see empty
orgName and orgTitle anymore.  We realized that even with the client-side fix, 
there
were still some outstanding issues.  So we have decided to keep the restriction 
in
the client code (i.e non-empty orgName and orgTitle) and ensure that the server
either yanks out the element or has a non-empty element.  Please let us know if 
you
see any issues.

Original comment by vbarat...@gmail.com on 27 Mar 2009 at 3:30

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

No branches or pull requests

1 participant