facebook

Servlet container mismatch?

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #210545 Reply

    Kevin Wilson
    Member

    Every jsp page is producing the following message – even if it’s empty!

    The method handlePageException(Exception) in the type PageContext is not applicable for the arguments (Throwable)

    The different method signatures lead me to believe that I’m using a different servlet specification than what MyEclipse is using to validate the JSPs. How do I change this?

    I’m using a fresh install of Eclipse 3.0.0 Build id: 200406251208 and MyEclipse 3.7.200 with Oracle 9i/AS as the servlet container.

    Thanks,
    Kevin Wilson

    #210547

    Riyad Kalla
    Member

    Kevin,
    What are your compiler settings set to? Sometimes when compiler settings are set very strickly, Eclipse starts complaining about the generated JSP -> Servlet code as the generation process does sometimes introduce cookie cutter code that doesn’t make sense.

    #210550

    Kevin Wilson
    Member

    Take a look at the error message. It’s trying to pass a Throwable to a method currently defined to take an Exception. Throwable is a parent class of exception. No compiler setting will make this problem go away – it’s not a warning, but a bona fide compile problem.

    #210551

    Kevin Wilson
    Member

    Only Incomple build path and Circular dependencies are set to Error, both on the Build Path tab of the compiler settings. Everything else is set to either Warning or Ignore. The Problems tab is showing 63 errors, 0 warnings, 0 infos.

    The compliance level is set to 1.3, although I tried it with 1.4 to no avail. The project is using JDK 1.3.1_09. I’ve tried switching it 1.4.2_05, but that didn’t help either.

    #210966

    Kevin Wilson
    Member

    Tomcat 5, does have two versions of handlPageException; one that takes an Exception, and another that takes a Throwable. The application uses Orion, from Oracle 9i/AS. Pulling up the PageContext class from Orion shows it has only the Exception version of handlePageContext.

    #210983

    No Operation
    Member

    Well, try at least a JSP 1.2 compatible container.

    public abstract void handlePageException(java.lang.Exception e)
    public abstract void handlePageException(java.lang.Throwable t)

    is required starting from JSP 1.2 spec.

    perhaps you should add the J2EE runtimes int your project build path?

    NOP

    #211000

    Kevin Wilson
    Member

    Sure, I could do that to make the error messages go away — in the IDE. It does not mean there won’t be compile issues when I deploy, since Orion is my target environment. I have no control over that, and MyEclipse lists it as a supported application server.

    #211002

    Riyad Kalla
    Member

    Kevin,
    1) Are you currently using the J2EE Implementation libraries from Orion in your build path and that is what is causing the compilation error?
    2) Have you tried using the Library Set that ships with ME, and deploying your app to see if it still runs?

    #211007

    No Operation
    Member

    There is no need to add the Orion JARs to the build path, coz of the deployment.

    1. use the supplied ME J2EE libraries in your project
    – ensures that checking works

    2. deploy to Orion (or whatever)
    – the JSPs compiled by ME are not used. Orion (or whatever) compiles the JSP again with its own libraries.
    – the generated code will match the server.

    NOP

    #211009

    Riyad Kalla
    Member

    NOP,
    The purpose of using the Orion JARs is to detect any incompatabilities during development, instead of at run-time.

    #211015

    No Operation
    Member

    then only one last suggestion:

    Report this bug to Orion. Since they claim to be JSP 1.2 compatible.

    NOP

    #211046

    Kevin Wilson
    Member

    Using the J2EE Container Library doesn’t fix it all by itself. I had to add the servlet.jar from the tomcat plugin before all the JSP errors would disappear. A filter I built doesn’t compile due to changes in how filter configurations changed on the abstract Filter class.

    #211056

    Riyad Kalla
    Member

    Kevin,
    This is why I suggest using the libraries from your app server and not necessarily using our Library Set. Tomcat 5 implements the JSP 2.0 and Servlet 2.4 spec, which as you found are different than whats included in the J2EE 1.3 Library Set. If we were shipping a 1.4 library set, you likely would not have run into a problem.

    Sorry for the trouble, but we are glad to see you are up and running now.

Viewing 13 posts - 1 through 13 (of 13 total)
Reply To: Servlet container mismatch?

You must be logged in to post in the forum log in