Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 51B5A109FC for ; Mon, 28 Jul 2014 07:43:31 +0000 (UTC) Received: (qmail 76438 invoked by uid 500); 28 Jul 2014 07:43:28 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 76401 invoked by uid 500); 28 Jul 2014 07:43:28 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 76391 invoked by uid 99); 28 Jul 2014 07:43:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Jul 2014 07:43:28 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of doanduyhai@gmail.com designates 209.85.219.41 as permitted sender) Received: from [209.85.219.41] (HELO mail-oa0-f41.google.com) (209.85.219.41) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Jul 2014 07:43:24 +0000 Received: by mail-oa0-f41.google.com with SMTP id j17so8243480oag.14 for ; Mon, 28 Jul 2014 00:43:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=2XUsvq8j4UmRjQtKE5X+pmJfSjRCe4+DxyAdambdq/Y=; b=N/2dnj8NTLwCpDH7qQkLn6PmnTDlD+QgWHk5Ym8vD11Cl8pb+sCNUui2qQHNyZCN/k no++Q79x5gg5cTRnkNE7pMvyqGCC/2IGuG+DB5kBxXoeGZ3ynuk6eLtzRsBzBWBhbLdq 5/h678M60GokIG8IQD+2wPxncz4f1OzL9m14P3FgPwgWwP8xiObYGeDsUVlyKSNRMOtU ZjoGRjploIzx/iAdrVNIBYkjbCPrDX66Vyatzb8EQYdEpdAIjx1zHNJOvb0IsJcDbgRX ftTL13zixG2SqmCOi878bC0OKd6XfspOBXMFA6d98BuoepJUwl+uPmLZJs3xAwR/f6sl fv/w== MIME-Version: 1.0 X-Received: by 10.182.163.46 with SMTP id yf14mr47083326obb.40.1406533384319; Mon, 28 Jul 2014 00:43:04 -0700 (PDT) Received: by 10.76.22.38 with HTTP; Mon, 28 Jul 2014 00:43:04 -0700 (PDT) In-Reply-To: <53D5FD8F.7040507@securax.org> References: <53D12572.7010502@securax.org> <53D12772.2020906@securax.org> <53D5FD8F.7040507@securax.org> Date: Mon, 28 Jul 2014 09:43:04 +0200 Message-ID: Subject: Re: Cassandra trigger following the CQL for Cassandra 2.0 tutorial does not work From: DuyHai Doan To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=e89a8f8389bfbcb73e04ff3c1252 X-Virus-Checked: Checked by ClamAV on apache.org --e89a8f8389bfbcb73e04ff3c1252 Content-Type: text/plain; charset=UTF-8 Did you put the jar into the /lib folder on the server ? I know it's a basic question but it's the first idea to come in mind On Mon, Jul 28, 2014 at 9:36 AM, Martin Marinov wrote: > Anybody got an idea on this matter ? > > > On 07/24/2014 06:34 PM, Martin Marinov wrote: > > Hi, > > I posted the question on stackoverflow: > > http://stackoverflow.com/questions/24937425/cassandra-trigger-following-the-cql-for-cassandra-2-0-tutorial-does-not-work > > On 07/24/2014 06:25 PM, Martin Marinov wrote: > > Hi, > > I'm following the tutorial at: > http://www.datastax.com/documentation/cql/3.1/cql/cql_reference/trigger_r.html > > I'm using Cassandra 2.0.9 with Oracle Java (java version "1.7.0_60"). > > I have downloaded the example Java Class from > https://git-wip-us.apache.org/repos/asf?p=cassandra.git;a=blob_plain;f=examples/triggers/src/org/apache/cassandra/triggers/InvertedIndex.java;hb=HEAD > into a file named *org.apache.cassandra.triggers.InvertedIndex.jar* . > > I then created a jar using: > > jar cvf /etc/cassandra/triggers/org.apache.cassandra.triggers.InvertedIndex.jar org.apache.cassandra.triggers.InvertedIndex.class > > I restarted the cassandra service. > > The trigger does not exist: > > cqlsh:mykeyspace> CREATE TRIGGER myTrigger ON myTable USING 'org.apache.cassandra.triggers.InvertedIndex'; > Bad Request: Trigger class 'org.apache.cassandra.triggers.InvertedIndex' doesn't exist > > What am I doing wrong ? > > -- > Best Regards, > > Martin Marinov > Securax LTD > > NOTICE: This email and any file transmitted are confidential and/or > legally privileged and intended only for the person(s) directly > addressed. If you are not the intended recipient, any use, copying, > transmission, distribution, or other forms of dissemination is strictly > prohibited. If you have received this email in error, please notify the > sender immediately and permanently delete the email and files, if any. > > > > -- > Best Regards, > > Martin Marinov > Securax LTD > > NOTICE: This email and any file transmitted are confidential and/or > legally privileged and intended only for the person(s) directly > addressed. If you are not the intended recipient, any use, copying, > transmission, distribution, or other forms of dissemination is strictly > prohibited. If you have received this email in error, please notify the > sender immediately and permanently delete the email and files, if any. > > > > -- > Best Regards, > > Martin Marinov > Securax LTD > > NOTICE: This email and any file transmitted are confidential and/or > legally privileged and intended only for the person(s) directly > addressed. If you are not the intended recipient, any use, copying, > transmission, distribution, or other forms of dissemination is strictly > prohibited. If you have received this email in error, please notify the > sender immediately and permanently delete the email and files, if any. > > --e89a8f8389bfbcb73e04ff3c1252 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Did you put the jar into the /lib folder on the server ? I= know it's a basic question but it's the first idea to come in mind=


