novitski / bitcoinj

Automatically exported from code.google.com/p/bitcoinj
Apache License 2.0
0 stars 0 forks source link

Issue with AbstractIdleService can't be resolved. #418

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The type com.google.common.util.concurrent.AbstractIdleService cannot be 
resolved. It is indirectly referenced from required .class files

It shows up when I try to use the PeerGroup class.

Original issue reported on code.google.com by gweedo...@gmail.com on 18 Jun 2013 at 5:12

GoogleCodeExporter commented 9 years ago
This is with the latest git pull.

Original comment by gweedo...@gmail.com on 18 Jun 2013 at 5:13

GoogleCodeExporter commented 9 years ago
Everything compiles OK here - how are you building/compiling?

Original comment by hearn@google.com on 18 Jun 2013 at 9:06

GoogleCodeExporter commented 9 years ago
I am using a Mac OSX 10.8.4, java 6, maven 3 and using the command line to 
build using maven goal to install, then importing it into eclipse, and 
compiling from there. The library builds and compiles but when I try to use the 
class PeerGroup in an application, it gives me that error, and I can see guava 
is clearly referenced in the bitcoinj library.

Original comment by gweedo...@gmail.com on 18 Jun 2013 at 9:09

GoogleCodeExporter commented 9 years ago
Does it build using only Maven? Try "mvn clean install".

How do you import into Eclipse? Have you done "mvn eclipse:eclipse"?

Original comment by andreas....@gmail.com on 18 Jun 2013 at 9:14

GoogleCodeExporter commented 9 years ago
I just did a clean install and it passed all the test, and then I did mvn 
eclipse:eclipse, and then using eclipse I used import existing project into 
workspace. I still get the that error on the PeerGroup and I am using basically 
the code from the getting started wiki entry.

Original comment by gweedo...@gmail.com on 18 Jun 2013 at 9:19

GoogleCodeExporter commented 9 years ago
It sounds like the Eclipse integration didn't add all the dependencies to the 
project. Check the JARs/classpath for your project and see if Guava is there.

I don't use Eclipse so can't help you configure that correctly. It works fine 
if I use IntelliJ (which can read Maven POMs by itself). There's a free open 
source edition these days, you could try and see if it works properly with that.

Original comment by hearn@google.com on 18 Jun 2013 at 9:21

GoogleCodeExporter commented 9 years ago
Just incase anyone is looking for a hacky way to get around this issue. Just 
add Guava to your application classpath also. That is how I fixed it.

Original comment by gweedo...@gmail.com on 19 Jun 2013 at 12:00

GoogleCodeExporter commented 9 years ago
You might be missing another dependency now though. But good that you got it 
working!

Original comment by hearn@google.com on 19 Jun 2013 at 8:07