I'm trying to make a Java Spring service that uses BitCoinJ as its
Bitcoin client connection. Worth noting is that I'm new to Spring and
Maven as of a little over a month ago, so there's some possibility
that their configuration is where my problems lie. But adding the
BitCoinJ dependency is specifically where things break.
running "mvn tomcat:deploy" (
codehaus.org's maven-tomcat-plugin)
compiles and "deploys" without any error. However, Tomcat doesn't
show it as running. Looking through the logs, I come across this:
SEVERE: Exception sending context initialized event to listener
instance of class
org.springframework.web.context.ContextLoaderListener
java.lang.SecurityException: Invalid signature file digest for
Manifest main attributes
at [...]
A bit of a Google search tells me that it might be a problem with
packing the .jar, and BouncyCastle seems to come up a few times.
Please briefly check out these two discussions, most notably the last
couple posts in each.
http://www.coderanch.com/t/384144/java/java/Security-Exception-signature-file
https://github.com/wesabe/grendel/issues/2
I somewhat doubt that I'm the only person to actually use BitCoinJ as
a Maven dependency, so I suspect the error is with my setup. But as
above, I'm no guru with these tools. I started with the Spring
tutorial (after fixing it to work for version 3), modifying it to fit
my needs.
I'm using the SpringSource Tool Suite v2.7.1.RELEASE, with the
following dependencies in my pom.xml:
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>3.0.5.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>3.0.5.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>3.0.5.RELEASE</version>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.17</version>
</dependency>
<dependency>
<groupId>
com.google</groupId>
<artifactId>bitcoinj</artifactId>
<version>0.3-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjtools</artifactId>
<version>1.6.2</version>
</dependency>
I've opted to use BitCoinJ's 0.3-SNAPSHOT, as it has some great
additions and changes over 0.2.