0

The JCache documentation https://cloud.google.com/appengine/docs/java/memcache/usingjcache describes how to use the api, however there is no mention of where to find the dependencies. I guessed on

<dependency>
  <groupId>javax.cache</groupId>
  <artifactId>cache-api</artifactId>
  <version>1.0.0</version>
</dependency>

which resolves all the classes except for CacheFactory. I found some old references to source forge but no mention of how to resolve these classes.

Maven error:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.3:compile (default-compile) on project appengine-helloworld: Compilation failure: Compilation failure: [ERROR] /Users/me/Google Drive/dev/app/src/main/java/com/example/appengine/helloworld/HelloServlet.java:[26,19] cannot find symbol [ERROR] symbol: class CacheFactory

Andrew
  • 716
  • 1
  • 8
  • 19

1 Answers1

0

This problems seems to originate from the use of the helloworld sample app that is generated when you follow the Hello, World! in 5 minutes guide https://cloud.google.com/appengine/docs/java/

I created a new project with the mvn archetype command described here https://cloud.google.com/appengine/docs/java/tools/maven#maven_requirements This creates a skeleton project with the appengine jar and resolves the jcache stuff

https://cloud.google.com/appengine/docs/java/tools/maven#maven_requirements

Specifically, the dependency is

<dependency>
  <groupId>com.google.appengine</groupId>
  <artifactId>appengine-api-1.0-sdk</artifactId>
  <version>${appengine.version}</version>
</dependency>
Andrew
  • 716
  • 1
  • 8
  • 19