Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Jetty 9.4.15 and JSP issue

Also, your settings for the system and server classes for the webapp contexts look all wrong, and don't match the defaults in the WebAppContext class for jetty-9.4.15.

Your dump shows:

System Classes:
+> java.
|  |  |  |  |  |  |  +> javax.
|  |  |  |  |  |  |  +> org.apache.commons.logging.
|  |  |  |  |  |  |  +> org.eclipse.jetty.continuation.
|  |  |  |  |  |  |  +> org.eclipse.jetty.http.
|  |  |  |  |  |  |  +> org.eclipse.jetty.io.
|  |  |  |  |  |  |  +> org.eclipse.jetty.jndi.
|  |  |  |  |  |  |  +> org.eclipse.jetty.plus.jaas.
|  |  |  |  |  |  |  +> org.eclipse.jetty.security.
|  |  |  |  |  |  |  +> org.eclipse.jetty.server.
|  |  |  |  |  |  |  +> org.eclipse.jetty.servlet.
|  |  |  |  |  |  |  +> org.eclipse.jetty.servlets.
|  |  |  |  |  |  |  +> org.eclipse.jetty.util.
|  |  |  |  |  |  |  +> org.eclipse.jetty.websocket.
|  |  |  |  |  |  |  +> org.w3c.
|  |  |  |  |  |  |  +> org.xml.

       "java.",                            // Java SE classes (per servlet spec v2.5 / SRV.9.7.2)
        "javax.",                           // Java SE classes (per servlet spec v2.5 / SRV.9.7.2)
        "org.xml.",                         // needed by javax.xml
        "org.w3c.",                         // needed by javax.xml
        "org.eclipse.jetty.jmx.",           // webapp cannot change jmx classes
        "org.eclipse.jetty.util.annotation.",  // webapp cannot change jmx annotations
        "org.eclipse.jetty.continuation.",  // webapp cannot change continuation classes
        "org.eclipse.jetty.jndi.",          // webapp cannot change naming classes
        "org.eclipse.jetty.jaas.",          // webapp cannot change jaas classes
        "org.eclipse.jetty.websocket.",     // webapp cannot change / replace websocket classes
        "org.eclipse.jetty.util.log.",      // webapp should use server log
        "org.eclipse.jetty.servlet.DefaultServlet", // webapp cannot change default servlets
        "org.eclipse.jetty.jsp.JettyJspServlet", //webapp cannot change jetty jsp servlet
        "org.eclipse.jetty.servlets.PushCacheFilter", //must be loaded by container classpath
        "org.eclipse.jetty.servlets.PushSessionCacheFilter" //must be loaded by container classpath


Your Server Classes:

|  |  |  |  |  |  |  +> -org.eclipse.jetty.apache.
|  |  |  |  |  |  |  +> -org.eclipse.jetty.continuation.
|  |  |  |  |  |  |  +> -org.eclipse.jetty.http.
|  |  |  |  |  |  |  +> -org.eclipse.jetty.io.
|  |  |  |  |  |  |  +> -org.eclipse.jetty.jndi.
|  |  |  |  |  |  |  +> -org.eclipse.jetty.plus.jass. (note this is misspelt!!)
|  |  |  |  |  |  |  +> -org.eclipse.jetty.security.
|  |  |  |  |  |  |  +> -org.eclipse.jetty.server.
|  |  |  |  |  |  |  +> -org.eclipse.jetty.servlet.
|  |  |  |  |  |  |  +> -org.eclipse.jetty.servlets.
|  |  |  |  |  |  |  +> -org.eclipse.jetty.util.
|  |  |  |  |  |  |  +> -org.eclipse.jetty.websocket.
|  |  |  |  |  |  |  +> org.eclipse.jetty. 


        "-org.eclipse.jetty.server.session.SessionData", //don't hide SessionData for de/serialization purposes
        "-org.eclipse.jetty.jmx.",          // don't hide jmx classes
        "-org.eclipse.jetty.util.annotation.", // don't hide jmx annotation
        "-org.eclipse.jetty.continuation.", // don't hide continuation classes
        "-org.eclipse.jetty.jndi.",         // don't hide naming classes
        "-org.eclipse.jetty.jaas.",         // don't hide jaas classes
        "-org.eclipse.jetty.servlets.",     // don't hide jetty servlets
        "-org.eclipse.jetty.servlet.DefaultServlet", // don't hide default servlet
        "-org.eclipse.jetty.servlet.NoJspServlet", // don't hide noJspServlet servlet
        "-org.eclipse.jetty.jsp.",          //don't hide jsp servlet
        "-org.eclipse.jetty.servlet.listener.", // don't hide useful listeners
        "-org.eclipse.jetty.websocket.",    // don't hide websocket classes from webapps (allow webapp to use ones from system classloader)
        "-org.eclipse.jetty.apache.",       // don't hide jetty apache impls
        "-org.eclipse.jetty.util.log.",     // don't hide server log 
        "-org.eclipse.jetty.alpn.",         // don't hide ALPN
        "org.objectweb.asm.",               // hide asm used by jetty
        "org.eclipse.jdt.",                 // hide jdt used by jetty
        "org.eclipse.jetty."                // hide other jetty classes

