Oauth error no such method - google-app-engine

I don't know why, but when I launch my application I suddenly always receive the following error (that before never appeared):
java.lang.NoSuchMethodError: com.google.gdata.client.authn.oauth.GoogleOAuthParameters.setOAuthType(Lcom/google/gdata/client/authn/oauth/OAuthParameters$OAuthType;)
The line of code generating the error is:
oauthParameters.setOAuthType(OAuthParameters.OAuthType.TWO_LEGGED_OAUTH);
That error wasn't appeared before, always in eclipse there wasn't an error and all was working fine.
I've never changed library. It seems that when I deploy to app-engine it doesn't upload the jar with that class?

Since you're only seeing this issue when you deploy, it sounds like you've included the gdata-java-client jars in a location so that they are visible to your local Java runtime, but are not sent to the App Engine server upon deployment.
The easiest way to resolve this is to include the gdata-java-client and its dependencies in the war/WEB-INF/lib directory of your application, and to reference those jars in your Java build path within Eclipse.

Related

reactjs: files served into public folder resolve into a 404 error in production build but work in development with npm start

I am trying to serve 2 files needed by javascript for a web assembly package. The files example.wasm and example.data are in the public folder in the react js project file structure. When running with a development server using npm start, the files can be found by the project and can be read correctly. When building the project the files end up in the root directory of the project as expected. In spite of using the current PUBLIC_URL path for the files, the files can not be found, but the paths in the web console seem to be correct.
I am hosting the reactjs app from IIS 7.
Can you help me with the process to debug the problem described above?
Thank you in advance for your help.
After the help of #LexLi I have enabled the Failed Request Tracing Module in the IIS following this documentation:
[https://learn.microsoft.com/en-us/iis/troubleshoot/using-failed-request-tracing/troubleshooting-failed-requests-using-tracing-in-iis][1]
Reading the log generated by the Failed Request Tracing Module I saw that when requesting the files example.wasm and example.data from the server the actual error was not 404 Not Found but:
SECURITY_DENIED_BY_MIMEMAP
After googling the error above I realized that the Default MIME Types configured in the IIS do not include files with extensions .data and .wasm. After adding those MIME Types to the IIS configuration using the MIME Type Module in the Web Server Level in IIS Management and restarting the server the problem was resolved.

Sencha Production build throws 4o4 resource not found error while deploying it to Tomcat

I am working on EXTJS6 Application. This application is created and run using sencha cmd. While I work locally, i run the application using sencha cmd without any issues.
I generated the production build and it worked fine I tested it using sencha cmd server but however, while I deployed the production build to the Tomcat/Webapps folder, it throws, resource not found error while hitting the index.html
While hitting below URL
/MyApp/index.html >>
I get this error >>
NetworkError: 404 Not Found - https://servername.net:36443/MyApp/.js?_dc=20160711183504"
I am not sure if I need to make any changes in the app.json or other config files before moving to other servers like Tomcat. Did any one face similar issue?
When you get this error message (missing file with ".js" filename) it's because you're missing a require for a desired class. You need to make sure that any class you use is included in the "requires" list in the calling class.

Pycharm Run server error no app.yaml file at '.' for google app engine project

I'm pretty new with Pycharm and since this morning i have tried different configuration to use the Run command with an existing Google app engine project but without success.
I have a pretty clear error :)
google.appengine.tools.devappserver2.errors.AppConfigNotFoundError: no app.yaml file at '.'
Nothing wrong with that because the existing project use a custom file call app_dev.yaml. So it's normal that Pycharm is unable to load the server.
How can i change this behaviour and tell Pycharm to use app_dev.yaml instead of app.yaml?
Is it possible?
Thanks
I input an app.yaml on root directory and reloading my project, this working for me.
While the PY-9714 issue was, indeed, closed without a resolution, the automatic '.' added to the Run configuration has been reconsidered in PY-10675 in light of GAE support for multiple modules/services inside the same application and/or request routing using a dispatch.yaml file.
So in the more recent PyCharm versions it's possible to specify one or more .yaml files as options in the Run configuration. See for an example Pycharm multiple modules Run server
For those still running an older Pycharm version without the fix, a solution using a wrapper script is described in Run App Engine development server with modules in PyCharm

