aspose file tools*
The moose likes Groovy and the fly likes Got Groovy to work, now a problem with Grails - would appreciate help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Languages » Groovy
Bookmark "Got Groovy to work, now a problem with Grails - would appreciate help" Watch "Got Groovy to work, now a problem with Grails - would appreciate help" New topic
Author

Got Groovy to work, now a problem with Grails - would appreciate help

Bill Johnston
Ranch Hand

Joined: Nov 17, 2005
Posts: 201
Good day all,

I have set up Grails and I am trying to follow the tutoral http://www.grails.org/Quick+Start

I am following it exactly and I was able to do these steps apparently successfully:
>grails create-app book-pjct
>grails create-domain-class Book
>edited and changed class Book and class BootStrap appropriately
>grails create-controller book.pjct.Book
>Modified class BookController by adding/commenting:
def scaffold = Book
//def index = { }

Stalled on the next command:
>grails run-app

I get the following error:

Resolving dependencies...
Dependencies resolved in 1391ms.
Running script C:\ ... \grails-1.3.5\scripts\RunApp.groovy
Environment set to development
[groovyc] Compiling 1 source file to C:\ ... \grails_app_01\book-pjct\target\classes
Running Grails application..
2010-10-19 11:17:38,852 [main] ERROR http11.Http11Protocol - Error initializing endpoint
java.net.BindException: Address already in use: JVM_Bind<null>:8080
...

I don't see any instructions as to how to change the port to something else, as I've seen for Tomcat or Orion. I looked through the code and do see several places where port 8080 is specified; but I don't know what affect it will have if I change them, and what steps to take to do so if I should.

Has anyone else encountered this? Can anyone offer any help? Thanks in advance. Regards,

~Bill
Bill Johnston
Ranch Hand

Joined: Nov 17, 2005
Posts: 201
Is there perhaps a better place to post this?
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

Instead of trying to change the port number, can't you shutdown the application which already listens to it ? Do you having a running instance of Tomcat of some other web server in the background ?


[My Blog]
All roads lead to JavaRanch
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

If you want to change the port, you can use -Dserver.port=<port number> with the run-app command.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 40061
    
  28
Bill Johnston wrote:Is there perhaps a better place to post this?
I don't know; this appears to be our Grails forum too.
Bill Johnston
Ranch Hand

Joined: Nov 17, 2005
Posts: 201
Christophe Verré wrote:Instead of trying to change the port number, can't you shutdown the application which already listens to it ? Do you having a running instance of Tomcat of some other web server in the background ?


Thanks very much Christophe.

I didn't think I had Tomcat running; I had shut it down before running Grails.

I knew I had Java EE 5 running, but I had shut it down (or rather 'exit'ed it on the task bar - Windows).

I generally leave my work PC up for days, and sometimes even weeks because it takes about 10 minutes each reboot and it is nice to have all my folders and environments set from the previous day when I come in in the morning.

But I finally did what tech services always recommends (no not re-imaging my HD, LOL) ... I rebooted. That fixed it ... for now anyway.
Bill Johnston
Ranch Hand

Joined: Nov 17, 2005
Posts: 201
Christophe Verré wrote:If you want to change the port, you can use -Dserver.port=<port number> with the run-app command.


Thanks, I will keep that information.
Bill Johnston
Ranch Hand

Joined: Nov 17, 2005
Posts: 201
Campbell Ritchie wrote:
Bill Johnston wrote:Is there perhaps a better place to post this?
I don't know; this appears to be our Grails forum too.


Thanks for your reply.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Got Groovy to work, now a problem with Grails - would appreciate help