I am using Eclipse Indigo with Google AppEngine SDK (and no GWT)
Project setup starting with a clean default project:
Java in use is the Oracle JDK 7 but changed project settings to generate 1.6 code and source code compatibility also set to 1.6
Added 2 external jars to BuildPath from Glassfish Java EE 6 + JDK 7 installation
jersey-core.jar
jersey-gf-server.jar
jersey-gf-server.jar contains com.sun.jersey.spi.container.servlet.ServletContainer
Fixed Eclipse markers complaining that the jar files would not be found in the deployed app -- accepted suggested fix for each to copy them to war/WEB-INF/lib folder
Deployed successfully
Upon accessing the regular non-Jersey hello-world servlet, I get the error in AppEngine logs: java.lang.ClassNotFoundException: com.sun.jersey.spi.provider.container.servlet.ServletContainer
the class ServletContainer is in the jersey-bundle.jar
You should add jersey-servlet.jar as well. At some point this class was migrated there.
Related
I have a Google App Engine project in IntelliJ. I have been working on it for a while but suddenly I can't launch the local development server from IntelliJ anymore.
When I launch Intellij I get this message in Event log:
Java language level not supported: One or more modules in this project use a version of App Engine that does not support Java 8. Please click here to automatically change them to use the Java 7 language level.
If I try to launch the local server I get this error:
Error running 'Google App Engine Standard Local Server'
Error running Google App Engine Dev Server.
Exception occurred : com.google.cloud.tools.appengine.api.AppEngineException
Exception message : java.nio.file.NoSuchFileException: WEB-INF\appengine-web.xml
I can see from my version control system that appengine-web.xml or build.gradle have not changed.
If I run 'gradlew appenginerun' it works ok.
How can I see what modules are not supported on Java 8?
I imported the project again from gradle.
Seems to work now.
I recently installed GPE for eclipse Luna 4.4. However, I have to use jre 1.6 instead of jre 1.7. After modifying the Build Path and changing the JRE 1.7 to JRE 1.6. I am getting an JVM error "Main Class com.google.appengine.tools.enhancer.Enhance not found". Does anyone know how to fix this issue?
The Google Plugin for Eclipse is compiled for Java 1.7. The byte code will not run in a Java 1.6 VM. If you really have to use Java 1.6, you cannot use the GPE.
As of two years ago, App Engine removed Java 6 support. It now only supports Java 7 (and Java 8 if it's set to compile for Java 7). So with or without the plugin, you need to upgrade to Java 7 if you're going to deploy and run your app on App Engine.
I use the Google App Engine SDK 1.8.5 with Eclipse 3.8 on Ubuntu.
I want to add the Cloud Storage service to my app, so I downloaded guava-gwt-15.0.jar and appengine-gcs-client-0.3.jar, and put them in my apps /war/WEB-INF/lib/ folder. I also added these jars to the build path in Eclipse.
When I fire up my app in dev mode, it runs fine, at least until I try to access a page relevant to the GCS library. When I do that, I get the following error:
java.lang.NoClassDefFoundError: com/google/common/base/Preconditions
at com.google.appengine.tools.cloudstorage.GcsServiceImpl.<init>(GcsServiceImpl.java:35)
at com.google.appengine.tools.cloudstorage.GcsServiceFactory.createGcsService(GcsServiceFactory.java:32)
... etc
I cleaned my project and restarted Eclipse multiple times, and still the problem persists. What to do?
In addition to Guava for GWT, you also need the core Guava library (guava-15.0.jar). Download the .jar to war/WEB-INF/lib and add it to you build path as well.
I am trying to use Google App Engine on Netbeans 7.2. I get the plugin from http://kenai.com/downloads/nbappengine/NetBeans7.2/ , but when I am running it, I get "Missing value for property jvmargs".
I use sample project, so there shouldn't be any problem at all.
Does anyone know how to fix this?
Check and make sure your PATH environment variable includes the Program Files/Java/jdk.#.#_##/bin directory. If it is pointed at something else it probably won't work that's what my problem was. Make sure your project is using 6 JDK or lower because google app engine does not support JDK 7 at this time.
Found a post somewhere that said to use the plugin for Netbeans 6.7 which does mostly work in Netbeans 7.2.1.
Had to do the following to get it working.
- Goto Plugin->Settings and add
http://kenai.com/downloads/nbappengine/1.0_NetBeans671/updates.xml
- Goto Plugin->Available Plugins search for Google and install all the appengine plugins
- Create a appengine server under services
- Create a new project for an app server other than appengine (i used glassfish)
- After the project is created goto properties->run and switch to app engine
- Add false to appengine-web.xml
I'm running Windows 8, Netbeans 7.2.1, jdk1.7.0_11
i created one web application for accessing google bigtable.
but i shows the following error how to solve this
Description Resource Path Location Type
Your Web Application Project must be configured to use a JDK in order to use JSPs. guestbook.jsp /cftljpa/war Unknown Google App Engine Problem
how to solve this
Both the local App Engine server and the deployment process need to run javac in order to compile your JSPs. If your project isn't set to use a JDK ("Java Development Kit", which includes javac), then the JSPs can't be compiled.
Go to Preferences > Java > Installed JREs and make sure that you have a JDK installed -- if you don't, you can easily download one. Now right-click on your project and choose Properties > Java Build Path > Libraries and make sure that your project is using this JDK