eclipse-ee4j / glassfish

Eclipse GlassFish
https://eclipse-ee4j.github.io/glassfish/
385 stars 143 forks source link

ant run failed because browser was not found, but a correct error was not shown #8325

Closed glassfishrobot closed 15 years ago

glassfishrobot commented 15 years ago

Build: SDK b03b (promoted build47b). Was used Solaris 10 Sparc machine.

Was used ejb31-war sample.

I've executed ant all and got at the end of the execution:

====================================================

eploy-url-message: [echo] Application Deployed at: http://localhost:8080/ejb-ejb31-war

getBrowser:

launch: [loadfile] /opt/glassfishv3/glassfish/samples/javaee6/ejb/nbproject/private/private.properties doesn't exist

if-can-launch: [echo] Launching ejb-ejb31-war.

BUILD FAILED /opt/glassfishv3/glassfish/samples/javaee6/ejb/ejb31-war/build.xml:12: The following error occurred while executing this line: /opt/glassfishv3/glassfish/samples/bp-project/command-line-ant-tasks.xml:114: The following error occurred while executing this line: /opt/glassfishv3/glassfish/samples/bp-project/command-line-ant-tasks.xml:142: Execute failed: java.io.IOException: Cannot run program "$

{browser}": error=2, No such file or directory

Total time: 3 seconds

=======================================================

So browser was not found, for this reason BUILD FAILED.

I've checked command-line-ant-tasks.xml, and found there:

=================================================================

To launch the application, open a Web browser and visit: [http://$](http://$) {javaee.server.name} :$ {javaee.server.port} /$ {run.uri} To launch the browser automatically on non-windows and non-mac machines, make sure that you have specified valid browser for the property default.browser in bp-project/build.properties. ==================================================== So in my case the user should see a correct error message, that would tell to specify a browser in bp-project/build.properties. But a user did not see this message and none of the docs mentioned the ability to setup a browser in build.properties. I've uncommented browser line in build.properties and put a correct path there. After that everything was fine. So when a browser was not found, a user has to see a correct error message. It would be better, if the ability to setup a browser in build.properties will be mentioned in the instruction. #### Environment Operating System: Solaris Platform: Sun #### Affected Versions [V3]
glassfishrobot commented 6 years ago
glassfishrobot commented 15 years ago

@glassfishrobot Commented easarina said: assigned this bug to Ken Saks.

glassfishrobot commented 15 years ago

@glassfishrobot Commented easarina said: The same problem happened for all samples that are trying to start browser during ant run.

glassfishrobot commented 15 years ago

@glassfishrobot Commented easarina said: this is a common issue.

glassfishrobot commented 15 years ago

@glassfishrobot Commented msreddy said: Need to add browser instrcuctions (from build.properties) to UserREADME.html.

glassfishrobot commented 15 years ago

@glassfishrobot Commented @vkraemer said: https://glassfish-samples.dev.java.net/servlets/ReadMsg?list=cvs&msgNo=1258 should have the diffs once it is available

glassfishrobot commented 7 years ago

@glassfishrobot Commented This issue was imported from java.net JIRA GLASSFISH-8325

glassfishrobot commented 15 years ago

@glassfishrobot Commented Reported by easarina

glassfishrobot commented 15 years ago

@glassfishrobot Commented Marked as fixed on Tuesday, September 29th 2009, 7:32:47 am