This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
see for how i got here https://netbeans.org/bugzilla/show_bug.cgi?id=196030 this will seem confusing -- 4 cases - create simple default web project with default project name WebApplication1. default context root is /WebApplication1 it works remove default context root if set to Main project -- then clean/build run (big green >) runs project, deployed to localhost:8080/, 2nd invocation of run gets exception: init: deps-module-jar: deps-ear-jar: deps-jar: library-inclusion-in-archive: library-inclusion-in-manifest: compile: compile-jsps: Incrementally deploying WebApplication1_1 Completed incremental distribution of WebApplication1_1 run-deploy: Browsing: ${client.url} C:\Sun\JavaProjects\oodg\WebApplication1_1\nbproject\build-impl.xml:728: java.net.MalformedURLException: no protocol: ${client.url} at java.net.URL.<init>(URL.java:567) at java.net.URL.<init>(URL.java:464) at java.net.URL.<init>(URL.java:413) at org.netbeans.modules.ant.browsetask.NbBrowse.execute(NbBrowse.java:78) if project is NOT MAIN project -- set main project none -- then clean/build run works again; but this time just a run -- right mouse, run -- the 2nd run, after the 1st that works --this time goes to http://localhost:8080/WebApplication1 -- not http://localhost:8080/ do not get exception if project is a MAIN project.-- but does not work either. i think i saw in the write up of the referenced bug report that the copied project was suppose to work if the context root was removed -- but that seems weird -- since its deployed to a context root not based upon the project name -- ie. the empty context root.
Created attachment 106635 [details] siimple default web app
I think I have followed the procedure that you have described in this note with a recent build of NB 7.0 and the fcs bits of GF 3.1. I have not been able to replicate your results. I suppose that I might have misinterpreted some part of the test procedure since the description is a bit ambiguous. Some things that are unclear... 1. which build of NetBeans you are using. 2. are you working with a project named 'WebApplication1' or 'WebApplication1_1'. 3. did you remove the context-root by editing the project property or by editing the sun-web.xml or the glassfish-web.xml? 4. I was a bit confused by the statement... 'if set to Main project'... unambiguous noun-phrase between if and set in the fragment would be really helpful 5. Did you do something like.. trigger clean and build the main project (by selecting the broom and hammer tool from the tool bar) and then trigger run main project (by selecting the green arrow from the toolbar) and then trigger run main project (with the green arrow) a second time... immediately after the first time? Answers to the following questions would be helpful. Providing more detailed, step-by-step instructions on how you are generating the results that you are seeing would be even more helpful.
I can confirm described problem. It is just a case of incremental deploy, that's why the first run works. To reproduce: - create a java web project with GlassFish 3.1 - right-click project node and choose Properties - in run category remove all from "Context Path:" field and click OK - run project (either way) and browser is opened at http://localhost:8080/ - run project again. The application is deployed but browser is not opened and output shows messages which emiddio included in description. Product Version: NetBeans IDE Dev (Build 201103020001) Java: 1.6.0_24; Java HotSpot(TM) Client VM 19.1-b02 System: Windows XP version 5.1 running on x86; Cp1250; cs_CZ (nb)
cannot reproduce on solaris or mac. updating the build on my win7 box to see what is up...
answers: 1. which build of NetBeans you are using. the official netbeans 7.0Beta2 build 201102140001 2. are you working with a project named 'WebApplication1' or 'WebApplication1_1'. i was both -- but thought i removed all code that referenced _1 -- my mistake -- it does not matter what the name is. 3. did you remove the context-root by editing the project property or by editing the sun-web.xml or the glassfish-web.xml? project proptery 4. I was a bit confused by the statement... 'if set to Main project'... unambiguous noun-phrase between if and set in the fragment would be really helpful 2 situations behave differently -- if project is the "main" project -- right click project - set main project -- i used big green run and the clean/build icons 5. Did you do something like.. trigger clean and build the main project (by selecting the broom and hammer tool from the tool bar) and then trigger run main project (by selecting the green arrow from the toolbar) -- yes for the project that was the 'main project. and then trigger run main project (with the green arrow) a second time... immediately after the first time? yes NOTE : the behaviour is different if the project i NOT the main project -- in which case you have to use the other icons for clean/build/run -- or right mouse the project and select clean/build, then later right mouse run --behaves same for non 'main' project regardless of how invoked -- in all cases clean/build, then run works the 1st time; the second immediate run results are different depending on if the project is a 'main' project or not. stack trace with the 'main' project, go to the context root named after the project for the non-main project - which is wrong since was deployed to empty context root.
Sounds like server plugin does not return correct client URL when application is incrementally redeployed and web context is blank. Pass back to me if that's not the case.
Thanks for the clarifications. I am able to replicate a similar issue on windows based environments.
Integrated into 'main-golden', will be available in build *201103060000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/11f8a15297ac User: Vince Kraemer <vkraemer@netbeans.org> Log: #196206 : tmid for deployed app is recreated instead of pulled from the tmid cache on windows.