You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cassandra.apache.org by "C.F.Scheidecker Antunes" <cf...@gmail.com> on 2013/02/27 01:19:16 UTC

Loading AspectJ with Cassandra

Hello,

Cassandra 1.2.2 does not seem to like Aspects with it. Before, versions
1.1.x I could load some Aspects to it putting the JARS under its library
folder and now with 1.2.2 I can't.

I've got the error:

java.lang.InstantiationException:
org.apache.cassandra.service.CassandraDaemon
    at java.lang.Class.newInstance0(Class.java:342)
    at java.lang.Class.newInstance(Class.java:310)
    at
org.apache.commons.daemon.support.DaemonLoader.load(DaemonLoader.java:190)
Cannot load daemon
Service exit with a return value of 3


I've noticed that the CassandraDaemon has changed on 1.2.2.

What is the process to load an Aspect to it?

I am hoping to do something like:

@Around("execution(*
org.apache.cassandra.thrift.CassandraServer.doInsert(..))")

And then specify under cassandra-env.sh:

# AspectJ weaving
JVM_OPTS="$JVM_OPTS -javaagent:$CASSANDRA_HOME/lib/aspectjweaver-1.6.11.jar"


I had some code with 1.1.8 and now with 1.2.2 it simply will not start
Cassandra.

Any ideas?

Thanks.

Re: Loading AspectJ with Cassandra

Posted by "C.F.Scheidecker Antunes" <cf...@gmail.com>.
I've found the error. My bad, I was with older code dependencies hence the
problem which was hard to track. It is fixed now. Thanks.

On Wed, Feb 27, 2013 at 9:47 AM, C.F.Scheidecker Antunes <
cf.antunes@gmail.com> wrote:

> I've tried to load the new aspectJ runtime and changed the dependency to
> 1.7.2 instead.
>
> The problem persists.
>
> Any ideas?
>
> Thanks.
>
>
> On Tue, Feb 26, 2013 at 5:38 PM, C.F.Scheidecker Antunes <
> cf.antunes@gmail.com> wrote:
>
>> Hello,
>>
>> Cassandra 1.2.2 does not seem to like Aspects with it. Before, versions
>> 1.1.x I could load some Aspects to it putting the JARS under its library
>> folder and now with 1.2.2 I can't.
>>
>> I've got the error:
>>
>> java.lang.InstantiationException:
>> org.apache.cassandra.service.CassandraDaemon
>>     at java.lang.Class.newInstance0(Class.java:342)
>>     at java.lang.Class.newInstance(Class.java:310)
>>     at
>> org.apache.commons.daemon.support.DaemonLoader.load(DaemonLoader.java:190)
>> Cannot load daemon
>> Service exit with a return value of 3
>>
>>
>> I've noticed that the CassandraDaemon has changed on 1.2.2.
>>
>> What is the process to load an Aspect to it?
>>
>> I am hoping to do something like:
>>
>> @Around("execution(*
>> org.apache.cassandra.thrift.CassandraServer.doInsert(..))")
>>
>> And then specify under cassandra-env.sh:
>>
>> # AspectJ weaving
>> JVM_OPTS="$JVM_OPTS
>> -javaagent:$CASSANDRA_HOME/lib/aspectjweaver-1.6.11.jar"
>>
>>
>> I had some code with 1.1.8 and now with 1.2.2 it simply will not start
>> Cassandra.
>>
>> Any ideas?
>>
>> Thanks.
>>
>>
>

Re: Loading AspectJ with Cassandra

Posted by "C.F.Scheidecker Antunes" <cf...@gmail.com>.
I've tried to load the new aspectJ runtime and changed the dependency to
1.7.2 instead.

The problem persists.

Any ideas?

Thanks.

On Tue, Feb 26, 2013 at 5:38 PM, C.F.Scheidecker Antunes <
cf.antunes@gmail.com> wrote:

> Hello,
>
> Cassandra 1.2.2 does not seem to like Aspects with it. Before, versions
> 1.1.x I could load some Aspects to it putting the JARS under its library
> folder and now with 1.2.2 I can't.
>
> I've got the error:
>
> java.lang.InstantiationException:
> org.apache.cassandra.service.CassandraDaemon
>     at java.lang.Class.newInstance0(Class.java:342)
>     at java.lang.Class.newInstance(Class.java:310)
>     at
> org.apache.commons.daemon.support.DaemonLoader.load(DaemonLoader.java:190)
> Cannot load daemon
> Service exit with a return value of 3
>
>
> I've noticed that the CassandraDaemon has changed on 1.2.2.
>
> What is the process to load an Aspect to it?
>
> I am hoping to do something like:
>
> @Around("execution(*
> org.apache.cassandra.thrift.CassandraServer.doInsert(..))")
>
> And then specify under cassandra-env.sh:
>
> # AspectJ weaving
> JVM_OPTS="$JVM_OPTS
> -javaagent:$CASSANDRA_HOME/lib/aspectjweaver-1.6.11.jar"
>
>
> I had some code with 1.1.8 and now with 1.2.2 it simply will not start
> Cassandra.
>
> Any ideas?
>
> Thanks.
>
>

Loading AspectJ with Cassandra

Posted by "C.F.Scheidecker Antunes" <cf...@gmail.com>.
Hello,

Cassandra 1.2.2 does not seem to like Aspects with it. Before, versions
1.1.x I could load some Aspects to it putting the JARS under its library
folder and now with 1.2.2 I can't.

I've got the error:

java.lang.InstantiationException:
org.apache.cassandra.service.CassandraDaemon
    at java.lang.Class.newInstance0(Class.java:342)
    at java.lang.Class.newInstance(Class.java:310)
    at
org.apache.commons.daemon.support.DaemonLoader.load(DaemonLoader.java:190)
Cannot load daemon
Service exit with a return value of 3


I've noticed that the CassandraDaemon has changed on 1.2.2.

What is the process to load an Aspect to it?

I am hoping to do something like:

@Around("execution(*
org.apache.cassandra.thrift.CassandraServer.doInsert(..))")

And then specify under cassandra-env.sh:

# AspectJ weaving
JVM_OPTS="$JVM_OPTS -javaagent:$CASSANDRA_HOME/lib/aspectjweaver-1.6.11.jar"


I had some code with 1.1.8 and now with 1.2.2 it simply will not start
Cassandra.

Any ideas?

Thanks.