3

1) When I compile IOTA Reference Implementation 1.4.1.4 from sources on Windows 10 using:

git clone https://github.com/iotaledger/iri cd iri mvn clean compile

I get:

[INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 7.767 s [INFO] Finished at: 2017-12-29T11:42:17+02:00 [INFO] Final Memory: 20M/68M

It creates the target directory and the .class files. I need to get the iri.jar file:

Now when I command:

mvn package

I get next error:

In the all the tests it runs:

T E S T S ...

<<< ERROR! java.lang.UnsatisfiedLinkError: C:\Users\User\AppData\Local\Temp\librocksdbjni16850478755329069913.dll: A dynamic link library (DLL) initialization routine failed

...

Tests run: 5, Failures: 0, Errors: 5, Skipped: 0, Time elapsed: 0 sec <<< FAILURE! quietGetTail(com.iota.iri.controllers.BundleViewModelTest) Time elapsed: 0 sec <<< ERROR! java.lang.NoClassDefFoundError: Could not initialize class org.rocksdb.RocksDB

...

Results :

Tests in error: com.iota.iri.BundleValidatorTest: C:\Users\User\AppData\Local\Temp\librocksdbjni13156992591185227005.dll: A dynamic link library (DLL) initialization routine failed quietGetTail(com.iota.iri.controllers.BundleViewModelTest): Could not initialize class org.rocksdb.RocksDB fromHash(com.iota.iri.controllers.BundleViewModelTest): Could not initialize class org.rocksdb.RocksDB getTail(com.iota.iri.controllers.BundleViewModelTest): Could not initialize class org.rocksdb.RocksDB quietFromHash(com.iota.iri.controllers.BundleViewModelTest): Could not initialize class org.rocksdb.RocksDB getTransactionViewModels(com.iota.iri.controllers.BundleViewModelTest): Could not initialize class org.rocksdb.RocksDB initSnapshot(com.iota.iri.controllers.MilestoneViewModelTest): Could not initialize class org.rocksdb.RocksDB nextGreaterThan(com.iota.iri.controllers.MilestoneViewModelTest): Could not initialize class org.rocksdb.RocksDB previous(com.iota.iri.controllers.MilestoneViewModelTest): Could not initialize class org.rocksdb.RocksDB latest(com.iota.iri.controllers.MilestoneViewModelTest): Could not initialize class org.rocksdb.RocksDB getMilestone(com.iota.iri.controllers.MilestoneViewModelTest): Could not initialize class org.rocksdb.RocksDB latestSnapshot(com.iota.iri.controllers.MilestoneViewModelTest): Could not initialize class org.rocksdb.RocksDB firstWithSnapshot(com.iota.iri.controllers.MilestoneViewModelTest): Could not initialize class org.rocksdb.RocksDB getHash(com.iota.iri.controllers.MilestoneViewModelTest): Could not initialize class org.rocksdb.RocksDB next(com.iota.iri.controllers.MilestoneViewModelTest): Could not initialize class org.rocksdb.RocksDB nextWithSnapshot(com.iota.iri.controllers.MilestoneViewModelTest): Could not initialize class org.rocksdb.RocksDB first(com.iota.iri.controllers.MilestoneViewModelTest): Could not initialize class org.rocksdb.RocksDB index(com.iota.iri.controllers.MilestoneViewModelTest): Could not initialize class org.rocksdb.RocksDB store(com.iota.iri.controllers.MilestoneViewModelTest): Could not initialize class org.rocksdb.RocksDB snapshot(com.iota.iri.controllers.MilestoneViewModelTest): Could not initialize class org.rocksdb.RocksDB PrevBefore(com.iota.iri.controllers.MilestoneViewModelTest): Could not initialize class org.rocksdb.RocksDB updateSnapshot(com.iota.iri.controllers.MilestoneViewModelTest): Could not initialize class org.rocksdb.RocksDB com.iota.iri.controllers.TransactionViewModelTest: Could not initialize class org.rocksdb.RocksDB com.iota.iri.service.TipsManagerTest: Could not initialize class org.rocksdb.RocksDB get(com.iota.iri.storage.TangleTest): Could not initialize class org.rocksdb.RocksDB save(com.iota.iri.storage.TangleTest): Could not initialize class org.rocksdb.RocksDB getKeysStartingWithValue(com.iota.iri.storage.TangleTest): Could not initialize class org.rocksdb.RocksDB com.iota.iri.TransactionValidatorTest: Could not initialize class org.rocksdb.RocksDB com.iota.iri.TransactionValidatorTest

Tests run: 100, Failures: 0, Errors: 29, Skipped: 1

[INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 30.439 s [INFO] Finished at: 2017-12-29T11:45:19+02:00 [INFO] Final Memory: 22M/74M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project iri: There are test failures.

So what is wrong with the IOTA Reference Implementation persistence level RocksDB part ? How to remedy this in order to build the .jar ?

I need to build it for Windows. Does anybody have an idea how to fix this ?

2) Will this error appear in Linux derived platforms, on Ubuntu for example?

0

1 Answer 1

0

The problem here is that the DLL of RocksDB is not found. On Linux or macOS it's working without any problems. On Windows you might need some additional steps. As I have only a Mac the moment to my side, the following steps are not tested.

What you should try: Download the RocksDB jar referenced in the pom.xml. At the moment of writing it is: version 5.7.3

Extract the DLL inside the jar archive and place it in c:\windows\system32 Another option is to place it somewhere else and set the path at startup with the following parameter: -Djava.library.path=<path_to_dll>

Not the answer you're looking for? Browse other questions tagged or ask your own question.