vancetang / reflections

Automatically exported from code.google.com/p/reflections
Do What The F*ck You Want To Public License
0 stars 0 forks source link

Reflections fail with Guava 13.X #143

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. add guava version 13.0.1 as a dependency 
2. add the recletions dependency version 0.9.8
3. initialize Reflections

What is the expected output? What do you see instead?
Because of changes made to Guava since version 11, it failes with an ugly 
NoSuchMethodError
The relevant bits from the stacktrace:

Caused by: java.lang.NoSuchMethodError: 
com.google.common.cache.CacheBuilder.maximumSize(I)Lcom/google/common/cache/Cach
eBuilder;
    at org.reflections.adapters.JavassistAdapter.<init>(JavassistAdapter.java:28) ~[reflections.jar:na]
    at org.reflections.util.ConfigurationBuilder.<init>(ConfigurationBuilder.java:41) ~[reflections.jar:na]
    at org.reflections.Reflections$1.<init>(Reflections.java:134) ~[reflections.jar:na]
    at org.reflections.Reflections.<init>(Reflections.java:134) ~[reflections.jar:na]
    at org.reflections.Reflections.<init>(Reflections.java:117) ~[reflections.jar:na]

What version of the product are you using? On what operating system?
0.9.8. Build tool: Maven

Please provide any additional information below.
When I remove the guava dependency from my project it works (but using the old 
10.0.1 version of Guava)

Original issue reported on code.google.com by zapo...@gmail.com on 7 Feb 2013 at 7:15

Attachments:

GoogleCodeExporter commented 9 years ago
I realize now that this error occurs because I was using the Reflections 
version included with the Play framework v.2.0.4.

After upgrading to 0.9.8, it works as expected

Original comment by zapo...@gmail.com on 7 Feb 2013 at 7:21

GoogleCodeExporter commented 9 years ago

Original comment by ronm...@gmail.com on 20 Feb 2013 at 9:16