GithubHelp home page GithubHelp logo

storj-archived / java-libstorj Goto Github PK

View Code? Open in Web Editor NEW
8.0 8.0 6.0 204 KB

Deprecated. Java library for encrypted file transfer on the Storj network.

License: GNU Lesser General Public License v3.0

C++ 28.44% Java 71.56%
java libstorj storj

java-libstorj's People

Contributors

jkawamoto avatar kaloyan-raev avatar richardlitt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

java-libstorj's Issues

Provide directory-helper-methods

For my libstorj.NET-wrapper I want to provide methods to Access Folders and subfolders within buckets. There is an ongoing discussion about this as a SIP here.

I Can do something within my wrapper, but then you would Need to do it on your side, too, and we have code-duplication with probably different implementation.

I suggest extending your API with the following methods:

GetContent(Bucket b)
=> should return direct subfolders and files within the bucket as e.g. a "Content-object".
=> a Content-object might have two lists: files and folders

Get Content(Folder f)
=> shoudl return direct subfolders and files within a Folder as e.g. a "Content-object" as described above.

Once the SIP is implemented, the Internat structure Can be mapped accordingly. For the current implementation this might also make a buffer necessary, so that the Content of a bucket does not get reloaded on every API-Access.

Change the date-fields to real DateTime

There are some date-fields within your model that aren't real DateTime-Fields, but string containing Dates. If they could be changed to DateTime, my libstorj.NET-wrapper could consume real Datetimes, too.

If this is done, I can work on Issue #3 within libstorj.NET.

After compilation: couldn't find "libstorj-java.so"

Backtrace from Android Studio:
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.github.michaldev.cryptocloud-RZg4obNaMI23QyX0llxQjg==/base.apk"],nativeLibraryDirectories=[/data/app/com.github.michaldev.cryptocloud-RZg4obNaMI23QyX0llxQjg==/lib/arm64, /system/lib64, /system/vendor/lib64]]] couldn't find "libstorj-java.so"

In gradle console always is ok.

Test failed

  • Ubuntu 14.04.5 LTS
  • gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
  • libstorj v2.0.0-beta2
  • java-libstorj 9a954cc

After gradle jniSharedLibrary was finished, I run gradle test and got the following error:

02:01:48.061 [ERROR] [system.err] /usr/lib/jvm/java-8-oracle/bin/java: symbol lookup error: /home/travis/build/jkawamoto/java-libstorj/build/libs/jni/shared/libstorj-java.so: undefined symbol: storj_init_env

test.log
jniSharedLibrary.log

Missing libgcrypt.so.11

I got this error:

[03:33:42.331] [verbose] [main] DEBUG net.harawata.appdirs.AppDirsFactory - os.name linux is resolved to *nix
[03:33:42.332] [verbose] SLF4J: A number (1) of logging calls during the initialization phase have been intercepted and are
[03:33:42.333] [verbose] SLF4J: now being replayed. These are subject to the filtering rules of the underlying logging system.
[03:33:42.334] [verbose] SLF4J: See also http://www.slf4j.org/codes.html#replay
[03:33:42.363] [verbose] Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/.mount_Goobox7MTPMb/resources/app/goobox-sync-storj/libstorj-java.so: libgcrypt.so.11: cannot open shared object file: No such file or directory
[03:33:42.365] [verbose] 	at java.lang.ClassLoader$NativeLibrary.load(Native Method)
[03:33:42.366] [verbose] 	at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
[03:33:42.367] [verbose] 	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1857)
[03:33:42.368] [verbose] 	at java.lang.Runtime.loadLibrary0(Runtime.java:870)
[03:33:42.368] [verbose] 	at java.lang.System.loadLibrary(System.java:1122)
[03:33:42.369] [verbose] 	at io.storj.libstorj.Storj.loadLibrary(Storj.java:425)
[03:33:42.370] [verbose] 	at io.storj.libstorj.Storj.<clinit>(Storj.java:409)
[03:33:42.371] [verbose] 	at io.goobox.sync.storj.App.init(App.java:150)
[03:33:42.372] [verbose] 	at io.goobox.sync.storj.App.main(App.java:106)

Actually java-libstorj-0.8.3-linux64-so.tar.gz doesn't have libgcrypt.so.11. Does the archive file miss the library file or do we need to install some packages by ourselves?

Missing library storj-java

I tried to execute the sample test of java storj in Eclipse IDE on windows and I got an error says a library is missed called storj-java in the File Storj.java
I already add the jar file and there is no error but when I tried to execute the example it shows this error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: no storj-java in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at io.storj.libstorj.Storj.loadLibrary(Storj.java:425)
at io.storj.libstorj.Storj.(Storj.java:409)
at storjConnection.ConnectionTest.main(ConnectionTest.java:32)
capture
capture2

jniSharedLibrary task failed

When I tried to compile java-libstorj with libstorj v2.0.0-beta2, I got the following errors.

$ cat /home/travis/build/jkawamoto/java-libstorj/build/tmp/compileJniSharedLibraryJniCpp/output.txt
See file:///home/travis/build/jkawamoto/java-libstorj/build/tmp/compileJniSharedLibraryJniCpp/output.txt for all output for compileJniSharedLibraryJniCpp.
compiling storj-java.cpp failed.
/home/travis/build/jkawamoto/java-libstorj/src/main/cpp/storj-java.cpp: In function ‘void Java_io_storj_libstorj_Storj__1downloadFile(JNIEnv*, jobject, jlong, jstring, jstring, jstring, jobject)’:
/home/travis/build/jkawamoto/java-libstorj/src/main/cpp/storj-java.cpp:822:54: error: ‘errno’ was not declared in this scope
         error_callback(env, callbackObject, fileId, -errno, strerror(errno));
                                                      ^
/home/travis/build/jkawamoto/java-libstorj/src/main/cpp/storj-java.cpp: In function ‘void Java_io_storj_libstorj_Storj__1uploadFile(JNIEnv*, jobject, jlong, jstring, jstring, jstring, jobject)���:
/home/travis/build/jkawamoto/java-libstorj/src/main/cpp/storj-java.cpp:985:57: error: ‘errno’ was not declared in this scope
         error_callback(env, callbackObject, localPath, -errno, strerror(errno));
                                                         ^
In file included from /home/travis/build/jkawamoto/java-libstorj/src/main/cpp/storj-java.cpp:19:0:
/home/travis/build/jkawamoto/java-libstorj/libstorj/include/storj.h: At global scope:
/home/travis/build/jkawamoto/java-libstorj/libstorj/include/storj.h:373:20: warning: ‘BUCKET_OP’ defined but not used [-Wunused-variable]
 static const char *BUCKET_OP[] = { "PUSH", "PULL" };
                    ^
Finished compileJniSharedLibraryJniCpp, see full log file:///home/travis/build/jkawamoto/java-libstorj/build/tmp/compileJniSharedLibraryJniCpp/output.txt.

The source files are from the master branch at 72cc87c.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.