Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SnappyJava error (Mac OSX ) #22

Closed
remi-parain opened this issue Mar 3, 2015 · 15 comments
Closed

SnappyJava error (Mac OSX ) #22

remi-parain opened this issue Mar 3, 2015 · 15 comments
Assignees
Labels
Milestone

Comments

@remi-parain
Copy link

I don't know what happened, I recently got an exception at startup about snappyjava lib not boing loaded on my project. All my invalid bundles relies on OrientDB to work.

I got the same error when I compile the wisdom-orient-db sample project from this repo ( compilation with java 8 sdk and java 7sdk )

[INFO]   o.o.c.c.a.DirectoryMonitor {main} - Opening deployer org.ow2.chameleon.core.activators.BundleDeployer@4ac3c60d for directory /Users/ubidev/Downloads/wisdom-orientdb-master/wisdom-orientdb-sample/target/wisdom/application. 
[ERROR]  o.o.c.c.a.BundleDeployer {main} - Error during the starting of org.xerial.snappy.snappy-java 
org.osgi.framework.BundleException: Activator start error in bundle org.xerial.snappy.snappy-java [64].
    at org.apache.felix.framework.Felix.activateBundle(Felix.java:2204) [chameleon-core-1.10.3.jar:na]
    at org.apache.felix.framework.Felix.startBundle(Felix.java:2072) [chameleon-core-1.10.3.jar:na]
    at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:976) ~[org.apache.felix.framework-4.4.1.jar:na]
    at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:963) ~[org.apache.felix.framework-4.4.1.jar:na]
    at org.ow2.chameleon.core.activators.BundleDeployer.open(BundleDeployer.java:192) [chameleon-core-1.10.3.jar:na]
    at org.ow2.chameleon.core.activators.DirectoryMonitor.addingService(DirectoryMonitor.java:238) [chameleon-core-1.10.3.jar:na]
    at org.ow2.chameleon.core.activators.DirectoryMonitor.addingService(DirectoryMonitor.java:52) [chameleon-core-1.10.3.jar:na]
    at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:932) [org.apache.felix.framework-4.4.1.jar:na]
    at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:864) [org.apache.felix.framework-4.4.1.jar:na]
    at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256) [org.apache.felix.framework-4.4.1.jar:na]
    at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229) [org.apache.felix.framework-4.4.1.jar:na]
    at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:894) [org.apache.felix.framework-4.4.1.jar:na]
    at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:943) [chameleon-core-1.10.3.jar:na]
    at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:794) [chameleon-core-1.10.3.jar:na]
    at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:544) [chameleon-core-1.10.3.jar:na]
    at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4445) [chameleon-core-1.10.3.jar:na]
    at org.apache.felix.framework.Felix.registerService(Felix.java:3431) [chameleon-core-1.10.3.jar:na]
    at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:346) [chameleon-core-1.10.3.jar:na]
    at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:353) [chameleon-core-1.10.3.jar:na]
    at org.ow2.chameleon.core.activators.BundleDeployer.start(BundleDeployer.java:80) [chameleon-core-1.10.3.jar:na]
    at org.ow2.chameleon.core.utils.FrameworkManager.start(FrameworkManager.java:117) [chameleon-core-1.10.3.jar:na]
    at org.ow2.chameleon.core.Chameleon.start(Chameleon.java:252) [chameleon-core-1.10.3.jar:na]
    at org.ow2.chameleon.core.Main.main(Main.java:70) [chameleon-core-1.10.3.jar:na]
Caused by: java.lang.UnsatisfiedLinkError: no libsnappyjava.dylib in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1857) ~[na:1.8.0_11]
    at java.lang.Runtime.loadLibrary0(Runtime.java:870) ~[na:1.8.0_11]
    at java.lang.System.loadLibrary(System.java:1119) ~[na:1.8.0_11]
    at org.xerial.snappy.SnappyBundleActivator.start(SnappyBundleActivator.java:52) ~[na:na]
    at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:645) ~[org.apache.felix.framework-4.4.1.jar:na]
    at org.apache.felix.framework.Felix.activateBundle(Felix.java:2154) [chameleon-core-1.10.3.jar:na]
    ... 22 common frames omitted

any idea ?

@cescoffier
Copy link
Member

No idea, but @barjo probably know the answer...

@barjo
Copy link
Member

barjo commented Mar 4, 2015

Hi, I am not sure from where it could come from. I will have a look a orient recent change.

@barjo
Copy link
Member

barjo commented Mar 4, 2015

@remi-parain I just update the snapshot version to orient 2.0.4. Let me know if it solves the problem. I can also cut a release if needed. Since the current snapshot is based on wisdom 0.7.0, if your project use 0.7.1-SNAPSHOT, it may have an impact too?

@cescoffier
Copy link
Member

Would it be possible that the dependency became a bundle without the right
native directives in its manifest ?

Sent from my iPhone

On 4 mars 2015, at 05:02, Jonathan Bardin notifications@github.com wrote:

@remi-parain https://github.com/remi-parain I just update the snapshot
version to orient 2.0.4. Let me know if it solves the problem. I can also
cut a release if needed. Since the current snapshot is based on wisdom
0.7.0, if your project use 0.7.1-SNAPSHOT, it may have an impact too?


Reply to this email directly or view it on GitHub
#22 (comment)
.

@barjo
Copy link
Member

barjo commented Mar 4, 2015

@cescoffier All orient dep. are bundles, it was already the case with previous versions. It doesn't seems that they have any embedded native actually.
The orient core depends on
org.xerial.snappy 1.1.0.1 that has the following native instruction:
http://central.maven.org/maven2/org/xerial/snappy/snappy-java/1.1.0.1/snappy-java-1.1.0.1.pom