On Mon,= Jul 28, 2014 at 9:36 AM, Martin Marinov <martin.marinov@securax.= org> wrote:
=20 =20 =20
Anybody got an idea on this matter ?


On 07/24/2014 06:34 PM, Martin Marinov wrote:
=20
Hi,

I posted the question on stackoverflow:
http://stackoverflow.com/questions/24937425/cassandra-trigger-foll= owing-the-cql-for-cassandra-2-0-tutorial-does-not-work

On 07/24/2014 06:25 PM, Martin Marinov wrote:
=20

Hi,

I'm following the tutorial at: http://www.datastax.com/documentation/cql/3.1/cql/c= ql_reference/trigger_r.html

I'm using Cassandra 2.0.9 with Oracle Java (java version "1.7.0_60").

I have downloaded the example Java Class from https://git-wip-us.apache.org/repos/= asf?p=3Dcassandra.git;a=3Dblob_plain;f=3Dexamples/triggers/src/org/apache/c= assandra/triggers/InvertedIndex.java;hb=3DHEAD into a file named org.apache.cassandra.triggers.Inverte= dIndex.jar .

I then created a jar using:

jar cvf /etc/cassandra/triggers/org.apache.cassandra.t=
riggers.InvertedIndex.jar org.apache.cassandra.triggers.InvertedIndex.class

I restarted the cassandra service.

The trigger does not exist:

cqlsh:mykeyspace> CREATE TRIGGER myTrigger ON myTab=
le USING 'org.apache.cassandra.triggers.InvertedIndex';
Bad Request: Trigger class 'org.apache.cassandra.triggers.InvertedIndex=
' doesn't exist

What am I doing wrong ?


--=20
Best Regards,

Martin Marinov
Securax LTD

NOTICE:  This email and any file transmitted are confidential and/or
legally privileged and intended only for the person(s) directly
addressed.  If you are not the intended recipient, any use, copying,
transmission, distribution, or other forms of dissemination is strictly
prohibited.  If you have received this email in error, please notify the
sender immediately and permanently delete the email and files, if any.


--=20
Best Regards,

Martin Marinov
Securax LTD

NOTICE:  This email and any file transmitted are confidential and/or
legally privileged and intended only for the person(s) directly
addressed.  If you are not the intended recipient, any use, copying,
transmission, distribution, or other forms of dissemination is strictly
prohibited.  If you have received this email in error, please notify the
sender immediately and permanently delete the email and files, if any.


--=20
Best Regards,

Martin Marinov
Securax LTD

NOTICE:  This email and any file transmitted are confidential and/or
legally privileged and intended only for the person(s) directly
addressed.  If you are not the intended recipient, any use, copying,
transmission, distribution, or other forms of dissemination is strictly
prohibited.  If you have received this email in error, please notify the
sender immediately and permanently delete the email and files, if any.

--e89a8f8389bfbcb73e04ff3c1252--