Gradle appengine unit testing local development server error

buildship
eclipse
plugins

(pravanjan) #1

Hi ,
We have added junit test case for our appengine application . Appengine need the

appengine-api-stubs-1.9.38.jar
appengine-testing-1.9.38.jar to run those tests with junit. Now when i start the localhost server its show error as

java.lang.ClassCastException: com.google.appengine.tools.development.ApiProxyLocalImpl cannot be cast to com.google.appengine.tools.development.ApiProxyLocal
at com.google.appengine.api.blobstore.dev.ServeBlobFilter.init(ServeBlobFilter.java:55)…

To resolve this issue looks like i have to remove above two jar file . I have done the test by removing the jar and its works fine. However this is not a solution to the problem . I would like to know is there any way run the local server without remove the jars .

So far i have tried removing the jar from compile group and adding them as an external jar in libs folder and using the direct path like this
compile files(‘file:///Users/pravanjan/Documents/appengine testing/appengine-api-stubs-1.9.38.jar’)
compile files(‘file:///Users/pravanjan/Documents/appengine testing/appengine-testing-1.9.38.jar’)

Every time i build gradle i see those jars are getting cope from my local to ,/Users/pravanjan/Documents/mywork/IntegrationPlatform/build/exploded-app. Which intern cause the same error while running local host server.

Thanks,
pravanjan


(pravanjan) #2

The appengineRun started working by replacing the appenging test jars form compile group to providedComplile group : appengine-api-stubs-1.9.38.jar and appengine-testing-1.9.38.jar.

Thanks,
Pravanjan