There is also something else wrong with the setup for your contexts, as you can see by the logs that for the contexts /service and /, that jetty tries to load the JettyJspServlet, fails and replaces it with the NoJspServlet:

NO JSP Support for /service, did not find org.eclipse.jetty.jsp.JettyJspServlet
NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet

However, for the /zxxxxAdmin context, we don't see the failure to load the JettyJspServlet early in deployment, it only fails to load it when the ServletHandler is being started.  I assume this failure is due to your incorrect system and server classes setup, however this should also fail for the / and /service contexts. The fact that it doesn't means there is something else wrong with your setup.

As for the /zimlet context, this appears to be differently deployed than the rest - I see it is an auto-managed bean of the ContextHandlerCollection, whereas the rest of the contexts are added as managed beans of the ContextHandlerCollection. Please provide more details on how you are deploying the /zimlet context.

Jan

On Wed, 24 Apr 2019 at 11:11, Jan Bartel <janb@xxxxxxxxxxx> wrote:
Number 12) apache-jsp should say "transitive provider of apache-jsp for jsp", so there is something wrong with the way the apache-jsp module is being initialized.

There is also a further problem, in that your log output from the dump command throws a NullPointerException - not sure why that is happening or if it is related, but it certainly prevents the dump from showing us your system classpath. Will look into the NPE further. 

Meanwhile, I suggest you do a "java -jar ../start.jar --dry-run" and that output should show us the jars that are on jetty's container classpath. But first, do please check how you have enbled the apache-jsp module - you shouldn't specify it anywyhere, jetty should do it for you if you just enable the jsp module.

Jan

On Tue, 23 Apr 2019 at 12:54, Rupali Desai <rtdesai@xxxxxxxxx> wrote:
Hello,
I am upgrading the jetty in my web application from 9.3 to 9.4.15. I have added support for JSP in the app web.xml and the"jsp" module is included in startup option using "--module=jsp...". Iam using open JDK 11.02. However when I start the application I get 
"java.lang.ClassNotFoundException: org.eclipse.jetty.jsp.JettyJspServlet"

I can see the Apache JSP jars on the container classpath. However I still get the above error.
Any suggestions on how to fix it.

Jetty Server Classpath:
-----------------------
19:                      7.0 | ${jetty.home}/lib/annotations/asm-tree-7.0.jar
20:                      1.3 | ${jetty.home}/lib/annotations/javax.annotation-api-1.3.jar
21:    3.14.0.v20180528-0519 | ${jetty.home}/lib/apache-jsp/org.eclipse.jdt.ecj-3.14.0.jar
22:         9.4.15.v20190215 | ${jetty.home}/lib/apache-jsp/org.eclipse.jetty.apache-jsp-9.4.15.v20190215.jar
23:                   8.5.24 | ${jetty.home}/lib/apache-jsp/org.mortbay.jasper.apache-el-8.5.35.1.jar
24:                      2.3 | ${jetty.home}/lib/apache-jsp/org.mortbay.jasper.apache-jsp-8.5.35.1.jar
25:                    1.2.5 | ${jetty.home}/lib/apache-jstl/org.apache.taglibs.taglibs-standard-impl-1.2.5.jar
26:                    1.2.5 | ${jetty.home}/lib/apache-jstl/org.apache.taglibs.taglibs-standard-spec-1.2.5.jar

Enabled Modules:
================
    0) mail            transitive provider of mail for jndi
    1) ext             <command-line>
    2) resources       <command-line>
    3) threadpool      transitive provider of threadpool for server
                       init template available with --add-to-start=threadpool
    4) server          <command-line>
    5) jndi            transitive provider of jndi for plus
    6) security        transitive provider of security for webapp
                       transitive provider of security for plus
    7) transactions    transitive provider of transactions for plus
    8) servlet         <command-line>
    9) webapp          <command-line>
   10) plus            <command-line>
   11) annotations     transitive provider of annotations for websocket
                       transitive provider of annotations for jsp
   12) apache-jsp      <command-line>
   13) apache-jstl     transitive provider of apache-jstl for jstl
   14) client          transitive provider of client for websocket
   15) continuation    <command-line>
   16) jmx             <command-line>
   17) jsp             <command-line>
   18) jstl            <command-line>
   19) servlets        <command-line>
   20) websocket       <command-line>
   21) rewrite         <command-line>
   22) setuid          <command-line>

Thanks
Rupali
_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/jetty-users


--
Jan Bartel <janb@xxxxxxxxxxx>
www.webtide.com
Expert assistance from the creators of Jetty and CometD



--
Jan Bartel <janb@xxxxxxxxxxx>
www.webtide.com
Expert assistance from the creators of Jetty and CometD


Back to the top