Vivek,

You could try echoing the CLASSPATH to double check.  Drop an echo into the launch_service function in the cassandra shell script.  (~line 121)

Let us know the output. 

-brian

---

Brian O'Neill

Chief Architect

Health Market Science

The Science of Better Results

2700 Horizon Drive  King of Prussia, PA  19406

M: 215.588.6024 @boneill42    

healthmarketscience.com


This information transmitted in this email message is for the intended recipient only and may contain confidential and/or privileged material. If you received this email in error and are not the intended recipient, or the person responsible to deliver it to the intended recipient, please contact the sender at the email above and delete this email and any attachments and destroy any copies thereof. Any review, retransmission, dissemination, copying or other use of, or taking any action in reliance upon, this information by persons or entities other than the intended recipient is strictly prohibited.

 


From: Vivek Mishra <mishra.vivs@gmail.com>
Reply-To: <user@cassandra.apache.org>
Date: Wednesday, July 17, 2013 10:24 AM
To: <user@cassandra.apache.org>
Subject: Re: Main method not found in class org.apache.cassandra.service.CassandraDaemon

Hi Brian,
Thanks for your response. 
I think i did change CASSANDRA_HOME to point to new directory.

-Vivek


On Wed, Jul 17, 2013 at 7:03 PM, Brian O'Neill <bone@alumni.brown.edu> wrote:
Vivek,

The location of CassandraDaemon changed between versions.  (from org.apache.cassandra.thrift to org.apache.cassandra.service)

It is likely that the start scripts are picking up the old version on the classpath, which results in the main method not being found.

Do you have CASSANDRA_HOME set?  I believe the start scripts will use that.  Perhaps you have that set and pointed to the older 1.1.X version?

-brian


On Wed, Jul 17, 2013 at 8:31 AM, Vivek Mishra <mishra.vivs@gmail.com> wrote:
Finally,
i have to delete all rpm installed files to get this working, folders are:
/usr/share/cassandra
/etc/alternatives/cassandra
/usr/bin/cassandra
/usr/bin/cassandra-cli

Still don't understand why it's giving me such weird error:
********************************************************************
Error: Main method not found in class org.apache.cassandra.service.CassandraDaemon, please define the main method as:
   public static void main(String[] args)
*******************************************************************

This is not informative at all and does not even Help!

-Vivek


On Wed, Jul 17, 2013 at 3:49 PM, Vivek Mishra <mishra.vivs@gmail.com> wrote:
@aaron
Thanks for your reply. I did have a look rpm installed files
1.  /etc/alternatives/cassandra, it contains configuration files only.
    and .sh files are installed within /usr/bin folder.

Even if i try to run from extracted tar ball folder as 

/home/impadmin/apache-cassandra-1.2.4/bin/cassandra -f

same error.  

/home/impadmin/apache-cassandra-1.2.4/bin/cassandra -v

gives me 1.1.12 though it should give me 1.2.4


-Vivek
it gives me same error. 


On Wed, Jul 17, 2013 at 3:37 PM, aaron morton <aaron@thelastpickle.com> wrote:
Something is messed up in your install.  Can you try scrubbing the install and restarting ? 

Cheers

-----------------
Aaron Morton
Cassandra Consultant
New Zealand

@aaronmorton

On 17/07/2013, at 6:47 PM, Vivek Mishra <mishra.vivs@gmail.com> wrote:

Error: Main method not found in class org.apache.cassandra.service.CassandraDaemon, please define the main method as:
   public static void main(String[] args)
============================================================

Hi,
I am getting this error. Earlier it was working fine for me, when i simply downloaded the tarball installation and ran cassandra server. Recently i did rpm package installation of Cassandra and which is working fine. But somehow when i try to run it via originally extracted tar package. i am getting:

*************************************
xss =  -ea -javaagent:/home/impadmin/software/apache-cassandra-1.2.4//lib/jamm-0.2.5.jar -XX:+UseThreadPriorities -XX:ThreadPriorityPolicy=42 -Xms1024M -Xmx1024M -Xmn256M -XX:+HeapDumpOnOutOfMemoryError -Xss180k
Error: Main method not found in class org.apache.cassandra.service.CassandraDaemon, please define the main method as:
   public static void main(String[] args)
*************************************************

I tried setting CASSANDRA_HOME directory, but no luck.

Error is bit confusing, Any suggestions???

-Vivek






--
Brian ONeill
Chief Architect, Health Market Science (http://healthmarketscience.com)
mobile:215.588.6024
blog: http://brianoneill.blogspot.com/
twitter: @boneill42