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.
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)
Hi Denis, could I please ask you to investigate? Thanks.
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 .
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.
Sure, I will do it. Thanks.
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.
I just created issue https://glassfish-samples.dev.java.net/issues/show_bug.cgi?id=20.
>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!
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.
*** This bug has been marked as a duplicate of bug 178428 ***