<Bundle-NativeCode>
org/xerial/snappy/native/Windows/x86_64/snappyjava.dll;osname=win32;processor=x86-64,
org/xerial/snappy/native/Windows/x86/snappyjava.dll;osname=win32;processor=x86,
org/xerial/snappy/native/Mac/x86/libsnappyjava.jnilib;osname=macosx;processor=x86,
org/xerial/snappy/native/Mac/x86_64/libsnappyjava.jnilib;osname=macosx;processor=x86-64,
org/xerial/snappy/native/Linux/x86_64/libsnappyjava.so;osname=linux;processor=x86-64,
org/xerial/snappy/native/Linux/x86/libsnappyjava.so;osname=linux;processor=x86,
org/xerial/snappy/native/SunOS/x86/libsnappyjava.so;osname=sunos;processor=x86,
org/xerial/snappy/native/SunOS/sparc/libsnappyjava.so;osname=sunos;processor=sparc,
org/xerial/snappy/native/SunOS/x86_64/libsnappyjava.so;osname=sunos;processor=x86-64,
org/xerial/snappy/native/Linux/arm/libsnappyjava.so;osname=linux;processor=arm
</Bundle-NativeCode>

If that's the culprit we can exclude it and require version > 1.1.1; but am not sure if the api has change.

@cescoffier
Copy link
Member

Do you know why orientdb need this bundle ?

@barjo
Copy link
Member

barjo commented Mar 4, 2015

They do some compression with snappy, but I think it's disabled by default :-?

barjo pushed a commit that referenced this issue Mar 4, 2015
@barjo barjo added the bug label Mar 4, 2015
@barjo barjo self-assigned this Mar 4, 2015
@barjo
Copy link
Member

barjo commented Mar 4, 2015

I find some possible problem with the snappy dep. of the wisdom orient-core. I think it should be alright now. I should also contact Orient to know if they could put the snappy package as optional. ( By default the snappy compression is disabled)

@barjo
Copy link
Member

barjo commented Mar 4, 2015

Apparently they move from org.iq80.snappy (pure java) to org.xerial.snappy :(

@remi-parain
Copy link
Author

thanks @barjo, the sample is now working well at runtime ( with the current wisdom 0.7.1-SNAPSHOT, compiled 2 days ago)

The issue occurs only on mac and is related to the snappy library as we can find trace of this specific issue since 2012
xerial/snappy-java#6
thinkaurelius/titan#62
https://groups.google.com/a/lists.datastax.com/forum/#!topic/java-driver-user/bqvT83TwZTc

I found this workaround (jvm parameters) but it didn't worked for me :
"-Dorg.xerial.snappy.tempdir=~/tmp -Dorg.xerial.snappy.lib.name=libsnappyjava.jnilib"

maybe orient should update their version of snappy

btw : thanks !

@barjo
Copy link
Member

barjo commented Mar 4, 2015

Thanks, I open an issue in Orient, and snappy will be optional for the
bundle in the next release.


Jonathan

On Wed, Mar 4, 2015 at 4:19 PM, PARAIN Rémi notifications@github.com
wrote:

thanks @barjo https://github.com/barjo, the sample is now working well
at runtime ( with the current wisdom 0.7.1-SNAPSHOT, compiled 2 days ago)

The issue occurs only on mac and is related to the snappy library as we
can find trace of this specific issue since 2012
xerial/snappy-java#6 xerial/snappy-java#6
thinkaurelius/titan#62 thinkaurelius/titan#62

https://groups.google.com/a/lists.datastax.com/forum/#!topic/java-driver-user/bqvT83TwZTc

I found this workaround (jvm parameters) but it didn't worked for me :
"-Dorg.xerial.snappy.tempdir=~/tmp -Dorg.xerial.snappy.lib.name
=libsnappyjava.jnilib"

maybe orient should update their version of snappy

btw : thanks !


Reply to this email directly or view it on GitHub
#22 (comment)
.

@cescoffier
Copy link
Member

Could you post the ticket link ?

2015-03-04 10:55 GMT+01:00 Jonathan Bardin notifications@github.com:

Thanks, I open an issue in Orient, and snappy will be optional for the
bundle in the next release.


Jonathan

On Wed, Mar 4, 2015 at 4:19 PM, PARAIN Rémi notifications@github.com
wrote:

thanks @barjo https://github.com/barjo, the sample is now working well
at runtime ( with the current wisdom 0.7.1-SNAPSHOT, compiled 2 days ago)

The issue occurs only on mac and is related to the snappy library as we
can find trace of this specific issue since 2012
xerial/snappy-java#6 xerial/snappy-java#6
thinkaurelius/titan#62 <thinkaurelius/titan#62

https://groups.google.com/a/lists.datastax.com/forum/#!topic/java-driver-user/bqvT83TwZTc

I found this workaround (jvm parameters) but it didn't worked for me :
"-Dorg.xerial.snappy.tempdir=~/tmp -Dorg.xerial.snappy.lib.name
=libsnappyjava.jnilib"

maybe orient should update their version of snappy

btw : thanks !


Reply to this email directly or view it on GitHub
<
#22 (comment)

.


Reply to this email directly or view it on GitHub
#22 (comment)
.

@barjo
Copy link
Member

barjo commented Mar 4, 2015

Here is the OrientDB ticket: orientechnologies/orientdb#3693

@barjo
Copy link
Member

barjo commented Mar 27, 2015

The pull request has been accepted on their develop branch, It will be release with the orientdb 2.1 milestone.

@barjo
Copy link
Member

barjo commented Apr 6, 2015

It's gonna be solved in orientdb 2.1 rc1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants