|
I'm using netbeans as IDE.
Issue 1: I'm getting errors when running the app (also through terminal): Server failed to start: LifecycleException: Protocol handler initialization failed: java.net.BindException: Address already in use<null>:8080 Can switch to port 8090 fine through terminal. Does anyone know how to set this in netbeans? Does anyone know how to resolve the error, as was working on port 8080 fine...Ctrl+c didn't seem to make a difference. Issue 2: I'm working thru' the pragmatic Grails book (Quick start guide), and have entered some bootstrap data exactly as in the book, but am not seeing the data reflected when I run the app. Tried writing import .* but no impact. Anyone know why the bootstrapping is not working? Posted the info on the pragprog forum (http://forums.pragprog.com/forums/116/topics/4298)... All help gratefully appreciated... Thanks, Mark |
|
Hello Mark,
Q1: In NetBeans right click on your project and select properties. The next screen allows you to set the server port. Q2: For some odd reason I always seem to forget what can cause data to not get saved in the BootStrap code. Luckily I just remembered struggling over this for longer than I care to admit. Most likely you have an error in you data, i.e. you forgot to populate a required field. Thanks to my co-worker Ed Young we typically most saves (definitely the ones in the BootStrap code) through the following closure we put in a BaseDomain class:
def validateAndSave = { flushStatus -> def savedObj dev valid = this.validate() if(valid) { savedObj = this.save(flush:flushStatus)
} if(!valid || !savedObj) { println("Error saving " + this) println(this.errors) } savedObj } } Warning, I didn't cut and paste this code so there may be typos. Let me know how it goes. Cheers, Daniel
On Sun, Nov 14, 2010 at 10:45 AM, thristan <[hidden email]> wrote:
|
|
Daniel,
A thousand thanks for the Netbeans tip. Once I switched to 8090 in Netbeans, it sorted out the bootstrapping. Obviously this was at the heart of the issue. Much appreciated, Mark |
| Powered by Nabble | Edit this page |
