Tuesday, May 29, 2012

Some Errors / Solutions down the way

appengine-web.xml does not contain a <threadsafe> element
Error
SEVERE: Received exception processing C:\Users\CA-DT\Documents\Eclipse Projects\loyaltycard\war\WEB-INF/appengine-web.xml
com.google.apphosting.utils.config.AppEngineConfigException: appengine-web.xml does not contain a <threadsafe> element.
See http://code.google.com/appengine/docs/java/config/appconfig.html#Using_Concurrent_Requests for more information.
You probably want to enable concurrent requests.

Description
http://code.google.com/appengine/docs/java/config/appconfig.html#Using_Concurrent_Requests

Solution
Add <threadsafe>true</threadsafe> to your war/WEB-INF/appengine-web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">

    <application></application>
    <version>1</version>
    <threadsafe>true</threadsafe>


WARNING: failed _ah_ServeBlobFilter: java.lang.ClassCastException
Error 
WARNING: failed _ah_ServeBlobFilter: java.lang.ClassCastException: com.google.appengine.tools.development.ApiProxyLocalImpl cannot be cast to com.google.appengine.tools.development.ApiProxyLocal

Description
  • appengine-api-labs 
  • appengine-api-stubs 
  • appengine-testing

The above mentioned files shouldn't be in the war/WEB-INF/lib directory. They are only thought as test libraries needed during Unit tests. 

Solution
  • Delete the files from the classpath.
  • Put the files in to another location such as c:\GWTTestLibs.
  • Add the files to the classpath as External Jars

The App Engine SDK 'C:\<workspace path>\<project name>\war' on the project's build path is not valid
Error
The App Engine SDK 'C:\<workspace path>\<project name>\war' on the project's build path is not valid

Description
There is a problem in the latest GAE plugin which prevents this from working. If you get an error like "The App Engine SDK 'C:\<workspace path>\<project name>\war' on the project's build path is not valid" proceed with following solution below.

Solution
  1. Open preferences -> Google -> App Engine and select the sdk version again
  2. Open preference -> Java Build Path -> Export Order. Change the Export order so that the App Engine SDK is ABOVE the "Web App Libraries" classpath container.

1 comment:

  1. Thanks. That tip on ClassCastException was very helpful!

    ReplyDelete