AppEngine: Unable to update app: Failed to compile jsp files

I just update my AppEngine SDK from 1.7.0 to 1.7.5 because of the problem related to adding document in Full Text Search API.
But now, I can not upload the application.
Here are the errors:
Deploying to Google' has encountered a problem
Unable to update app: Failed to compile jsp files.
In the log file:
Unable to update:
com.google.appengine.tools.admin.JspCompilationException: Failed to compile jsp files.
at com.google.appengine.tools.admin.Application.compileJsps(Application.java:756)
at com.google.appengine.tools.admin.Application.createStagingDirectory(Application.java:592)
at com.google.appengine.tools.admin.AppAdminImpl.doUpdate(AppAdminImpl.java:370)
at com.google.appengine.tools.admin.AppAdminImpl.update(AppAdminImpl.java:53)
at com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl.deploy(AppEngineBridgeImpl.java:433)
at com.google.appengine.eclipse.core.deploy.DeployProjectJob.runInWorkspace(DeployProjectJob.java:148)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Any help? Thanks
Well you need to have the JDK pointing in your build path of eclipse.
Click on Installed JREs and point it upto your JDK installed location.
If that even didn't work go to eclipse.ini file in your eclipse directory. Add the following argument.
-vm
C:\Program Files\Java\jdk_1.6.30\bin\javaw.exe
Then restart your eclipse and things will start working.
Run the app on your local development server, you will discover the JSP files have errors that you need to sort out before compiling.

DataNucleus Enhancer doesn't work

I'm writing a web app using Google AppEngine and Spring MVC. I carefully upgraded to the v2 of the DataNucleus pluging by following these steps: http://code.google.com/p/datanucleus-appengine/wiki/UpgradingToVersionTwo (I use Eclipse).
When I try to run the Enhancer Tool I get following error:
Exception in thread "main" Plugin (Bundle) "org.datanucleus" is already registered. Ensure you dont have multiple JAR versions of the same plugin in the classpath. The URL
"file:/.../eclipse/plugins/com.google.appengine.eclipse.sdkbundle_1.6.4.v201203300216r37/appengine-java-sdk-1.6.4/lib/opt/user/datanucleus/v2/datanucleus-core-3.0.6.jar" is already registered, and you are trying to register an identical plugin located at URL
"file:/.../eclipse/plugins/com.google.appengine.eclipse.sdkbundle_1.6.4.v201203300216r37/appengine-java-sdk-1.6.4/lib/opt/tools/datanucleus/v2/datanucleus-core-3.0.6.jar."
I formatted the message so that you could see the tiny difference, one jar is loaded from "user" directory, the other one from "tools" directory. I don't understand why. In the project build path, there is only the one from "user" and to the DataNucleus configuration I added the one from "tools", just like the howto above suggested.
In other cases I've seen around this message was mostly caused by conflicting versions of datanucleus plugin but it doesn't apply to me. I guess it's just some stupid thing in my case... so what am I doing wrong?
So after all, I didn't read the instructions as carefully as I thought. The problem was really that the jars were there twice, one in the project build path, one in the datanucleus configuration. It shouldn't be in the project build path (or in fact, it shouldn't be in one of them, doesn't matter which one). I added it there automatically when I copied libs to the war directory and I assumed it had to be done. But the instructions clearly say that only jdo-api needs to be in the project build path.
One thing I don't understand though. In one step of the instructions I had to uncheck "use project classpath when running tools" in the DataNuclues configuration. So how is it possible that the plugin was still using the libs configured in the project build path?

Resources