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.

Bug 215725 - main/misc/logger/uihandlerserver project cannot be executed, debugged, etc.
Summary: main/misc/logger/uihandlerserver project cannot be executed, debugged, etc.
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Web Project (show other bugs)
Version: 7.3
Hardware: PC Linux
: P3 normal (vote)
Assignee: Jaroslav Tulach
URL:
Keywords: API_REVIEW_FAST
Depends on:
Blocks:
 
Reported: 2012-07-19 11:35 UTC by Jaroslav Tulach
Modified: 2012-08-31 02:01 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
One solution is to have a dialog with button "Exec anyway" (3.16 KB, patch)
2012-07-19 11:37 UTC, Jaroslav Tulach
Details | Diff
If nbproject/project.properties contains j2ee.server.check=false, no isServerCheck is made (2.60 KB, patch)
2012-08-20 14:40 UTC, Jaroslav Tulach
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2012-07-19 11:35:37 UTC
I have a project in misc repository called logger/uihandlerserver:
http://hg.netbeans.org/main/misc/file/7d24400868db/logger/uihandlerserver
The project build script is customized to download tomcat 6.0 and start it properly. Everything used to work fine when the project was created, but since then there is some new test in WebActionProvider to verify whether isSelectedServer().

The test prevents me to invoke regular operations on my project. Now, when I am forced to deal with my project again, I'd like to resolve this blocker.
Comment 1 Jaroslav Tulach 2012-07-19 11:37:41 UTC
Created attachment 122190 [details]
One solution is to have a dialog with button "Exec anyway"
Comment 2 Jaroslav Tulach 2012-07-19 11:39:16 UTC
Any problems if I integrate this change?
Comment 3 David Konecny 2012-07-19 23:39:33 UTC
I'm sorry Jarda, but I do not think "Execute Anyway" make sense. It may work in your customized project but in general server is needed because if you do not have one then where do you want to deploy your app for running?

Could you just register Tomcat you've started in the IDE Servers?

PetrH, is there some other way to fake a server?
Comment 4 Petr Jiricka 2012-07-20 10:17:51 UTC
I don't like this solution from a UI point of view either. Is there currently a workaround, such as running your customized Ant target from the build.xml node? (And possibly assigning a keyboard shortcut to it?)
Comment 5 Jaroslav Tulach 2012-07-24 12:45:32 UTC
Would you mind adding "check.server.registry=false" into private.properties or project.properties to disable the check for my project completely?
Comment 6 David Konecny 2012-07-24 23:30:58 UTC
(In reply to comment #5)
> Would you mind adding "check.server.registry=false" into private.properties or
> project.properties to disable the check for my project completely?

That sounds OK. But, still, why cannot you just add some config file to your userdir? I registered Tomcat in my IDE and can see <user-dir>/config/J2EE/.nbattrs which defines the server. Recreating that file after IDE started (via regular FileSystem API) directly from your unit test should be easy and should work, no?
Comment 7 Jaroslav Tulach 2012-08-09 10:06:42 UTC
Well, I don't need this in unit tests, I need this to work for everyone who checks the sources out from Hg. If it is sort of OK to add some property to suppress the dialog, I prepare a patch and come back.
Comment 8 Jaroslav Tulach 2012-08-20 14:40:22 UTC
Created attachment 123313 [details]
If nbproject/project.properties contains j2ee.server.check=false, no isServerCheck is made
Comment 9 David Konecny 2012-08-20 20:24:52 UTC
(In reply to comment #8)
> If nbproject/project.properties contains j2ee.server.check=false, no
> isServerCheck is made

The patch looks OK to me.
Comment 10 Jaroslav Tulach 2012-08-24 13:17:26 UTC
OK, I'll integrate on Monday.
Comment 11 Jaroslav Tulach 2012-08-28 11:14:00 UTC
ergonomics#567eaa3729bd and used in http://hg.netbeans.org/main/misc/rev/798c1938b641
Comment 12 Quality Engineering 2012-08-31 02:01:34 UTC
Integrated into 'main-golden', will be available in build *201208310001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/567eaa3729bd
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #215725: Allow operations on project (run, debug) without a configured server