AppEngine Error: java.lang.NoSuchMethodError: com.google.appengine.api.search.Index.add - google-app-engine

Im using AppEngine SDK 1.7.0 in my webapp. Recently, errors was log as
Caused by: java.lang.NoSuchMethodError:
com.google.appengine.api.search.Index.add([Lcom/google/appengine/api/search/Document;)
Lcom/google/appengine/api/search/AddResponse;
The error just happened recently, it doesn't have the problem before.

I believe they(google) have changed Index.add() to Index.put(Document ...docs), regards to the latest version of API doc.
https://developers.google.com/appengine/docs/java/javadoc/com/google/appengine/api/search/Index

AddResponse was deprecated and removed from the SDK.
http://code.google.com/p/googleappengine/wiki/SdkForJavaReleaseNotes
You need to remove all reference to that class and then redeploy.

Related

Cordova FileTransfer abort error

I am using cordova to develop my app. When i using file transfer plugin, the following error occurred.
{"target":"file:\/\/\/storage\/emulated\/0\/com.ibm.systems.supportassistant\/001\/1.1.0.12.zip","http_status":200,"code":3,"source":"http:\/\/messagefindertest.mybluemix.net\/001\/1.1.0.12.zip","exception":"length=4096; regionStart=0; regionLength=-2467"}
java.lang.ArrayIndexOutOfBoundsException: length=4096; regionStart=0; regionLength=-2467
Error message in detail
Any help in resolving the issue is appreciated
I've got the answer. It is a bug of the file transfer plugin. This bug have been fixed by the new version on CB-8431 Catch workaround for fatal exception.

Issue after updating resteasy 3.0.8 NOT FOUND EXCEPTION

after i updated my sample app to resteasy 3.0.8.FINAL the path can't be resolved. Before the update the app was running on resteasy 3.0.6.FINAL without any issues.
I'm using the solution with the ResteasyBootstrap listener. I checked the release notes for 3.0.7 / 3.0.8 but i couldn't find any big breaking change here.
on github you can find my sample app

GAE: java.lang.NoSuchMethodError: com.google.api.client.json.GenericJson.set

Starting from June, 12 my app that is used DriveAPI faced the following error (it's shown in GAE server log):
java.lang.NoSuchMethodError: com.google.api.client.json.GenericJson.set(Ljava/lang/String;Ljava/lang/Object;)Lcom/google/api/client/json/GenericJson;
at com.google.api.client.googleapis.auth.oauth2.GoogleClientSecrets$Details.set(GoogleClientSecrets.java:166)
at com.google.api.client.googleapis.auth.oauth2.GoogleClientSecrets$Details.set(GoogleClientSecrets.java:87)
at com.google.api.client.json.JsonParser.parse(JsonParser.java:357)
at com.google.api.client.json.JsonParser.parseValue(JsonParser.java:586)
at com.google.api.client.json.JsonParser.parse(JsonParser.java:350)
at com.google.api.client.json.JsonParser.parseValue(JsonParser.java:586)
at com.google.api.client.json.JsonParser.parse(JsonParser.java:289)
at com.google.api.client.json.JsonParser.parse(JsonParser.java:266)
at com.google.api.client.json.JsonParser.parseAndClose(JsonParser.java:141)
at com.google.api.client.json.JsonFactory.fromInputStream(JsonFactory.java:223)
at com.google.api.client.googleapis.auth.oauth2.GoogleClientSecrets.load(GoogleClientSecrets.java:195)
at finbudget.server.handlers.lists.cronimport.AutoImportBackend.doImport(AutoImportBackend.java:112)
at finbudget.server.handlers.lists.cronimport.AutoImportBackend.doPost(AutoImportBackend.java:76)
......
It seems like this problem comes with 1.8.1 version of AppEngine release. Before it worked well... Did someone have the same problem? And what could be the solution for this?
It's a classpath collision.
If war/WEB-INF/lib contains multiple versions of the DriveAPI jars, strange issues may result from the wrong version loading during runtime. Removing outdated jars solves the problem.
(Note: I copied and formatted the answer that the original asker added to the question via an edit. I did this as a cleanup task.)

SolrJ HttpSolrServer throwing NoHttpResponseException during instantiation

SolrJ is throwing NoHttpResponseException when trying to instantiate HttpSolrServer. Anyone knows why?
In the code I do:
SolrServer server = new HttpSolrServer ("http://localhost:8983/solr/"); // or some other url.
and it throws:
javax.servlet.ServletException: java.lang.NoClassDefFoundError: org/apache/http/NoHttpResponseException
I'm using Solr and SolrJ 4.1.0
I dont know if your problem was the same as mine but i thought that i'm getting the same exception until i noticed that i'm having the exception noClassFound :NoHttpResponseException and just by adding this package httpclient-4.1.3 the issue was solved.
hope this helps.
I had the same problem, but I used solrj-4.3.1. You need org.apache.httpcomponents:httpcore jar on your classpath to resolve this problem.
I used httpcore-4.2.5.jar
My problem wasn't even solved after adding httpclient-4.x.x. I added all the libraries being distrubuted by solr-4.4.0 , dist folder. After that my problem got resolved.
you problem was the same as mine. i solved the problem by adding the package httpclient-.jar and the package httpcore-.jar. i hope this help for you
I to had same problem but after adding the following 3 jars I was able to fix it.
1. httpclient
2. httpcore
3. httpmime
And these suitable jars provided in your respective solr framework.
Example I am using solr4.7.2 and these jars are present in folder as solr-4.7.2\dist\solrj-lib\

Google App Engine using maven

I've been trying to create a single project which can run both on sql and gae (where the 'datanucleus.properties' file needs to be changed) under a single maven folder structure. I first tried to get the Greeting example on the GAE website using mysql (this now works). Then, inspiring myself from beardedgeeks tutorial, I have tried to add the required dependencies so as to run the stuff on gae. By typing in mvn gae:run, however, I get the following error, posted at http://pastebin.com/fJ7c7xfx. I have spent a large amount of time searching google etc. for answers, but haven't been able to advance my case.
I would be glad to get some pointers.
Cheers,
manojo
This question is tagged [JDO] but the following trace:
Caused by: java.lang.ClassNotFoundException: javax.persistence.InheritanceType
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java:151)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 77 more
suggests that you're missing the JPA API jar (provided by org.apache.geronimo.specs:geronimo-jpa_1.0_spec:1.1.1).
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jpa_3.0_spec</artifactId>
<version>1.1.1</version>
</dependency>
Since you're not using JPA, you shouldn't have to do that but it appears that the JPA API is somehow referenced by the datanucleus appengine plugin as explained by #Datanucleus.
The people at Google unwisely put a reference in to that JPA class in their plugin and so it requires that you have the jpa.jar (the Geronimo one will do) in your CLASSPATH. An issue was raised on them a long time ago to fix it, but sadly they don't actively maintain their plugin.

Resources