cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Kelly <brianke...@sgi.com>
Subject Unable to use native library in C* trigger
Date Tue, 07 Jun 2016 15:07:15 GMT
Hi, all,

I am attempting write a trigger that depends on a native library. The library is successfully
loaded by the JVM (so the java.library.path should not be the issue - I just have the jnilib
in lib/sigar-bin for now) but any call to its methods result in a java.lang.UnsatisfiedLinkError.
This only happens in the Cassandra trigger; a standalone Java program has no issues using
the library. Does anybody have an idea what may be causing this? Here is the output when the
trigger fires:

cqlsh>  INSERT INTO test.test (key, value) values ('1', '1');
ServerError: <ErrorMessage code=0000 [Server error] message="java.lang.UnsatisfiedLinkError:
org.apache.cassandra.triggers.AuditTrigger.callSomeNativeMethod()Ljava/lang/String;">

And the debug.log:

ERROR [SharedPool-Worker-1] 2016-06-07 10:03:42,870 Message.java:611 - Unexpected exception
during request; channel = [id: 0x3a5b79c3, L:/127.0.0.1:9042 - R:/127.0.0.1:53097]
java.lang.UnsatisfiedLinkError: org.apache.cassandra.triggers.AuditTrigger.callSomeNativeMethod()Ljava/lang/String;
        at org.apache.cassandra.triggers.AuditTrigger.callSomeNativeMethod(Native Method)
~[na:na]
        at org.apache.cassandra.triggers.AuditTrigger.augment(AuditTrigger.java:44) ~[na:na]
        at org.apache.cassandra.triggers.TriggerExecutor.executeInternal(TriggerExecutor.java:229)
~[main/:na]
        at org.apache.cassandra.triggers.TriggerExecutor.execute(TriggerExecutor.java:119)
~[main/:na]
        at org.apache.cassandra.service.StorageProxy.mutateWithTriggers(StorageProxy.java:819)
~[main/:na]
        at org.apache.cassandra.cql3.statements.ModificationStatement.executeWithoutCondition(ModificationStatement.java:431)
~[main/:na]
        at org.apache.cassandra.cql3.statements.ModificationStatement.execute(ModificationStatement.java:417)
~[main/:na]
        at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:188)
~[main/:na]
        at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:219) ~[main/:na]
        at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:204) ~[main/:na]
        at org.apache.cassandra.transport.messages.QueryMessage.execute(QueryMessage.java:115)
~[main/:na]
        at org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:507)
[main/:na]
        at org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:401)
[main/:na]
        at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
[netty-all-4.0.36.Final.jar:4.0.36.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:292)
[netty-all-4.0.36.Final.jar:4.0.36.Final]
        at io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:32)
[netty-all-4.0.36.Final.jar:4.0.36.Final]
        at io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:283)
[netty-all-4.0.36.Final.jar:4.0.36.Final]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_25]
        at org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:164)
[main/:na]
        at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:106) [main/:na]
        at java.lang.Thread.run(Thread.java:745) [na:1.8.0_25]

I am just running one, local node.

Thanks,
Brian

Mime
View raw message