cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thairu <tha...@optify.net>
Subject Re: run Cassandra tutorial example
Date Wed, 24 Aug 2011 23:07:42 GMT
"Error stacktraces" is output from maven.
mvn -e option turns on Error reporting.

From: aaron morton <aaron@thelastpickle.com<mailto:aaron@thelastpickle.com>>
Reply-To: "user@cassandra.apache.org<mailto:user@cassandra.apache.org>" <user@cassandra.apache.org<mailto:user@cassandra.apache.org>>
Date: Wed, 24 Aug 2011 02:14:12 -0700
To: "user@cassandra.apache.org<mailto:user@cassandra.apache.org>" <user@cassandra.apache.org<mailto:user@cassandra.apache.org>>
Subject: Re: run Cassandra tutorial example

HColumn(city=Austin)
Is the data you are after.

Have a look in src/main/resources/log4j.properties if you want to change the logging settings.

Have fun.
-----------------
Aaron Morton
Freelance Cassandra Developer
@aaronmorton
http://www.thelastpickle.com

On 24/08/2011, at 4:06 AM, Alvin UW wrote:

Thanks.

By your solution, the problem is fixed.
But my output is like this.
I don't understand what's the meaning of " Error stacktraces are turned on."
And I hope only the results are outputted, not the INFO.

 mvn -e exec:java -Dexec.args="get" -Dexec.mainClass="com.datastax.tutorial.TutorialRunner"
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building cassandra-tutorial
[INFO]    task-segment: [exec:java]
[INFO] ------------------------------------------------------------------------
[INFO] Preparing exec:java
[INFO] No goals needed for project - skipping
[INFO] [exec:java {execution: default-cli}]
HColumn(city=Austin)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Tue Aug 23 12:02:27 EDT 2011
[INFO] Final Memory: 11M/100M


2011/8/23 aaron morton <aaron@thelastpickle.com<mailto:aaron@thelastpickle.com>>
Did you sort this out ? The #cassandra IRC room is a good place to get help as well.

I tried to build it first using
mvn compile and got this different error
"[ERROR] Failed to execute goal on project cassandra-tutorial: Could not resolve dependencies
for project com.datastax.tutorial:cassandra-tutorial:jar:1.0-SNAPSHOT: Could not find artifact
me.prettyprint:hector-core:jar:0.8.0-2-SNAPSHOT -> [Help 1]"

There is a fix here...
https://github.com/zznate/cassandra-tutorial/pull/1

After than I did mvn compile and it worked.

So added the schema…
path-to-cassandra/bin/cassandra-cli --host localhost < ~/code/github/datastax/cassandra-tutorial/npanxx_script.txt

And ran
mvn -e exec:java -Dexec.args="get" -Dexec.mainClass="com.datastax.tutorial.TutorialRunner"

Which outputted
HColumn(city=Austin)

Hope that helps.

-----------------
Aaron Morton
Freelance Cassandra Developer
@aaronmorton
http://www.thelastpickle.com<http://www.thelastpickle.com/>

On 23/08/2011, at 10:30 AM, Alvin UW wrote:

Hello,

I'd like to try the cassandra tutorial example: https://github.com/zznate/cassandra-tutorial
 by following the readme.

After typing  mvn -e exec:java -Dexec.args="get" -Dexec.mainClass="com.datastax.tutorial.TutorialRunner"
I got the following errors.
Should I do something before the above command?
Thanks.

+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building cassandra-tutorial
[INFO]    task-segment: [exec:java]
[INFO] ------------------------------------------------------------------------
[INFO] Preparing exec:java
[INFO] No goals needed for project - skipping
[INFO] [exec:java {execution: default-cli}]
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] An exception occured while executing the Java class. com.datastax.tutorial.TutorialRunner

[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: An exception occured while executing
the Java class. com.datastax.tutorial.TutorialRunner
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
    at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
    at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
    at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
    at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: An exception occured while executing
the Java class. com.datastax.tutorial.TutorialRunner
    at org.codehaus.mojo.exec.ExecJavaMojo.execute(ExecJavaMojo.java:346)
    at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
    ... 17 more
Caused by: java.lang.ClassNotFoundException: com.datastax.tutorial.TutorialRunner
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:284)
    at java.lang.Thread.run(Thread.java:619)
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Mon Aug 22 18:24:05 EDT 2011
[INFO] Final Memory: 7M/100M





Mime
View raw message