Usually NoSuchMethodError happens because you have mismatched jar versions.
 Doublecheck the GAE libs on your classpath, especially the testing jars -
they don't have the version # in the filenames so it's easy to get the
wrong ones.

Jeff

On Sun, Dec 4, 2011 at 5:41 PM, b <[email protected]> wrote:

> I am trying to setup a JUnit testing environment using the HRD,
> Objectify 3.1, and the LocalServiceTestHelper to use a
> LocalDatastoreServiceTestConfig() as it's config. I am including the
> JUnit 4.10, appengine-api-stubs, appengine-testing jars as well. It's
> running on OSX. My problem is that the tearDown method for the
> LocalServiceTestHelper in an @After section of the test seems to throw
> an :
>
> java.lang.NoSuchMethodError:
>
> com.google.appengine.tools.development.LocalServiceContext.getAppDir()Ljava/
> io/File;
>        at
>
> com.google.appengine.api.datastore.dev.LocalDatastoreService.init(LocalDatastoreService.java:
> 254)
>        at
>
> com.google.appengine.tools.development.ApiProxyLocalImpl.startServices(ApiProxyLocalImpl.java:
> 380)
>        at com.google.appengine.tools.development.ApiProxyLocalImpl.access
> $600(ApiProxyLocalImpl.java:42)
>        at com.google.appengine.tools.development.ApiProxyLocalImpl
> $2.run(ApiProxyLocalImpl.java:363)
>        at com.google.appengine.tools.development.ApiProxyLocalImpl
> $2.run(ApiProxyLocalImpl.java:361)
>        at java.security.AccessController.doPrivileged(Native Method)
>        at
>
> com.google.appengine.tools.development.ApiProxyLocalImpl.getService(ApiProxyLocalImpl.java:
> 360)
>        at
>
> com.google.appengine.tools.development.testing.LocalServiceTestHelper.getLocalService(LocalServiceTestHelper.java:
> 300)
>        at
>
> com.google.appengine.tools.development.testing.LocalDatastoreServiceTestConfig.getLocalDatastoreService(LocalDatastoreServiceTestConfig.java:
> 142)
>        at
>
> com.google.appengine.tools.development.testing.LocalDatastoreServiceTestConfig.tearDown(LocalDatastoreServiceTestConfig.java:
> 137)
>        at
>
> com.google.appengine.tools.development.testing.LocalServiceTestHelper.tearDown(LocalServiceTestHelper.java:
> 262)
>        at com.aikicode.jekyll.ds.DSBasicTest.tearDown(DSBasicTest.java:24)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> 39)
>        at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
> 25)
>        at java.lang.reflect.Method.invoke(Method.java:597)
>        at org.junit.runners.model.FrameworkMethod
> $1.runReflectiveCall(FrameworkMethod.java:45)
>        at
>
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:
> 15)
>        at
>
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:
> 42)
>        at
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:
> 36)
>        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
>        at
>
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:
> 68)
>        at
>
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:
> 47)
>        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
>        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
>        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
>        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
>        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
>        at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
>        at
>
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:
> 50)
>        at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:
> 38)
>        at
>
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:
> 467)
>        at
>
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:
> 683)
>        at
>
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:
> 390)
>        at
>
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:
> 197)
>
> Exception
>
>
> At one point I had the local datastore working on another project, but
> I can't seem to get the thing configured to work anymore. Are there
> entries to configuration files, or program or vm arguments I need to
> set this up properly? Maybe incompatible libraries? Any help would be
> greatly appreciated.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>
>


-- 
We are the 20%

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to