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 175397 - "Asynchronous Request" example failed to compile
Summary: "Asynchronous Request" example failed to compile
Status: RESOLVED DUPLICATE of bug 178428
Alias: None
Product: javaee
Classification: Unclassified
Component: Samples (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@javaee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-26 04:50 UTC by vladperl
Modified: 2010-03-01 09:17 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 vladperl 2009-10-26 04:50:39 UTC
Example "Asynchronous Request (Java EE 6)" failed to compile with the following errors:

Created dir: D:\SPS\project\AsyncRequest\build\empty
Compiling 1 source file to D:\SPS\project\AsyncRequest\build\web\WEB-INF\classes
D:\SPS\project\AsyncRequest\src\java\web\servlet\async_request_war\AjaxCometServlet.java:118: cannot find symbol
symbol  : method setAsyncTimeout(int)
location: interface javax.servlet.http.HttpServletRequest
        req.setAsyncTimeout(10 * 60 * 1000);
D:\SPS\project\AsyncRequest\src\java\web\servlet\async_request_war\AjaxCometServlet.java:121: <anonymous
web.servlet.async_request_war.AjaxCometServlet$2> is not abstract and does not override abstract method
onStartAsync(javax.servlet.AsyncEvent) in javax.servlet.AsyncListener
        req.addAsyncListener(new AsyncListener() {
D:\SPS\project\AsyncRequest\src\java\web\servlet\async_request_war\AjaxCometServlet.java:121: cannot find symbol
symbol  : method addAsyncListener(<anonymous javax.servlet.AsyncListener>)
location: interface javax.servlet.http.HttpServletRequest
        req.addAsyncListener(new AsyncListener() {
3 errors
D:\SPS\project\AsyncRequest\nbproject\build-impl.xml:405: The following error occurred while executing this line:
D:\SPS\project\AsyncRequest\nbproject\build-impl.xml:228: Compile failed; see the compiler error output for details.
---------------------------------------------------------------------------------------------

My Environment:
Product Version: NetBeans IDE Dev (Build 200910241428)
Java: 1.6.0_16; Java HotSpot(TM) Client VM 14.2-b01
System: Windows Vista version 6.0 running on x86; Cp1252; en_US (nb)
Comment 1 Petr Jiricka 2009-10-30 18:35:41 UTC
Hi Denis, could I please ask you to investigate? Thanks.
Comment 2 Denis Anisimov 2009-11-02 09:31:55 UTC
This is problem of recently changed Servlet 3.0 spec I believe.

First of all please provide information about your J2EE server .
I cannot reproduce this issue with my Glassfish v3 prelude ( not sure about it's build number ).
The Servlet 3.0 spec which is available on JCP is dated by May 2009 and  AsyncRequest sample 
uses more recent version of the spec as I see ( f.e. AsyncListener in the example has three implemented method
but mentioned version of the spec require only two methods ).
I cannot find recent Servlet 3.0 spec but probably it is already updated.
Your J2EE server could follow this updated spec and this is the problem of this issue.
( method "onStartAsync" is not in  AsyncListener interface for Servlet 3.0 spec which uses my Glassfish f.e.).

So first of all we need clarification about J2EE server.
As result AsyncRequest probably require to be changed according new Servlet 3.0 spec .
Comment 3 Petr Jiricka 2009-11-02 09:45:55 UTC
Hi Denis, thanks for investigation. If you are using GF v3 Prelude, can you please try with the latest promoted build
from http://download.java.net/glassfish/v3/promoted/ (currently b70)?

If a change is needed in the samples source, then we should file a bug against the samples project:
https://glassfish-samples.dev.java.net/. BTW, there already is a bug against this sample, but noone has looked at it
yet: https://glassfish-samples.dev.java.net/issues/show_bug.cgi?id=19.
Comment 4 Denis Anisimov 2009-11-02 10:27:25 UTC
Sure, I will do it.

Thanks.
Comment 5 Denis Anisimov 2009-11-02 11:54:45 UTC
I have checked this with latest currently available Glassfish server (b70).

I able to reproduce this issue.
I believe my original suggestion about changed spec is correct.
So the sample should be fixed against latest Servlet 3.0 spec.
Comment 6 Denis Anisimov 2009-11-02 12:05:58 UTC
I just created issue https://glassfish-samples.dev.java.net/issues/show_bug.cgi?id=20.
Comment 7 vladperl 2009-11-02 15:47:12 UTC
>First of all please provide information about your J2EE server.
I tried example with Glassfish v3 Build 69.
I don't think we should care about Glassfish Prelude in this point :)

Thank you!
Comment 8 vladperl 2009-12-30 20:35:31 UTC
The example embedded in final release Netbeans 6.8 still doesn't work.
I know that exactly the same example from "glassfish samples" is working fine.
So I don't see the reason why we have broken example inside final version of Netbeans. Please fix it. It's very important example.
Comment 9 Petr Jiricka 2010-03-01 09:17:43 UTC

*** This bug has been marked as a duplicate of bug 178428 ***