question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot use Search API

See original GitHub issue

Edit: This is due to a GCloud issue: https://issuetracker.google.com/issues/63732823


I can’t get the Search API to work in my project if I switch from the old Gradle App Engine plugin to this new plugin. I’m able to replicate the same problem using the search example in java-docs-samples.

The hello world example java-docs-samples/appengine/helloworld-new-plugins that makes use of this new plugin works, and I’m able to run ./gradlew appengineRun and visit http://localhost:8080 without issue.

However, upon replacing the src folder in the hello world example with the one from the search example (java-docs-samples/appengine/search/src), modifying build.gradle to include the dependency com.google.appengine:appengine-api-1.0-sdk

dependencies {
  providedCompile group: 'javax.servlet', name: 'servlet-api', version:'2.5'
  compile 'com.google.appengine:appengine:+',
          'com.google.appengine:appengine-api-1.0-sdk:+'
// Add your dependencies here.

}

and running ./gradlew appengineRun, although the server starts up fine, visiting http://localhost:8080 results in an exception:

java.lang.IllegalAccessError: class com.google.appengine.repackaged.com.google.common.collect.HashMultimapGwtSerializationDependencies cannot access its superclass com.google.appengine.repackaged.com.google.common.collect.AbstractSetMultimap
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(Unknown Source)
	at java.security.SecureClassLoader.defineClass(Unknown Source)
	at java.net.URLClassLoader.defineClass(Unknown Source)
	at java.net.URLClassLoader.access$100(Unknown Source)
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java:195)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(Unknown Source)
	at java.security.SecureClassLoader.defineClass(Unknown Source)
	at java.net.URLClassLoader.defineClass(Unknown Source)
	at java.net.URLClassLoader.access$100(Unknown Source)
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java:195)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at com.google.appengine.api.search.Document$Builder.<init>(Document.java:85)
	at com.google.appengine.api.search.Document.newBuilder(Document.java:454)
	at com.example.appengine.search.DocumentServlet.doGet(DocumentServlet.java:66)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
...

Loading the page again results in another exception:

java.lang.IllegalAccessError: com/google/appengine/repackaged/com/google/common/collect/HashMultimap
	at com.google.appengine.api.search.Document$Builder.<init>(Document.java:85)
	at com.google.appengine.api.search.Document.newBuilder(Document.java:454)
	at com.example.appengine.search.DocumentServlet.doGet(DocumentServlet.java:66)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
...

The same thing happens in my own project whenever I try to access pages that use the Search API.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

8reactions
Alaa-Elletheycommented, Aug 7, 2017

I have the same issue in Maven Based Google App Engine Standard Java Runtime Project

5reactions
loosebazookacommented, Jul 27, 2017

Lets keep this open until we know it works with a future release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Graph API cannot use $search - Microsoft Q&A
Graph API cannot use $search. Hello all,. Graph API newbie here. I am trying to search for messages in the body of the...
Read more >
Cannot use Search API with cursor-based Pagination
I'm currently building a java client for Zendesk's Rest API and something doesn't ... Cannot use Search API with cursor-based Pagination.
Read more >
Cannot Use /search Stripe API - Queries and Resources
Hi, I added Stripe Resource Today. I was going to use /search API but any API wasn't found. I think maybe /search APIs...
Read more >
powershell - Graph API cannot use $search - Stack Overflow
I am really exhausted trying to find out why I cannot $Search to perform the same task. The following $search will just return...
Read more >
TypeError: cannot use 'in' operator to search for 'x' in 'y'
The in operator can only be used to check if a property is in an object. You can't search in strings, or in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found