Google Prediction API : Error 500 Internal Server Error - java

I'm trying to run the Prediction API example. Everything is configured by following these instructions, but the only message I received is:
500 Internal Server Error
{
"code" : 500,
"message" : null
}
Process finished with exit code 1
Could not find what I'm missing...
Any help is welcome.

I think you are using an older version of the Prediction API - v1.5. The current version is v1.6, you can find some sample code here - https://github.com/gxlzlihao/GooglePredictionAPISample/blob/master/src/main/java/com/google/api/services/samples/prediction/cmdline/PredictionSample.java

Related

com.google.api.client.auth.oauth2.TokenResponseException: 400 Bad Request (Eclipse)

I have been stuck at "Deploy to APP Engine" from Eclipse, and following error message always popped up. Possible actions what I can think of were taken but all failed.
An error occurred while retrieving projects: com.google.api.client.auth.oauth2.TokenResponseException: 400 Bad Request
{
"error" : "invalid_grant",
"error_description" : "Bad Request"
}
com.google.api.client.auth.oauth2.TokenResponseException: 400 Bad Request
{
"error" : "invalid_grant",
"error_description" : "Bad Request"
}
Here is my situation what I have right now.
Application(Java Servlet) run normally in debug level
"Deploy to App Engine" from Eclipse was working fine in 2018 around
Available software have been up to date
I followed instruction of Java 8 Deploy manual (Google), and re-init the project and authenticated my account successfully
https://cloud.google.com/appengine/docs/standard/java/building-app/environment-setup?hl=ja
Does anyone help me to solve this problem? I want to deploy my application to the Google Cloud Platform.
I cloud resolve this problem by signing out and back into the Google Plugin for Eclipse. The OAuth tokens had been expired since I kept logged in my google account in 2018.

Java integration with Docu Sign

I am trying to integrate docusign with java application.
I am following Github example which is working.
https://github.com/docusign/docusign-java-client
Here I am just changing Integrator key,clientId and private key but is not working.
https://github.com/docusign/docusign-java-client/blob/master/src/test/java/SdkUnitTests.java
Here I have attached how I am copying key and id etc...
https://gitlab.com/sanju24689/docusign
Here I have also attached my code also.
It's giving me error like
"com.docusign.esign.client.ApiException: Error while requesting an
access token: POST https://account-d.docusign.com/oauth/token returned
a response status of 400 Bad Request"
See the stack trace
Please try starting with the Java webapp that is ready to go--it is a complete project.
See eg-03-java-auth-code-grant

500 Internal Server Error while sending a message to a Service Bus topic through Azure Java SDK

I have a problem when try to send a message to a service bus topic through java azure sdk, I receive 500 Internal Server Error.
I prepared code based on this link: https://azure.microsoft.com/en-us/documentation/articles/service-bus-java-how-to-use-topics-subscriptions/ and my code looks like below:
Configuration config = ServiceBusConfiguration.configureWithSASAuthentication(
"NAMESPACE",
"SAS_NAME",
"SAS_KEY_VALUE",
".servicebus.windows.net");
ServiceBusContract service = ServiceBusService.create(config);
try {
BrokeredMessage message = new BrokeredMessage("Message content");
service.sendTopicMessage("TOPIC_NAME", message);
} catch (ServiceException e) {
e.printStackTrace();
}
I'm able to send a message with the same config values with .NET code.
And here is the exception that I receive: "com.sun.jersey.api.client.UniformInterfaceException: POST https://NAMESPACE.servicebus.windows.net/TOPIC_NAME/messages?api-version=2013-07 returned a response status of 500 Internal Server Error"
I have also a question about api-version. Why a library put so old api-version in the request? I use the latest version of azure sdk from maven repository:
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-servicebus</artifactId>
<version>0.9.3</version>
</dependency>
I tried to reproduce your issue, but failed to not get any error information.
According to the REST API “Send Message”, the 500 status code means internal error that's not caused by your client source code.
So I think you can try to run the code again.
Could you share more information for helping analyze the issue if you still get the same error or others?
Any concern, please feel free to let me know.
I finally manage to find the reason of the issue. The real error is "There is no matching subscription found for the message with MessageId ..". This error occurs when in a topic configuration an option "Filter message before publishing" is checked and no matching subscription exists.
The problem is that a call to Azure REST API, which is used by Azure Java SDK, instead of information about no matching subscription found, returns just 500 Internal Server Error.. Only a call from Azure .NET SDK returns an exception with a useful comment.

Google Adwords reports error

We are using Google ad-libs v201506 jar. While downloading google adwords reports, intermittently we get the error
org.xml.sax.SAXParseException: Open quote is expected for attribute "lang" associated with an element type "html".
I see that response code is 502 ( bad gateway ) and it appears that the parser is trying to parse the error message from the HTTP response and fails.
Has anyone using the this library seen this error or know a way to fix this?
An "AdWords API Forum" thread from 2013 indicates that one person solved a similar issue by changing from the AdWords sandbox environment to production.

TaskQueueSample.java : Code 403

I am trying to make the sample works so here is the code :
Sample Code
The documentation for the installation is there:
Installation documentation
I had a little problem on the step:
Click on "API Access", and then on "Create an OAuth 2.0 Client
ID...". Enter a product name and click "Next".
The UI of the console has been upgraded probably so I use those data for the authentication in the console:
Then I run the program and it brings me to the webpage to allow the app and then i got the following error message in the console:
403 Forbidden
{
"code" : 403,
"errors" : [ {
"message" : "you are not allowed to make this api call"
} ],
"message" : "you are not allowed to make this api call"
}
My queue.xml ACL is set with the email i used to authenticate
Why don't you use the native TaskQueue-API from the GAE Java SDK? You don't need to set up credentials, connection, ... .
You can see an example on the GAE Docs - here a Pull Queue, but you can also use a Push Queue if you want (an example is also in the GAE Docs).
Which one of the examples do you want to launch on the google app engine? On your posted link are many examples available :) . Tell me if you really want to use the Google-API to access the TaskQueues.

Categories