How do setup and run this on windows machine ?

201 views
Skip to first unread message

ph

unread,
Nov 17, 2011, 2:12:04 AM11/17/11
to virgil-users
Hello team,

I want to run this code on Windows + Eclipse. How can make it run on
windows ?

Thanks
ph

Brian O'Neill

unread,
Nov 17, 2011, 10:40:43 AM11/17/11
to virgil...@googlegroups.com
ph,

Great to have you.  All of us run on unix right now, I'll spin up a VM and give this a test today.

-brian
--
Brian ONeill
Lead Architect, Health Market Science (http://healthmarketscience.com)
mobile:215.588.6024
blog: http://weblogs.java.net/blog/boneill42/
blog: http://brianoneill.blogspot.com/

ph

unread,
Nov 17, 2011, 1:24:50 PM11/17/11
to virgil-users
Hi Brian,

Thanks. I downloaded all. I was able to compile also in windows. I am
stuck how to run this ? You instruction to start bin/virgil will not
work on windows.
Do I need any App server ? I am trying to run within eclipse ?

Thanks
PH

On Nov 17, 7:40 am, "Brian O'Neill" <b...@alumni.brown.edu> wrote:
> ph,
>
> Great to have you.  All of us run on unix right now, I'll spin up a VM and
> give this a test today.
>
> -brian
>

Brian O'Neill

unread,
Nov 17, 2011, 1:27:21 PM11/17/11
to virgil...@googlegroups.com

Yep, bin/virgil is a shell script, which won't work too well on windows unless you are running cygwin.  I was going to try to write a batch file for you that did the same thing. (bin/virgil.bat)

If you are trying to run it in Eclipse, you may be able to run the main method directly, which is on:
org.apache.cassandra.http.HttpDaemon

I haven't gotten around to trying this yet.  Let me know how you make out.

-brian

ph

unread,
Nov 18, 2011, 7:26:40 PM11/18/11
to virgil-users
I couldn't run by main method in org.apache.cassandra.http.HttpDaemon

I created a .bat file with modified content of virgil shell script. I
couldn't make it run. Let me know if you make it work with some
instructions..
Appreciate your help...

Thanks

> blog:http://brianoneill.blogspot.com/- Hide quoted text -
>
> - Show quoted text -

Brian O'Neill

unread,
Nov 18, 2011, 8:01:41 PM11/18/11
to virgil...@googlegroups.com
No problem. 

How did you setup your eclipse project?
(Maven import?)

What happened when you tried to run the main method?
What were you passing in as arguments?

-brian

Brian O'Neill

unread,
Nov 20, 2011, 4:22:56 PM11/20/11
to virgil...@googlegroups.com
ph,

I got time to play around on Windows today.  I created a wiki page for you that describes how to get things running in Eclipse on Windows.  Take a look and let me know if you have any trouble:

Also, I added a batch file:
bin/virgil-cli.bat

That batch file successfully starts the command-line client on windows.  

I'm playing with the batch file that will allow you to start the server now, but it is introducing additional dependencies.  I'll let you know if/when I finish it. 

-brian

Brian O'Neill

unread,
Nov 20, 2011, 5:15:37 PM11/20/11
to virgil...@googlegroups.com
ph,

Still needs work, but I commited a batch file for the server as well.  This should let you start it.  Make sure you are in the root of the checkout directory, then execute:
bin\virgil.bat

The startup methods should be cleaned up once we introduce a VIRGIL_HOME environment variable (or use CASSANDRA_HOME) to being load resources directly off the filesystem instead of using the classpath.

Let me know if you need additional assistance.

-brian

ph

unread,
Nov 22, 2011, 10:56:10 PM11/22/11
to virgil-users
Hi Brian,

Quick question. Your code connects to existing cassandra instance or
does it starts its own cassandra instance ?

Thanks
PH

On Nov 20, 1:22 pm, "Brian O'Neill" <b...@alumni.brown.edu> wrote:
> ph,
>

> I got time to play around on Windows today.  I created a wiki page for you
> that describes how to get things running in Eclipse on Windows.  Take a
> look and let me know if you have any trouble:http://code.google.com/a/apache-extras.org/p/virgil/wiki/contribute
> Also, I added a batch file:
> bin/virgil-cli.bat
>
> That batch file successfully starts the command-line client on windows.
>
> I'm playing with the batch file that will allow you to start the server
> now, but it is introducing additional dependencies.  I'll let you know
> if/when I finish it.
>
> -brian
>

> On Fri, Nov 18, 2011 at 8:01 PM, Brian O'Neill <b...@alumni.brown.edu>wrote:
>
>
>
>
>
> > No problem.
>
> > How did you setup your eclipse project?
> > (Maven import?)
>
> > What happened when you tried to run the main method?
> > What were you passing in as arguments?
>
> > -brian
>

> >> > blog:http://brianoneill.blogspot.com/-Hide quoted text -

Brian O'Neill

unread,
Nov 23, 2011, 9:52:06 AM11/23/11
to virgil...@googlegroups.com
Right now, it starts its own instance.  Hopefully this week we're going to make that pluggable so you can connect to remote instances as well.

-brian

ph

unread,
Nov 23, 2011, 12:18:56 PM11/23/11
to virgil-users
Hi Brian,

Thanks. That makes it clear. I started my local instance and running
this app from eclipse and seraching my local instance for keyspaces.
It will be great if it can use different instance.
PH

> > > >> > blog:http://brianoneill.blogspot.com/-Hidequoted text -

Brian O'Neill

unread,
Nov 24, 2011, 10:54:46 AM11/24/11
to virgil...@googlegroups.com
ph,

Agreed.  Virgil was originally developed for contribution into the main code-base.  That way it could run inside the same JVM and a request wouldn''t have to take an extra hop to get to the server.  However, as we build out functionality, we definitely want the ability to run against remote instances. (or embedded)

Give us a few days.  It shouldn't be that hard to add.

Also, let us know if you have any other suggestions, or contributions.  We're still young and looking for fellow committers/contributors.

(Don't forget to give the UI a try too ;)
Just hit http://localhost:8080/

-brian

Brian O'Neill

unread,
Nov 28, 2011, 10:18:52 PM11/28/11
to virgil...@googlegroups.com
ph,

I just committed the ability to run against a remote instance.
Let me know if you have any problems with it:

-brian

Luke Philips

unread,
Feb 26, 2013, 9:19:02 PM2/26/13
to virgil...@googlegroups.com, bo...@alumni.brown.edu
I'm not sure Virgil has that .bat file, though for anyone looking around, here's the one-liner to get Virgil running on Windows:
java -Xms512m -Xmx1024m -javaagent:lib\aspectjweaver-1.6.11.jar -debug -cp "lib\hms-cassandra-rest-1.0.0.jar;lib\*" com.hmsonline.virgil.VirgilService server conf\virgil.yaml -host {yourhost}

this is assuming you've built from scratch:
https://github.com/hmsonline/virgil/wiki/building-from-scratch
and your path is currently within the extracted zip (e.g.
hmsonline\virgil\target\virgil-1.0.2-SNAPSHOT>

never saw the " Expand the package and right-click on HttpDaemon, select "Run as"->Java Application " for running in eclipse, but I'm sure that reference is a much older version of virigl.

Brian O'Neill

unread,
Feb 27, 2013, 2:42:52 PM2/27/13
to virgil...@googlegroups.com
Thanks Luke. I'll add this.

(If you want, go ahead and submit a pull request)

-brian

---

Brian O'Neill

Lead Architect, Software Development

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.

 


--
You received this message because you are subscribed to the Google Groups "virgil-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to virgil-users...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Luke Philips

unread,
Feb 27, 2013, 8:35:23 PM2/27/13
to virgil...@googlegroups.com, bo...@alumni.brown.edu
I've almost got it all working in eclipse (whatever I figure out will certainly get made into a pull req). This is for running cassandra-rest, as that's what I want to add to. Imported the maven project. Created a new run config for a Java App.
Main class: com.hmsonline.virgil.VirgilService
Prog Args: server {myPath}\hms\virgil\assembly\conf\virgil.yaml -host {my host}
VM Args: -Xms512m -Xmx1024m -javaagent:{myPath}\hms\virgil\target\virgil-1.0.2-SNAPSHOT\lib\aspectjweaver-1.6.11.jar -debug

virigl starts up, makes the connection, but when I try it http://localhost:8080/virgil/data/
it bombs out (whether it's at a keyspace, columnFamily, etc..)
ERROR [2013-02-28 01:13:35,587] com.yammer.dropwizard.jersey.LoggingExceptionMapper: Error handling a request: 2e119675349156d1
! java.lang.NoSuchMethodError: com.hmsonline.virgil.pool.ConnectionPoolAspect.aspectOf()Lcom/hmsonline/virgil/pool/ConnectionPoolAspect;


this does run standalone outside of eclipse, this is just the issue I see trying to run inside.

Brian O'Neill

unread,
Feb 27, 2013, 8:39:53 PM2/27/13
to virgil...@googlegroups.com

Luke,

I think you want the aspectj plugin for Eclipse.

I'm not at my dev machine right now to check, but that should allow you to configure aspectj run configurations.  If you use the same parameters, but within an aspectj run configuration, things should work.

(also, within an aspectj run configuration, you won't need the javaagent parameter)

-brian

Luke Philips

unread,
Feb 27, 2013, 9:02:51 PM2/27/13
to virgil...@googlegroups.com, bo...@alumni.brown.edu
Ah, I had that, wasn't using that - should have realized from the javaagent. Well, a step closer, still bombs:
ERROR [2013-02-28 02:00:21,067] com.yammer.dropwizard.jersey.LoggingExceptionMapper: Error handling a request: 18869769b1ca09d4
! java.lang.RuntimeException: Using connection w/o attaining from the pool.

Brian O'Neill

unread,
Feb 27, 2013, 10:00:30 PM2/27/13
to virgil...@googlegroups.com

OK.  I'm now on my dev machine.

Here is my AspectJ run configuration:

Main-class:
com.hmsonline.virgil.VirgilService

Program Arguments:
server src/test/resources/virgil.yaml -host localhost

P.S. I'm about to commit changes to the pom to be able to go against Cassandra 1.2.1.
I've also upgraded the snappy-java dependency to take care of that issue.

Luke Philips

unread,
Feb 28, 2013, 12:50:58 AM2/28/13
to virgil...@googlegroups.com, bo...@alumni.brown.edu
Thanks for all of those commits! I'll have to try out these run settings back on my main dev machine later, though having tried them on my mac I'm having the same previous issue (virgil runs, but exception whenever request is made)

Thanks,
Luke

Brian O'Neill

unread,
Feb 28, 2013, 5:17:45 AM2/28/13
to virgil...@googlegroups.com
Ah, I think I know your issue!

You probably need to Right-Click on your project and Configure -> Convert to AspectJ Project

That will allow force the AspectJ run configuration to pickup the aop.xml in src/main/resources/META-INF.

-brian

Brian O'Neill

unread,
Feb 28, 2013, 5:28:34 AM2/28/13
to virgil...@googlegroups.com
Luke,

I think converting your project to an AspectJ project will most likely fix your problem.  
(Configure -> Convert to AspectJ Project)

To double check, I tested the following procedure on a fresh machine, and it seem to work.
(BTW -- thanks for the cleanup on the trigger removal, I was rushing to get that committed for you and missed those imports)

After running the steps below, I was able to execute:

Let me know if you have any additional problems getting the IDE setup.

 
Git Clone
git clone g...@github.com:boneill42/virgil.git
git clone g...@github.com:boneill42/cassandra-mapreduce.git
git clone g...@github.com:boneill42/cassandra-rest.git

Add AspectJ to Eclipse
In Eclipse (Juno),
Help -> Eclipse Marketplace
Find -> "aspectj"
Aspectj Development Tools (Juno) -> Install
Next, Accept, Finish, Restart

Import the Projects (use m2eclipse)
File -> Import -> Maven -> Existing Maven Projects
Select folder for cassandra-rest
Next -> Finish, OK

Right-Click on hms-cassandra-rest and Configure -> Convert to AspectJ Project

File -> Import -> Maven -> Existing Maven Projects
Select folder for cassandra-mapreduce
Next -> Finish, OK

Run!
Navigate to:
hms-cassandra-rest -> src/main/java -> com.hmsonline.virgil -> VirgilService
Right-click and Run-As AspectJ Application
(that will fail)
Then Run -> Run Configurations
AspectJ/Java Applications -> VirgilService 
Under (x) = Arguments Tab,
Program Arguments
server src/test/resources/virgil.yaml -host localhost

Click "Apply" then "Run"


-brian


On Feb 28, 2013, at 12:50 AM, Luke Philips wrote:

Luke Philips

unread,
Feb 28, 2013, 12:42:58 PM2/28/13
to virgil...@googlegroups.com, bo...@alumni.brown.edu
Convert to AspectJ Project did it. Thanks.
Reply all
Reply to author
Forward
0 new messages