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 200911 - nb 7.0 editor will mark a webservice and Singleton class as an error
Summary: nb 7.0 editor will mark a webservice and Singleton class as an error
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: EJB (show other bugs)
Version: 7.0
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Martin Fousek
URL: http://stackoverflow.com/questions/70...
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-12 15:36 UTC by simgineer
Modified: 2013-03-14 08:29 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screenshot of incorrect suggestion (56.47 KB, image/png)
2011-08-12 15:38 UTC, simgineer
Details
@Singleton error (330.46 KB, image/jpeg)
2013-03-06 22:22 UTC, treaz
Details
screenshot from dev build (117.02 KB, image/png)
2013-03-07 08:56 UTC, Martin Fousek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description simgineer 2011-08-12 15:36:48 UTC
The hint is that a @WebService class must be used with the @Stateless annotation and it does not accept @Singleton. the compiler and deployement into glassfish work as expected.

see test documented on stack overflow:
http://stackoverflow.com/questions/7004258/how-to-create-a-singleton-bean-that-implements-a-webservice
Comment 1 simgineer 2011-08-12 15:38:06 UTC
Created attachment 109951 [details]
screenshot of incorrect suggestion 

in nb 7.0 editor and also occurs in nb 6.9.1
Comment 2 Martin Fousek 2011-08-15 09:20:04 UTC
Right, it seems that it's possible to create singleton web service:
http://download.oracle.com/javaee/6/tutorial/doc/gipjg.html

Fixed in web-main #7beb5fa2dcf7.
Comment 3 Quality Engineering 2011-08-16 13:55:59 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/7beb5fa2dcf7
User: Martin Fousek <marfous@netbeans.org>
Log: #200911 - nb 7.0 editor will mark a webservice and Singleton class as an error
Comment 4 treaz 2013-03-06 22:22:24 UTC
Created attachment 132298 [details]
@Singleton error
Comment 5 treaz 2013-03-06 22:22:39 UTC
This BUG reproduces on NetBeans IDE 7.2.1 (Build 201210100934).
The behavior that I'm seeing is this:
1) I have a @WebService with @Stateless.
2) I change the @Stateless to @Singleton and I get the attached prinscreen after saving the file.
Comment 6 Martin Fousek 2013-03-07 08:56:48 UTC
Created attachment 132316 [details]
screenshot from dev build

Sorry, I'm not able to reproduce your issue in the latest build. Take a look on my attached screenshot.

Please, could you download and re-try it in the NetBeans 7.3?
If your issue remains, please could you attach your 'helloservice' project?
Comment 7 Martin Fousek 2013-03-14 08:29:52 UTC
I'm re-closing the issue as fixed again since the fix works well to me. treaz please if you are facing issues in the latest builds please reopen this issue with sample project for reproducing or raise a new issue for that. Thanks a lot.