views:

1087

answers:

2

when i click on Run it displays and error message:

Starting GlassFish v3 Domain
GlassFish v3 Domain start failed.
/Volumes/Private/noname/Sites/projects/java/MyFirstServlet/nbproject/build-impl.xml:602: Deployment error:
GlassFish v3 Domain start failed.
See the server log for details.
BUILD FAILED (total time: 2 minutes 0 seconds)

but then i fire up Terminal in mac and use asadmin start-domain and it starts.

and in netbeans i then Run the project and it fires up Safari and displays the content.

but why cant glassfish start in netbeans? any idea?

A: 

Only thing that comes to my mind is to check if the JAVA_HOME is properly set. Guess GFv3 requires it to be set to the bin folder in the JDK installation. Just guessing...

Alfabravo
+1  A: 

Hey dudes. I've met the same problem as I was learning java web programming, but in windows env. I've spent much time guessing what that error could mean because the log file wasn't clearly saying that. Finally I found out that glassfish v3 was trying to run on 8080 port, which was already occupied by reportingservicesservice.exe which is sql server service. I didn't get to know how to switch the port used by glassfish, but I found that in netbeans 6.8 (which I use) in tools->servers I can add a new glassfish server instance which runs on a different, free port - that solved the problem :)

Csharp_Prefered