GithubHelp home page GithubHelp logo

ga-api-java-samples's People

ga-api-java-samples's Issues

"Authorization required" - Error message - from com.google.gdata.util.AuthenticationException

HELP ME, I got problem when trying to create New Spreadsheet using
Spreadsheet API.
1. The first, I make a function to create a new Spreadsheed and insert to
Google DocsService:

public DocumentListEntry createNewDocument(String title)
            throws IOException, ServiceException {
        DocumentListEntry newEntry = null;

        newEntry = new SpreadsheetEntry();

        newEntry.setTitle(new PlainTextConstruct(title));
        return docsService.insert(new URL(
        "http://docs.google.com/feeds/documents/private/full"),
                newEntry);
    }

2. I use Java code below to call function above, to create a new Speadsheet
which I name it "test-thuycq84":
                // declare a new entry  for spreadsheet 
        DocumentListEntry createdEntry = null;

        // Create an empty spreadsheet
        try {
            createdEntry = createNewDocument("test-thuycq84");
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (ServiceException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

        System.out.println("Spreadsheet now online @ :"+
createdEntry.getHtmlLink().getHref());

3. When i run program on Windows XP, expected output that:
"Spreadsheet now online @:<http://...>"

But it returns output with an error as below: 

com.google.gdata.util.AuthenticationException: Authorization required
<HTML>
<HEAD>
<TITLE>Authorization required</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Authorization required</H1>
<H2>Error 401</H2>
</BODY>
</HTML>

    at
com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(HttpGDataReque
st.java:508)
    at
com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse(GoogleGDataR
equest.java:555)
    at
com.google.gdata.client.http.HttpGDataRequest.checkResponse(HttpGDataRequest.jav
a:480)
    at
com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java:459)
    at
com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRequest.java:
527)
    at com.google.gdata.client.Service.insert(Service.java:1243)
    at com.google.gdata.client.GoogleService.insert(GoogleService.java:560)
    at com.google.gdata.client.media.MediaService.insert(MediaService.java:323)
    at uploadrms.testNewSS.createNewDocument(testNewSS.java:111)
    at uploadrms.testNewSS.init(testNewSS.java:92)
    at uploadrms.testNewSS.main(testNewSS.java:61)

############

What must I do to fix this problem? I need help...!!


Original issue reported on code.google.com by [email protected] on 5 Jan 2010 at 3:30

No XML schema association in appengine-web-xml files

What steps will reproduce the problem?
1. Set a project in Eclipse
2. Locate appengine-web.xml
3. Right-click it ans select "Validate"

It returns "No grammar constraints (DTD or XML schema) detected for the 
document.   appengine-web.xml   /myApp/war/WEB-INF  line 1  XML 
Problem" and the file is always flagged by a yellow attention marker. 

It should enumerate the errors found in the file. Schema validation is a 
powerful tool that should be better leveraged. Instead of reporting an XML 
error at the end of the deployment process. 

This is GAE 1.3.0 in Galileo under Windows XP

Original issue reported on code.google.com by [email protected] on 30 Dec 2009 at 4:24

Time Series Data example produces Service Exception due to malformed filter syntax

What steps will reproduce the problem?
1. issue a query for pageviews by pageTitle over time (about a 1 year period).
2. dynamic filter generation attempts to incorporate pageTitles retrieved from 
initial query, into subsequent query filters (I think that's what is going on 
anyway). 

What is the expected output? What do you see instead?
Expect to observe a valid query response, but a Service Exception is returned 
indicating malformed filter syntax, and a portion of the URL seems to be 
printed in the exception message (see below... I've replaced the actual site 
URL with pageurl for privacy's sake).

i.e., Service Exception: Malformed filter syntax: event)" 
onmouseout="OnMouseLeaveSpan(this)" id="tgt_1"><span 
class="UNKNOWN_WORD">pageurl.com</span> - ??????:</span> <span 
onmouseover="OnMouseOverSpanTran(this


What version of the product are you using? On what operating system?
r12, on Mac OS X.

Please provide any additional information below.
Perhaps the filter generation component needs to be modified to catch overly 
long filter values?  Maybe a regex filter expression could be dynamically 
included to prevent this, assuming my intuition on the cause of the error is 
correct.

Original issue reported on code.google.com by [email protected] on 26 Sep 2010 at 4:23

Changing authentication to OAuth does not work

What steps will reproduce the problem?
1. Follow the readme instructions to setup a sample  
2. Change the authentication to OAuth
3. Try to use the sample on appengine

What is the expected output? What do you see instead?
If you use AuthSub, the sample works. If you change the authentication 
subsystem to OAuth instead you can't authorize the access. The sample always 
brings you back to "Authorize with Google" link. If you run the sample using 
the devel/debug option in eclipse, it works ok. It does not work on appengine 
after deployment.

What version of the product are you using? On what operating system?
Version 1.3.5 of appengine-sdk, gdata v 1.41.5, eclipse helios.
Linux - Ubuntu 10.04

Please provide any additional information below.
The AuthSub subsystem always works ok. The problem is with OAuth subsystem. 
It's always repeating the step 7 and failing on step 8.

Original issue reported on code.google.com by [email protected] on 24 Aug 2010 at 5:11

README instructions are not complete

What steps will reproduce the problem?
1. Checkout the svn as a project in workspace
2. Open the README.txt and followed the instructions exactly
3. Complained about "Missing required argument 'module[s]'"
4. I was thinking entry points are missing
5. How do I deploy this as googleapp?

What is the expected output? What do you see instead?
Expecting to see the UI web pages with analytics data

What version of the product are you using? On what operating system?
Mac OS

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 2 Dec 2009 at 3:41

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.