Bitcoin Forum
April 25, 2024, 02:40:58 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: BitcoinJ - Error  (Read 1580 times)
andrehorta (OP)
Legendary
*
Offline Offline

Activity: 1261
Merit: 1000


View Profile WWW
April 12, 2012, 11:53:20 PM
Last edit: April 13, 2012, 12:47:01 AM by andrehorta
 #1

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Exception in thread "main" java.lang.NoClassDefFoundError: org/bouncycastle/asn1/DEREncodable
   at PingService.<init>(PingService.java:83)
   at PingService.main(PingService.java:66)
Caused by: java.lang.ClassNotFoundException: org.bouncycastle.asn1.DEREncodable
   at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
   at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
   ... 2 more
1714056058
Hero Member
*
Offline Offline

Posts: 1714056058

View Profile Personal Message (Offline)

Ignore
1714056058
Reply with quote  #2

1714056058
Report to moderator
1714056058
Hero Member
*
Offline Offline

Posts: 1714056058

View Profile Personal Message (Offline)

Ignore
1714056058
Reply with quote  #2

1714056058
Report to moderator
If you want to be a moderator, report many posts with accuracy. You will be noticed.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714056058
Hero Member
*
Offline Offline

Posts: 1714056058

View Profile Personal Message (Offline)

Ignore
1714056058
Reply with quote  #2

1714056058
Report to moderator
1714056058
Hero Member
*
Offline Offline

Posts: 1714056058

View Profile Personal Message (Offline)

Ignore
1714056058
Reply with quote  #2

1714056058
Report to moderator
vuce
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250


View Profile
April 13, 2012, 08:42:45 AM
 #2

http://mvnrepository.com/artifact/org.bouncycastle/bcprov-jdk15/1.46
Mike Hearn
Legendary
*
expert
Offline Offline

Activity: 1526
Merit: 1128


View Profile
April 13, 2012, 09:26:14 AM
 #3

You're using the library with none of its dependencies being available.

See here: http://code.google.com/p/bitcoinj/wiki/UsingMaven   - using Maven is probably the easiest way to get things set up. Otherwise you'll need to set your classpath to include Bouncy Castle (1.46), the protobufs library and if you want to follow git head also Guava and a few other things.

andrehorta (OP)
Legendary
*
Offline Offline

Activity: 1261
Merit: 1000


View Profile WWW
April 13, 2012, 12:39:56 PM
 #4

OK, but now i have other problem:

w.keychain.add(new ECKey());



Exception in thread "main" java.lang.VerifyError: (class: com/google/bitcoin/core/ECKey, method: toASN1 signature: ()[B) Incompatible argument to function
   at PingService.<init>(PingService.java:83)
   at PingService.main(PingService.java:66)
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!