GuiceBerry 3.0.4 doesn't work with recent Guava releases

105 views
Skip to first unread message

Diwaker Gupta

unread,
Apr 20, 2011, 8:24:35 PM4/20/11
to guiceber...@googlegroups.com
GuiceBerry uses classes in com.google.common.testing but they have been removed from recent Guava releases (absent since r08 at least). When I try to use GuiceBerry with JUnit4, I get a stack trace like:

java.lang.NoClassDefFoundError: com/google/common/testing/TearDownAccepter
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at com.google.guiceberry.GuiceBerryUniverse.<clinit>(GuiceBerryUniverse.java:55)
at com.google.guiceberry.GuiceBerry.<clinit>(GuiceBerry.java:43)
at com.google.guiceberry.junit4.GuiceBerryRule$1.evaluate(GuiceBerryRule.java:51)
at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
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)
Caused by: java.lang.ClassNotFoundException: com.google.common.testing.TearDownAccepter
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 30 more

Suggestions?

Diwaker Gupta

unread,
Apr 20, 2011, 8:33:01 PM4/20/11
to guiceber...@googlegroups.com
It seems that the classes are available here:

But there is no maven dependency for them.

Luiz-Otavio Zorzella

unread,
May 27, 2011, 4:45:20 PM5/27/11
to guiceber...@googlegroups.com
Yes, you need tl4j (I also own that project). These classes are not
(yet) part of Guava (some of them might be in the future). The maven
situation is still a problem -- I don't know enough about maven to
make necessary changes to the release process, and no one has stepped
up to fill that gap yet.

PS: I'm very sorry it took me this long to reply. The past few weeks
have been too hectic...

Z

> --
> You received this message because you are subscribed to the Google Groups
> "guiceberry-users" group.
> To post to this group, send email to guiceber...@googlegroups.com.
> To unsubscribe from this group, send email to
> guiceberry-use...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/guiceberry-users?hl=en.
>

Reply all
Reply to author
Forward
0 new messages