bisq-network / bisq

A decentralized bitcoin exchange network
https://bisq.network
GNU Affero General Public License v3.0
4.69k stars 1.26k forks source link

fails to build #412

Closed skunk73 closed 8 years ago

skunk73 commented 8 years ago

followed doc/build.md build instructions and after successfully installing bitcoinj, bitsquare fails (javac 1.8.0_92):

$ mvn package      
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] parent
[INFO] common
[INFO] jsocks
[INFO] jtorctl
[INFO] jtorproxy
[INFO] network
[INFO] core
[INFO] seednode
[INFO] gui
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building parent 0.4.6
[INFO] ------------------------------------------------------------------------
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building common 0.4.6
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.bitcoinj:bitcoinj-core:jar:0.13.1.2 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] parent ............................................. SUCCESS [  0.001 s]
[INFO] common ............................................. FAILURE [  0.188 s]
[INFO] jsocks ............................................. SKIPPED
[INFO] jtorctl ............................................ SKIPPED
[INFO] jtorproxy .......................................... SKIPPED
[INFO] network ............................................ SKIPPED
[INFO] core ............................................... SKIPPED
[INFO] seednode ........................................... SKIPPED
[INFO] gui ................................................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.297 s
[INFO] Finished at: 2016-04-29T14:51:33+02:00
[INFO] Final Memory: 9M/303M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project common: Could not resolve dependencies for project io.bitsquare:common:jar:0.4.6: Failure to find org.bitcoinj:bitcoinj-core:jar:0.13.1.2 in https://oss.sonatype.org/content/repositories/snapshots was cached in the local repository, resolution will not be reattempted until the update interval of sonatype-oss-snapshot has elapsed or updates are forced -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :common
ManfredKarrer commented 8 years ago

Did you install (mvn install) the Bistquare fork of BitcoinJ and the correct branch?

skunk73 commented 8 years ago

what's the correct branch? i ran: $ git clone https://github.com/bitsquare/bitcoinj.git $ cd bitcoinj $ mvn install -DskipTests -Dmaven.javadoc.skip=true as described in doc/build.md

ManfredKarrer commented 8 years ago

https://github.com/bitsquare/bitcoinj/tree/FixBloomFilters Better use clean as well: mvn clean install -DskipTests -Dmaven.javadoc.skip=true You should see the jars then in your local maven repo (.m2 dir)

ManfredKarrer commented 8 years ago

Just saw the build instructions did not specify the branch. Added it now. git clone -b FixBloomFilters https://github.com/bitsquare/bitcoinj.git

skunk73 commented 8 years ago

getting this now:

$ mvn package
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] parent
[INFO] common
[INFO] jsocks
[INFO] jtorctl
[INFO] jtorproxy
[INFO] network
[INFO] core
[INFO] seednode
[INFO] gui
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building parent 0.4.6
[INFO] ------------------------------------------------------------------------
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building common 0.4.6
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ common ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ common ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 40 source files to /home/skunk/bitcoin/bitcoinj/bitsquare/common/target/classes
[WARNING] /home/skunk/bitcoin/bitcoinj/bitsquare/common/src/main/java/io/bitsquare/app/Log.java: Some input files use unchecked or unsafe operations.
[WARNING] /home/skunk/bitcoin/bitcoinj/bitsquare/common/src/main/java/io/bitsquare/app/Log.java: Recompile with -Xlint:unchecked for details.
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ common ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/skunk/bitcoin/bitcoinj/bitsquare/common/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ common ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to /home/skunk/bitcoin/bitcoinj/bitsquare/common/target/test-classes
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ common ---
[INFO] Surefire report directory: /home/skunk/bitcoin/bitcoinj/bitsquare/common/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running io.bitsquare.common.crypto.EncryptionTest
Apr-30 01:10:42.653 [main] TRACE i.b.c.c.Sig: Generate msgSignatureKeyPair needed 1031 ms 
Apr-30 01:10:42.852 [main] TRACE i.b.c.c.Encryption: Generate msgEncryptionKeyPair needed 195 ms 
Apr-30 01:10:42.861 [main] TRACE i.b.c.c.EncryptionTest: start  
java.security.InvalidKeyException: Illegal key size or default parameters
        at javax.crypto.Cipher.checkCryptoPerm(Cipher.java:1026)
        at javax.crypto.Cipher.init(Cipher.java:1245)
        at javax.crypto.Cipher.init(Cipher.java:1186)
        at io.bitsquare.common.crypto.Encryption.encrypt(Encryption.java:69)
        at io.bitsquare.common.crypto.Encryption.encryptPayloadWithHmac(Encryption.java:149)
        at io.bitsquare.common.crypto.Encryption.encryptPayloadWithHmac(Encryption.java:145)
        at io.bitsquare.common.crypto.Encryption.encryptHybridWithSignature(Encryption.java:217)
        at io.bitsquare.common.crypto.EncryptionTest.testDecryptHybridWithSignature(EncryptionTest.java:52)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
        at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
        at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
        at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
        at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
        at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
        at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
        at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
        at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
        at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Apr-30 01:10:43.186 [main] ERROR i.b.c.c.EncryptionTest: encryptHybridWithSignature failed 
