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 228850 - REST Resources Configuration dialog pops up after creating the Async Chat sample project
Summary: REST Resources Configuration dialog pops up after creating the Async Chat sam...
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.3
Hardware: All All
: P2 normal (vote)
Assignee: Martin Janicek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-22 13:46 UTC by Petr Jiricka
Modified: 2013-05-22 14:07 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Jiricka 2013-04-22 13:46:26 UTC
1. Create the "Asynchronous Chat (Java EE 7)" sample project
2. Expand the top level node of this project
3. After a while, the REST Resources Configuration dialog pops up

This is not expected, the expectation is that sample should already be configured, so there should be nothing to configure.
Comment 1 David Konecny 2013-04-29 00:22:07 UTC
I fixed the problem partially on the REST support side (EE7 branch on web-main#19d3ed5cbef7) but the real cause is that created project reports via its org.netbeans.modules.maven.j2ee.web.WebModuleImpl.getJ2eeProfile() method that it is EE5 project. It is because web.xml which comes with project has 2.5 version and nobody set value of MavenJavaEEConstants.HINT_J2EE_VERSION. In project properties it looks like project has spec version EE7 but I think the UI just defaults to EE7 when MavenJavaEEConstants.HINT_J2EE_VERSION is not set.
Comment 2 Petr Jiricka 2013-04-29 06:43:58 UTC
> It is because web.xml which comes with project has 2.5 version

Would it make sense to just update this web.xml to version 3.1?
Comment 3 David Konecny 2013-04-29 19:52:31 UTC
(In reply to comment #2)
> Would it make sense to just update this web.xml to version 3.1?

That would help too. On the other hand I thought that we are taking these sample sources as they are from some other source.
Comment 4 Petr Jiricka 2013-04-30 06:50:17 UTC
Yes, but I think we can diverge in some cases. This is something that should be fixed in the original GlassFish samples anyway - do you agree? Then we should file a bug against glassfish-samples.java.net.
Comment 5 Martin Janicek 2013-04-30 08:10:36 UTC
Agree that the version should be corrected even in original samples. But anyway few changes on Maven side are needed (currently WebModuleImpl.getJ2eeProfile() is not handling version 3.1 at all)..
Comment 6 Martin Janicek 2013-04-30 08:48:23 UTC
Changes in Maven: web-main #00883a137765
Comment 7 Martin Janicek 2013-04-30 13:48:00 UTC
I have added nb-configuration.xml for both samples (web-main #cce4002e0eef). I'm not able to see any pop-up after the changes --> Closing as FIXED
Comment 8 Quality Engineering 2013-05-02 14:11:41 UTC
Integrated into 'main-golden', will be available in build *201305021042* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/19d3ed5cbef7
User: David Konecny <dkonecny@netbeans.org>
Log: #228850 - REST Resources Configuration dialog pops up after creating the Async Chat sample project
Comment 9 Quality Engineering 2013-05-08 02:24:45 UTC
Integrated into 'main-golden', will be available in build *201305072300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/075d4bce6bbd
User: Martin Janicek <mjanicek@netbeans.org>
Log: #228850 - REST Resources Configuration dialog pops up after creating the Async Chat sample project
Comment 10 David Konecny 2013-05-22 02:23:49 UTC
Martin there is still a problem I think. I fixed today issue 230050 which should generate beans.xml of version 1.0 in EE6 project and of version 1.1 in EE7 project. If you try it in the latest dev build of 7.4 and on for example sample project "Servlet CDI" (delete beans.xml from WEB-INF folder first) you will see that beans.xml 1.0 is generated (wizard in available in 'Context And Dependency' category) which would indicate that maven project's WebModule reported <EE7 spec version. Yet if you open project properties you will see there "EE7 spec" selected.

Feel free to file a new issue if you prefer.
Comment 11 Martin Janicek 2013-05-22 14:03:06 UTC
I was debugging beans wizard and this is different issue (WebModuleImpl.getJ2eeProfile() from maven.j2ee should return JAVA_EE_7 profile as default value). I'll file another ticket
Comment 12 Martin Janicek 2013-05-22 14:07:08 UTC
I created issue 230122 to track it.