Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.2_b21
    • Fix Version/s: 3.1.2_b23
    • Component/s: web_container
    • Labels:
      None
    • Environment:

      any

      Description

      jspc seems to reference non-existing jars in its classpath.

      MTVL09233UAGZ:bin paulg203$ ./jspc
      Exception in thread "main" java.lang.NoClassDefFoundError: javax/servlet/ServletException
      	at java.lang.ClassLoader.defineClass1(Native Method)
      	at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
      	at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
      	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
      	at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
      	at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
      	at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
      	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
      Caused by: java.lang.ClassNotFoundException: javax.servlet.ServletException
      	at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
      	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
      	... 12 more
      

      these jars from the jspc classpath don't exist in modules:

      MTVL09233UAGZ:bin paulg203$ ls -l ../modules/javax.servlet.jar
      ls: ../modules/javax.servlet.jar: No such file or directory
      
      MTVL09233UAGZ:bin paulg203$ ls -l ../modules/jsp-impl.jar
      ls: ../modules/jsp-impl.jar: No such file or directory
      
      MTVL09233UAGZ:bin paulg203$ ls -l ../modules/el-impl.jar
      ls: ../modules/el-impl.jar: No such file or directory
      
      MTVL09233UAGZ:bin paulg203$ ls -l ../modules/jstl-impl.jar
      ls: ../modules/jstl-impl.jar: No such file or directory
      

        Activity

        Hide
        pgibson_65 added a comment -

        attaching my guess at a fix

        Show
        pgibson_65 added a comment - attaching my guess at a fix
        Hide
        scatari added a comment -

        Shouldn't jspc be just having javaee.jar in the CLASSPATH?

        Show
        scatari added a comment - Shouldn't jspc be just having javaee.jar in the CLASSPATH?
        Hide
        pgibson_65 added a comment -

        jspc.bat has the same problem; the fix should work for both.

        Show
        pgibson_65 added a comment - jspc.bat has the same problem; the fix should work for both.
        Hide
        kchung added a comment -

        Change Control for fix:

        • What is the impact on the customer of the bug?

        Minimal. This bug only affects the customers that uses this script, most likely tomcat users. Most glassfish customers would probably use asadmin to do the JSP precompilation at deploy time.

        • What is the cost/risk of fixing the bug?

        Low. It only affects the script users. The script without the fix is broken, so any fix can only helps.

        • Is there an impact on documentation or message strings?

        No.

        • Which tests should QA (re)run to verify the fix did not destabilize GlassFish?

        Those that use the jspc script.

        • Which is the targeted build of 3.1.2 for this fix?

        b23?

        Show
        kchung added a comment - Change Control for fix: What is the impact on the customer of the bug? Minimal. This bug only affects the customers that uses this script, most likely tomcat users. Most glassfish customers would probably use asadmin to do the JSP precompilation at deploy time. What is the cost/risk of fixing the bug? Low. It only affects the script users. The script without the fix is broken, so any fix can only helps. Is there an impact on documentation or message strings? No. Which tests should QA (re)run to verify the fix did not destabilize GlassFish? Those that use the jspc script. Which is the targeted build of 3.1.2 for this fix? b23?
        Hide
        pgibson_65 added a comment -

        this is a blocking issue for us. the reason is that precompiling at
        deploy time via asadmin results in memory problems (GF does not release
        a large amount of memory used to compile JSPs especially for webapps
        containing a large number of JSPs). that lead us to use jspc which
        works well except for this problem.

        this is easy to resolve, though. just fix the classpath to
        account for the new jar filenames.

        Show
        pgibson_65 added a comment - this is a blocking issue for us. the reason is that precompiling at deploy time via asadmin results in memory problems (GF does not release a large amount of memory used to compile JSPs especially for webapps containing a large number of JSPs). that lead us to use jspc which works well except for this problem. this is easy to resolve, though. just fix the classpath to account for the new jar filenames.
        Hide
        kchung added a comment -

        Fixed in 3.1.2. Will port the fix to the trunk, once I fix javaee.jar there.

        Project: glassfish
        Repository: svn
        Revision: 52572
        Author: kchung
        Date: 2012-02-14 00:52:13 UTC
        Link:

        Log Message:
        ------------
        Issue http://java.net/jira/browse/GLASSFISH-18355
        Fix script jspc to use the correct names for api and impl jars

        Revisions:
        ----------
        52572

        Modified Paths:
        ---------------
        branches/3.1.2/packager/nucleus-base/bin/jspc
        branches/3.1.2/packager/nucleus-base/bin/jspc.bat

        Diffs:
        ------
        Index: branches/3.1.2/packager/nucleus-base/bin/jspc
        ===================================================================
        — branches/3.1.2/packager/nucleus-base/bin/jspc (revision 52571)
        +++ branches/3.1.2/packager/nucleus-base/bin/jspc (revision 52572)
        @@ -2,7 +2,7 @@
        #

        1. DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
          #
          1. Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved.
            +# Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.
            #
        2. The contents of this file are subject to the terms of either the GNU
        3. General Public License Version 2 only ("GPL") or the Common Development
          @@ -41,15 +41,11 @@

        AS_INSTALL=`dirname $0`/..
        AS_INSTALL_LIB=$AS_INSTALL/modules
        -ANT_LIB=$AS_INSTALL_LIB/ant.jar
        -SERVLET_API=$AS_INSTALL_LIB/javax.servlet.jar
        -JSP_API=$AS_INSTALL_LIB/javax.servlet.jsp.jar
        -JSP_IMPL=$AS_INSTALL_LIB/jsp-impl.jar
        -EL_IMPL=$AS_INSTALL_LIB/el-impl.jar
        -JSTL_API=$AS_INSTALL_LIB/javax.servlet.jsp.jstl.jar
        -JSTL_IMPL=$AS_INSTALL_LIB/jstl-impl.jar
        -JSF_IMPL=$AS_INSTALL_LIB/javax.faces.jar
        +JSP_IMPL=$AS_INSTALL_LIB/javax.servlet.jsp.jar
        +EL_IMPL=$AS_INSTALL_LIB/javax.el.jar
        +JSTL_IMPL=$AS_INSTALL_LIB/javax.servlet.jsp.jstl.jar
        AS_LIB=$AS_INSTALL/lib
        +JAVAEE_API=$AS_LIB/javaee.jar

        -java -cp "$SERVLET_API:$JSP_API:$ANT_LIB:$JSTL_API:$JSF_IMPL:$EL_IMPL:$JSP_IMPL:$AS_LIB" org.apache.jasper.JspC -sysClasspath "$SERVLET_API:$JSP_API:$JSP_IMPL:$JSTL_API:$JSTL_IMPL:$JSF_IMPL:$ANT_LIB:$AS_LIB" -schemas "/schemas/" -dtds "/dtds/" "$@"
        +java -cp "$JSP_IMPL:$JAVAEE_API:$AS_LIB" org.apache.jasper.JspC -sysClasspath "$JSP_IMPL:$EL_IMPL:$JSTL_IMPL:$JAVAEE_API:$AS_LIB" -schemas "/schemas/" -dtds "/dtds/" "$@"

        Index: branches/3.1.2/packager/nucleus-base/bin/jspc.bat
        ===================================================================
        — branches/3.1.2/packager/nucleus-base/bin/jspc.bat (revision 52571)
        +++ branches/3.1.2/packager/nucleus-base/bin/jspc.bat (revision 52572)
        @@ -2,7 +2,7 @@
        REM
        REM DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
        REM
        -REM Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved.
        +REM Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.
        REM
        REM The contents of this file are subject to the terms of either the GNU
        REM General Public License Version 2 only ("GPL") or the Common Development
        @@ -41,14 +41,10 @@

        set AS_INSTALL_LIB=%~dp0..\modules
        -set ANT_LIB=%AS_INSTALL_LIB%\ant.jar
        -set SERVLET_API=%AS_INSTALL_LIB%\javax.servlet.jar
        -set JSP_API=%AS_INSTALL_LIB%\javax.servlet.jsp.jar
        -set JSP_IMPL=%AS_INSTALL_LIB%\jsp-impl.jar
        -set EL_IMPL=%AS_INSTALL_LIB%\el-impl.jar
        -set JSTL_API=%AS_INSTALL_LIB%\javax.servlet.jsp.jstl.jar
        -set JSTL_IMPL=%AS_INSTALL_LIB%\jstl-impl.jar
        -set JSF_IMPL=%AS_INSTALL_LIB%\javax.faces.jar
        +set JSP_IMPL=%AS_INSTALL_LIB%\javax.servlet.jsp.jar
        +set EL_IMPL=%AS_INSTALL_LIB%\javax.el.jar
        +set JSTL_IMPL=%AS_INSTALL_LIB%\javax.servlet.jsp.jstl.jar
        set AS_LIB=%~dp0..\lib
        +set JAVAEE_API=%AS_LIB%\javaee.jar

        -java -cp "%SERVLET_API%;%JSP_API%;%JSTL_API%;%JSF_IMPL%;%ANT_LIB%;%EL_IMPL%;%JSP_IMPL%;%AS_LIB%" org.apache.jasper.JspC -sysClasspath "%SERVLET_API%;%JSP_API%;%JSP_IMPL%;%JSTL_API%;%JSTL_IMPL%;%JSF_IMPL%;%ANT_LIB%;%AS_LIB%" -schemas "/schemas/" -dtds "/dtds/" %*
        +java -cp "%JSP_IMPL%;%JAVAEE_API%;%AS_LIB%" org.apache.jasper.JspC -sysClasspath "%JSP_IMPL%;%EL_IMPL%;%JSTL_IMPL%;%JAVAEE_API%;%AS_LIB%" -schemas "/schemas/" -dtds "/dtds/" %*

        Show
        kchung added a comment - Fixed in 3.1.2. Will port the fix to the trunk, once I fix javaee.jar there. Project: glassfish Repository: svn Revision: 52572 Author: kchung Date: 2012-02-14 00:52:13 UTC Link: Log Message: ------------ Issue http://java.net/jira/browse/GLASSFISH-18355 Fix script jspc to use the correct names for api and impl jars Revisions: ---------- 52572 Modified Paths: --------------- branches/3.1.2/packager/nucleus-base/bin/jspc branches/3.1.2/packager/nucleus-base/bin/jspc.bat Diffs: ------ Index: branches/3.1.2/packager/nucleus-base/bin/jspc =================================================================== — branches/3.1.2/packager/nucleus-base/bin/jspc (revision 52571) +++ branches/3.1.2/packager/nucleus-base/bin/jspc (revision 52572) @@ -2,7 +2,7 @@ # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. # Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved. # The contents of this file are subject to the terms of either the GNU General Public License Version 2 only ("GPL") or the Common Development @@ -41,15 +41,11 @@ AS_INSTALL=`dirname $0`/.. AS_INSTALL_LIB=$AS_INSTALL/modules -ANT_LIB=$AS_INSTALL_LIB/ant.jar -SERVLET_API=$AS_INSTALL_LIB/javax.servlet.jar -JSP_API=$AS_INSTALL_LIB/javax.servlet.jsp.jar -JSP_IMPL=$AS_INSTALL_LIB/jsp-impl.jar -EL_IMPL=$AS_INSTALL_LIB/el-impl.jar -JSTL_API=$AS_INSTALL_LIB/javax.servlet.jsp.jstl.jar -JSTL_IMPL=$AS_INSTALL_LIB/jstl-impl.jar -JSF_IMPL=$AS_INSTALL_LIB/javax.faces.jar +JSP_IMPL=$AS_INSTALL_LIB/javax.servlet.jsp.jar +EL_IMPL=$AS_INSTALL_LIB/javax.el.jar +JSTL_IMPL=$AS_INSTALL_LIB/javax.servlet.jsp.jstl.jar AS_LIB=$AS_INSTALL/lib +JAVAEE_API=$AS_LIB/javaee.jar -java -cp "$SERVLET_API:$JSP_API:$ANT_LIB:$JSTL_API:$JSF_IMPL:$EL_IMPL:$JSP_IMPL:$AS_LIB" org.apache.jasper.JspC -sysClasspath "$SERVLET_API:$JSP_API:$JSP_IMPL:$JSTL_API:$JSTL_IMPL:$JSF_IMPL:$ANT_LIB:$AS_LIB" -schemas "/schemas/" -dtds "/dtds/" "$@" +java -cp "$JSP_IMPL:$JAVAEE_API:$AS_LIB" org.apache.jasper.JspC -sysClasspath "$JSP_IMPL:$EL_IMPL:$JSTL_IMPL:$JAVAEE_API:$AS_LIB" -schemas "/schemas/" -dtds "/dtds/" "$@" Index: branches/3.1.2/packager/nucleus-base/bin/jspc.bat =================================================================== — branches/3.1.2/packager/nucleus-base/bin/jspc.bat (revision 52571) +++ branches/3.1.2/packager/nucleus-base/bin/jspc.bat (revision 52572) @@ -2,7 +2,7 @@ REM REM DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. REM -REM Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. +REM Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved. REM REM The contents of this file are subject to the terms of either the GNU REM General Public License Version 2 only ("GPL") or the Common Development @@ -41,14 +41,10 @@ set AS_INSTALL_LIB=%~dp0..\modules -set ANT_LIB=%AS_INSTALL_LIB%\ant.jar -set SERVLET_API=%AS_INSTALL_LIB%\javax.servlet.jar -set JSP_API=%AS_INSTALL_LIB%\javax.servlet.jsp.jar -set JSP_IMPL=%AS_INSTALL_LIB%\jsp-impl.jar -set EL_IMPL=%AS_INSTALL_LIB%\el-impl.jar -set JSTL_API=%AS_INSTALL_LIB%\javax.servlet.jsp.jstl.jar -set JSTL_IMPL=%AS_INSTALL_LIB%\jstl-impl.jar -set JSF_IMPL=%AS_INSTALL_LIB%\javax.faces.jar +set JSP_IMPL=%AS_INSTALL_LIB%\javax.servlet.jsp.jar +set EL_IMPL=%AS_INSTALL_LIB%\javax.el.jar +set JSTL_IMPL=%AS_INSTALL_LIB%\javax.servlet.jsp.jstl.jar set AS_LIB=%~dp0..\lib +set JAVAEE_API=%AS_LIB%\javaee.jar -java -cp "%SERVLET_API%;%JSP_API%;%JSTL_API%;%JSF_IMPL%;%ANT_LIB%;%EL_IMPL%;%JSP_IMPL%;%AS_LIB%" org.apache.jasper.JspC -sysClasspath "%SERVLET_API%;%JSP_API%;%JSP_IMPL%;%JSTL_API%;%JSTL_IMPL%;%JSF_IMPL%;%ANT_LIB%;%AS_LIB%" -schemas "/schemas/" -dtds "/dtds/" %* +java -cp "%JSP_IMPL%;%JAVAEE_API%;%AS_LIB%" org.apache.jasper.JspC -sysClasspath "%JSP_IMPL%;%EL_IMPL%;%JSTL_IMPL%;%JAVAEE_API%;%AS_LIB%" -schemas "/schemas/" -dtds "/dtds/" %*
        Hide
        scatari added a comment -

        This is fixed in B23 and not B21. Updating the "Fix in version".

        Show
        scatari added a comment - This is fixed in B23 and not B21. Updating the "Fix in version".

          People

          • Assignee:
            kchung
            Reporter:
            pgibson_65
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: