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 196182 - Don't add RequestScoped annotation for RESTful from DB ( or entities )
Summary: Don't add RequestScoped annotation for RESTful from DB ( or entities )
Status: RESOLVED FIXED
Alias: None
Product: webservices
Classification: Unclassified
Component: REST (show other bugs)
Version: 7.0
Hardware: Other Other
: P3 normal (vote)
Assignee: Denis Anisimov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-02 08:15 UTC by Denis Anisimov
Modified: 2011-03-03 10:00 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 Denis Anisimov 2011-03-02 08:15:39 UTC
- Create Web Project with JEE6.
- Create beans.xml ( via CDI item in wiazard ).
- Create RESFtul from DB or entities.
- Try to deploy result aaplication.

There will be an error :
WELD-000082 Scope interface javax.enterprise.context.RequestScoped is not
allowed on stateless enterprise beans for class service.ZzdvarFacadeREST.  Only
@Dependent is allowed on stateless enterprise beans.. Please see server.log for
more details.

This bug is consequence of presence RequestScoped annotation for Stateless 
session bean ( RESTful service ).
This is the regression which is introduced by fix for issue #191997 .
Comment 1 Denis Anisimov 2011-03-02 08:35:36 UTC
changeset:   189733:f94eeaeab483
Comment 2 alvarogh 2011-03-02 18:30:11 UTC
I do not want to disturb anyone, just use NB as it is to do my job. If an error occurs, often test the other options and combinations that show, if error persists in forums and google looking for similar cases to compare and resolve it if appropriate and only after doing all that before I finish here.

Reference only to someone in the same circumstances. Finally I used the example "REST: Customer Database (Java EE 5)" deleted some things you can add my own jndi / datasource in "Entity Classes from database" and finally "RESTful: Web Services from Entity Classes". This time it worked.

I'm using NB 7.0 Beta 2, GF 3.1 final, jdk-7-ea-bin-b131-windows-x64-24_feb_2011
Comment 3 Denis Anisimov 2011-03-02 19:22:42 UTC
(In reply to comment #2)
> I do not want to disturb anyone, just use NB as it is to do my job. If an error
> occurs, often test the other options and combinations that show, if error
> persists in forums and google looking for similar cases to compare and resolve
> it if appropriate and only after doing all that before I finish here.
> 
> Reference only to someone in the same circumstances. Finally I used the example
> "REST: Customer Database (Java EE 5)" deleted some things you can add my own
> jndi / datasource in "Entity Classes from database" and finally "RESTful: Web
> Services from Entity Classes". This time it worked.
> 
> I'm using NB 7.0 Beta 2, GF 3.1 final,
> jdk-7-ea-bin-b131-windows-x64-24_feb_2011

This is correct and very good approach.
But if you find something wrong please follow the bug tracker practice.
Each bug should be localized and mapped to only one problem.
Comment 4 Quality Engineering 2011-03-03 10:00:33 UTC
Integrated into 'main-golden', will be available in build *201103030057* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/f94eeaeab483
User: Denis Anisimov <ads@netbeans.org>
Log: Fix for BZ#196182 -  Don't add RequestScoped annotation for RESTful from DB