Hi Mark,

You need to build the project with ant, then add the generated class files to 
your build path.  Conversely, you can add the pre-built jar but then you'll end 
up with namespace collisions with the source in your IDE.  Eclipse *should* use 
the source first, as long as you don't reorder the libraries, so including the 
jar should be fine.  However, it's better to use the generated class files from 
the same source tree.

Robin.


-----Original Message-----
From: Mark Vigeant [mailto:[email protected]]
Sent: Fri 13/11/2009 09:03
To: [email protected]
Subject: RE: java API?
 
Sorry,

The imports aren't being resolved, yet I have the class files attached.

For instance in the line:
Client client = new Client(proto);
It says to import service.apache.Cassandra.Client, which I do but then there is 
an error on the import saying it cannot be resolved. This could be because I'm 
not attaching the right things to the build path, but I don't know what exactly 
TO attach.

Also, in the line
SlicePredicate predicate = new SlicePredicate(null, new SliceRange(new byte[0], 
new byte[0], false, 10));
There is a constructor error, stating that SlicePredicate either takes another 
SlicePredicate or nothing at all to be constructed.

Thanks

-----Original Message-----
From: Michael Greene [mailto:[email protected]]
Sent: Friday, November 13, 2009 11:54 AM
To: [email protected]
Subject: Re: java API?

It would be helpful to know the specific errors you're experiencing.

Michael

On Fri, Nov 13, 2009 at 10:51 AM, Mark Vigeant
<[email protected]> wrote:
> I'm completely new to Cassandra and I think the wiki and documentation are
> really well done. Now I'm trying to construct an application to upload data
> to upload data to my cluster, but I'm having a tough time figuring out the
> Java API. The client example on the website is a good start, but for some
> reason the classes Client, ColumnPath, and SlicePredicate are throwing me
> errors.  I have Cassandra 0.4.2 and I'm developing the application in
> eclipse on a different machine. I have the thrift library as well as all the
> Cassandra classes included in the folder /build/classes/org/apache/Cassandra
> in my build path.

This email message and any attachments are for the sole use of the intended 
recipients and may contain proprietary and/or confidential information which 
may be privileged or otherwise protected from disclosure. Any unauthorized 
review, use, disclosure or distribution is prohibited. If you are not an 
intended recipient, please contact the sender by reply email and destroy the 
original message and any copies of the message as well as any attachments to 
the original message.

<<winmail.dat>>

Reply via email to