io.bitsquare.common.crypto.CryptoException: java.security.InvalidKeyException: Illegal key size or default parameters
        at io.bitsquare.common.crypto.Encryption.encrypt(Encryption.java:73)
        at io.bitsquare.common.crypto.Encryption.encryptPayloadWithHmac(Encryption.java:149)
        at io.bitsquare.common.crypto.Encryption.encryptPayloadWithHmac(Encryption.java:145)
        at io.bitsquare.common.crypto.Encryption.encryptHybridWithSignature(Encryption.java:217)
        at io.bitsquare.common.crypto.EncryptionTest.testDecryptHybridWithSignature(EncryptionTest.java:52)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
        at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
        at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
        at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
        at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
        at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
        at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
        at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
        at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
        at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Caused by: java.security.InvalidKeyException: Illegal key size or default parameters
        at javax.crypto.Cipher.checkCryptoPerm(Cipher.java:1026)
        at javax.crypto.Cipher.init(Cipher.java:1245)
        at javax.crypto.Cipher.init(Cipher.java:1186)
        at io.bitsquare.common.crypto.Encryption.encrypt(Encryption.java:69)
        ... 35 more
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.841 sec <<< FAILURE!
testDecryptHybridWithSignature(io.bitsquare.common.crypto.EncryptionTest)  Time elapsed: 1.673 sec  <<< FAILURE!
java.lang.AssertionError
        at org.junit.Assert.fail(Assert.java:86)
        at org.junit.Assert.assertTrue(Assert.java:41)
        at org.junit.Assert.assertTrue(Assert.java:52)
        at io.bitsquare.common.crypto.EncryptionTest.testDecryptHybridWithSignature(EncryptionTest.java:57)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
        at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
        at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
        at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
        at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
        at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
        at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
        at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
        at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
        at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)

Running io.bitsquare.common.crypto.SigTest
Apr-30 01:10:43.430 [main] TRACE i.b.c.c.Sig: Generate msgSignatureKeyPair needed 233 ms 
Apr-30 01:10:43.585 [main] TRACE i.b.c.c.Encryption: Generate msgEncryptionKeyPair needed 154 ms 
Apr-30 01:10:43.586 [main] TRACE i.b.c.c.SigTest: start  
Apr-30 01:10:43.748 [main] TRACE i.b.c.c.SigTest: took 162 ms. 
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.544 sec

Results :

Failed tests:   testDecryptHybridWithSignature(io.bitsquare.common.crypto.EncryptionTest)

Tests run: 2, Failures: 1, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] parent ............................................. SUCCESS [  0.002 s]
[INFO] common ............................................. FAILURE [  4.633 s]
[INFO] jsocks ............................................. SKIPPED
[INFO] jtorctl ............................................ SKIPPED
[INFO] jtorproxy .......................................... SKIPPED
[INFO] network ............................................ SKIPPED
[INFO] core ............................................... SKIPPED
[INFO] seednode ........................................... SKIPPED
[INFO] gui ................................................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.749 s
[INFO] Finished at: 2016-04-30T01:10:43+02:00
[INFO] Final Memory: 22M/250M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project common: There are test failures.
[ERROR] 
[ERROR] Please refer to /home/skunk/bitcoin/bitcoinj/bitsquare/common/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :common

it builds fine issuing "mvn -DskipTests package", however the application complains it couldn't generate the key...

ManfredKarrer commented 8 years ago

Have you followed all the steps (bountycastel, security files)? https://github.com/bitsquare/bitsquare/blob/master/doc/build.md#prerequisites

ManfredKarrer commented 8 years ago

Just tested on my nachine and it works. Add -DskipTests as well.

skunk73 commented 8 years ago

:+1: thank you