Unit Tests for Google App Engine in MAIA

Hi,

I'm using MAIA build 10372, primarily for the integration of GWT and Google App Engine.  It's mostly working well, but I'm running into a problem when trying to run unit tests.  I'm following the instructions provided by google.  When I do a build, GAE (or perhaps the plugin) is creating out/production/Recipes/META-INF/jdoconfig.xml.   This is fine, until I try to run the unit tests, because I then end up with two copies of this file on the classpath- out/production/Recipes/META-INF/jdoconfig.xml and src/META-INF/jdoconfig.xml.  How can I configure the project properly so that there are no duplicates on the classpath?  Thanks.

/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/bin/java -Dgwt.args=-gen /Users/armhold/Library/Caches/IntelliJIDEA9M1/gwt/recipes.recipesea699bb7/Recipes.4dd34334/test/gen -out /Users/armhold/Library/Caches/IntelliJIDEA9M1/gwt/recipes.recipesea699bb7/Recipes.4dd34334/test/www -Dfile.encoding=MacRoman -classpath /Users/armhold/gwt-versions/gwt-mac-1.7.0/gwt-dev-mac.jar:/Users/armhold/Documents/beanstalk/recipes/test:/Users/armhold/Documents/beanstalk/recipes/src:/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/lib/deploy.jar:/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/lib/dt.jar:/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/lib/javaws.jar:/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/lib/jce.jar:/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/lib/management-agent.jar:/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/lib/plugin.jar:/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/lib/sa-jdi.jar:/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/../Classes/alt-rt.jar:/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/../Classes/charsets.jar:/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/../Classes/classes.jar:/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/../Classes/dt.jar:/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/../Classes/jce.jar:/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/../Classes/jconsole.jar:/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/../Classes/jsse.jar:/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/../Classes/laf.jar:/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/../Classes/management-agent.jar:/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/../Classes/ui.jar:/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/lib/ext/apple_provider.jar:/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/lib/ext/dnsns.jar:/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/lib/ext/localedata.jar:/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/lib/ext/sunjce_provider.jar:/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/lib/ext/sunpkcs11.jar:/Users/armhold/Documents/beanstalk/recipes/out/test/Recipes:/Users/armhold/Documents/beanstalk/recipes/out/production/Recipes:/Users/armhold/gwt-versions/gwt-mac-1.7.0/gwt-user.jar:/Applications/IntelliJ IDEA 9.0M1.app/lib/javaee_6.jar:/Users/armhold/Documents/beanstalk/recipes/war/WEB-INF/lib/appengine-api-1.0-sdk-1.2.5.jar:/Users/armhold/Documents/beanstalk/recipes/war/WEB-INF/lib/geronimo-jpa_3.0_spec-1.1.1.jar:/Users/armhold/Documents/beanstalk/recipes/war/WEB-INF/lib/datanucleus-jpa-1.1.5.jar:/Users/armhold/Documents/beanstalk/recipes/war/WEB-INF/lib/datanucleus-core-1.1.5.jar:/Users/armhold/Documents/beanstalk/recipes/war/WEB-INF/lib/appengine-api-labs-1.2.5.jar:/Users/armhold/Documents/beanstalk/recipes/war/WEB-INF/lib/gwttheme.jar:/Users/armhold/Documents/beanstalk/recipes/war/WEB-INF/lib/datanucleus-appengine-1.0.3.jar:/Users/armhold/Documents/beanstalk/recipes/war/WEB-INF/lib/geronimo-jta_1.1_spec-1.1.1.jar:/Users/armhold/Documents/beanstalk/recipes/war/WEB-INF/lib/jdo2-api-2.3-eb.jar:/Users/armhold/Documents/beanstalk/recipes/war/WEB-INF/lib/gwt-servlet.jar:/Users/armhold/appengine-java-sdk-1.2.5/lib:/Users/armhold/appengine-java-sdk-1.2.5/lib/appengine-tools-api.jar:/Applications/IntelliJ IDEA 9.0M1.app/lib/junit-4.6.jar:/Users/armhold/appengine-java-sdk-1.2.5/lib/impl/appengine-api-labs.jar:/Users/armhold/appengine-java-sdk-1.2.5/lib/impl/appengine-api.jar:/Users/armhold/appengine-java-sdk-1.2.5/lib/impl/appengine-api-stubs.jar:/Users/armhold/appengine-java-sdk-1.2.5/lib/impl:/Users/armhold/appengine-java-sdk-1.2.5/lib/impl/appengine-local-runtime.jar:/Applications/IntelliJ IDEA 9.0M1.app/lib/idea_rt.jar com.intellij.rt.execution.junit.JUnitStarter -ideVersion5 -junit4 com.armhold.recipes.server.RecipeDAOTest

java.lang.ExceptionInInitializerError
     at com.armhold.recipes.server.RecipeDAO.persistRecipe(RecipeDAO.java:27)
     at com.armhold.recipes.server.RecipeDAOTest.testFoo(RecipeDAOTest.java:48)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:91)
     at org.junit.runner.JUnitCore.run(JUnitCore.java:159)
     at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:43)
Caused by: javax.jdo.JDOFatalUserException: Duplicate PMF name "transactions-optional" found in file:/Users/armhold/Documents/beanstalk/recipes/src/META-INF/jdoconfig.xml and file:/Users/armhold/Documents/beanstalk/recipes/out/production/Recipes/META-INF/jdoconfig.xml.
     at javax.jdo.JDOHelper.getNamedPMFProperties(JDOHelper.java:1300)
     at javax.jdo.JDOHelper.getPropertiesFromJdoconfig(JDOHelper.java:1232)
     at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:1079)
     at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:914)
     at com.armhold.recipes.server.PMF.<clinit>(PMF.java:7)
     ... 20 more


Process finished with exit code 255

2 comments
Comment actions Permalink

I am also having this issue.  Is there a bug report on this?

--Jeff

0
Comment actions Permalink

FWIW I get this error too.

Seems there's an issue reported:
http://youtrack.jetbrains.net/issue/IDEADEV-40407

Still no workaround AFAIK

0

Please sign in to leave a comment.