jakartaee / platform-tck

Jakartaee-tck
Other
126 stars 105 forks source link

Remove *.?ar archives that are checked into source control #313

Closed scottmarlow closed 4 years ago

scottmarlow commented 4 years ago

Remove the following archives that are not using the correct EE 9 packages:

Removed Jakarta Servlet tests(https://github.com/eclipse-ee4j/servlet-api):
./src/com/sun/ts/tests/samples/negdep/BadDispatcher.war

Keeping Jakarta Server Pages tests(https://github.com/eclipse-ee4j/jsp-api):
./src/com/sun/ts/tests/jsp/spec/configuration/elevaluation/jsp_config_eleval23.ear
./src/com/sun/ts/tests/jsp/spec/configuration/elevaluation/jsp_config_eleval23_web.war

??? Jakarta Standard Tag Library tests(https://github.com/eclipse-ee4j/jstl-api):
./src/com/sun/ts/tests/jstl/compat/onedotzero/jstl_1_0_compat_web.war
./src/web/jstl/compat/onedotzero/WEB-INF/lib/jstltcktlv_1_0.jar
./src/web/jstl/compat/onedotzero/WEB-INF/lib/jstltck_1_0.jar

Removed Jakarta Enterprise Beans tests(https://github.com/eclipse-ee4j/ejb-api):
./src/com/sun/ts/tests/compat13/ejb/oneXmany/compat13_ejb_1xM.ear
./src/com/sun/ts/tests/compat13/ejb/tx/compat13_ejb_tx.ear
./src/com/sun/ts/tests/compat12/ejb/jspejbjdbc/compat12_ejb_jspejbjdbc.ear
./src/com/sun/ts/tests/compat12/ejb/sec/compat12_ejb_sec.ear
./src/com/sun/ts/tests/compat12/ejb/Tx_Single/compat12_ejb_Tx_Single.ear
./src/com/sun/ts/tests/compat12/ejb/Tx_Single/compat12_ejb_TXECMPbean.ear
./src/com/sun/ts/tests/compat12/ejb/entitycmptest/compat12_ejb_entitycmp.ear
scottmarlow commented 4 years ago

Question, what is the proper way to update these archives and why aren't we currently building them from source?

alwin-joseph commented 4 years ago

Scott- I missed about these jars after it came up in https://github.com/eclipse-ee4j/jakartaee-tck/pull/242 . This commit has all the archives in the repo : https://github.com/eclipse-ee4j/jakartaee-tck/commit/308f725b8054afcdff67f68ec33395c784abea77

From my knowledge they can be generated using the build.xml in the corresponding directories. Below

For eg: src/com/sun/ts/tests/jstl/compat/onedotzero/ -> ant package.compat (as it was done in the above PR) src/com/sun/ts/tests/compat13/ejb/tx -> ant package (I face some issue for this now; I will have to comeback on this)

I will try some of those. I can't find why they were not built from source.

bhatpmk commented 4 years ago

Based on my understanding, these are the archives built with a previous version of Java EE / J2EE reference implementation and the intent is to ensure that the deployment goes through fine in the current implementation. Probably compat12 is built from J2EE 1.2, compat13 is from J2EE 1.3

As we don't have these versions of the reference implementation during the TCK build, the archives are made available in the repository.

scottmarlow commented 4 years ago

@alwin-joseph are you going to look at this issue? Or should someone else?

scottmarlow commented 4 years ago

Thanks @bhatpmk for the answer about what the intent was, very much appreciated! :+1:

alwin-joseph commented 4 years ago

@scottmarlow

Quoting your comments in ml, "In theory, we could run these archives through a bytecode transformer (statically or during the test run), but IMO that isn't really required to be done. For discussion, should we: a. Transform or rebuild the legacy application archives to reference jakarta.ejb.SessionBean(jakarta.*)? b. Remove the testing of these legacy application archives? c. Something else? Imo, I think that we have to look deeper to see what we would be losing if we did (b). Is there a viable (c) option?"

I am not sure which approach should be followed or any other options. Would appreciate if someone else can take a look.

gurunrao commented 4 years ago

@scottmarlow @alwin-joseph - IMO we should prun compat12, compat13 tests.since jakarta 9 is not backward compatible with jakarta 8 with respect to package name(same apply to jstl compat tests). I haven't come across compat test for JAVA EE 6 or 8, either it has been discontinued or not updated. We can discuss these before wider audience and get approval before pruning of tests.

scottmarlow commented 4 years ago

I updated the title and first comment, to reflect the new plan, which is to remove these archives, instead of updating them. As EE 9 does not need to test archives generated from old EE versions.

scottmarlow commented 4 years ago

Jakarta Server Pages tests are currently passing with: ./src/com/sun/ts/tests/jsp/spec/configuration/elevaluation/jsp_config_eleval23.ear ./src/com/sun/ts/tests/jsp/spec/configuration/elevaluation/jsp_config_eleval23_web.war

Jakarta Standard Tag Library tests are currently passing with: ./src/com/sun/ts/tests/jstl/compat/onedotzero/jstl_1_0_compat_web.war ./src/web/jstl/compat/onedotzero/WEB-INF/lib/jstltcktlv_1_0.jar ./src/web/jstl/compat/onedotzero/WEB-INF/lib/jstltck_1_0.jar

scottmarlow commented 4 years ago

@gurunrao Did you mean to say that the JSTL tests are passing?

scottmarlow commented 4 years ago

@gurunrao good question, it looks like we do need to remove or update the JSTL archives as we are seeing JSTL failures in Web Profile run.

scottmarlow commented 4 years ago

src/web/jstl/compat/onedotzero/WEB-INF/lib/jstltcktlv_1_0.jar has:

META-INF/scrfree_noexpr.tld:        <validator-class>javax.servlet.jsp.jstl.tlv.ScriptFreeTLV</validator-class>
META-INF/scrfree_nodecl.tld:        <validator-class>javax.servlet.jsp.jstl.tlv.ScriptFreeTLV</validator-class>
META-INF/scrfree_noscr.tld:        <validator-class>javax.servlet.jsp.jstl.tlv.ScriptFreeTLV</validator-class>
META-INF/scrfree_nortexpr.tld:        <validator-class>javax.servlet.jsp.jstl.tlv.ScriptFreeTLV</validator-class>
META-INF/permitted.tld:        <validator-class>javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV</validator-class>

We could change ^ to reference jakarta.servlet.

arjantijms commented 4 years ago

@scottmarlow The job that the project itself runs for the standalone TCK has almost the same script, and it passed the TCK, see:

https://ci.eclipse.org/jstl/job/2_jstl_run_tck_against_staged_build/

Main difference is that the GlassFish stop command fails after the property updates, and that one property update fails since it's already the target value. I just added || true:

#!/usr/bin/env groovy

node {

    def API_JAR_NAME = "jakarta.servlet.jsp.jstl-api.jar"
    def DOWNLOAD_API_JAR_NAME = "jakarta.servlet.jsp.jstl-api-2.0.0.jar"

    def GF_URL = "https://github.com/eclipse-ee4j/glassfish/releases/download/6.0.0-M2-servlet5/glassfish.zip"
    def API_URL = "https://jakarta.oss.sonatype.org/content/repositories/staging/jakarta/servlet/jsp/jstl/jakarta.servlet.jsp.jstl-api/2.0.0/${DOWNLOAD_API_JAR_NAME}"
    def TCK_BUNDLE_URL = "https://download.eclipse.org/ee4j/jakartaee-tck/jakartaee9-eftl/staged-900/jakarta-tags-tck-2.0.0.zip"

    env.GF_TOPLEVEL_DIR="glassfish6"

    // TCK properties
    env.deliverabledir="tags"
    env.TCK_HOME="${env.WORKSPACE}"
    env.TS_HOME="${env.WORKSPACE}/${env.deliverabledir}-tck"
    env.javaee_home="${env.WORKSPACE}/${env.GF_TOPLEVEL_DIR}"

    env.ANT_VERSION='1.9.15'
    env.TOOLS_PREFIX='/opt/tools'
    env.JAVA_PREFIX="${TOOLS_PREFIX}/java/oracle"
    env.MVN_HOME="${TOOLS_PREFIX}/apache-maven/latest"
    env.JAVA_HOME="${JAVA_PREFIX}/jdk-8/latest"
    env.PATH="${MVN_HOME}/bin:${JAVA_HOME}/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
    env.ANT_HOME="${TS_HOME}/tools/ant"
    env.PATH="${ANT_HOME}/bin:${PATH}"
    env.ANT_OPTS="-Djavax.xml.accessExternalSchema=all"

    stage("Init") {
        // https://go.cloudbees.com/docs/cloudbees-documentation/cjoc-user-guide/index.html#cluster-copy-artifacts
        dir ("download") {
            // If any artefacts from other jobs need to be used, they can be placed here
            // copyArtifacts(projectName: "${GF_BUILD_JOB}")
            // copyArtifacts(projectName: "${TS_JTE_BUILD_JOB}")
        }
        sh '''#!/bin/bash -x

            pwd
            mkdir download

            mkdir -p $TCK_HOME/${TCK_NAME}report/${TCK_NAME}
            mkdir -p $TCK_HOME/${TCK_NAME}work/${TCK_NAME}

            ls -altrh

           '''
    }

    stage("Grab Glassfish") {
        env.GF_URL = "${GF_URL}"
        sh '''#!/bin/bash -ex

            cd ${WORKSPACE}/download
            wget -q ${GF_URL} -O glassfish.zip

            cd ${WORKSPACE}
            unzip -q ${WORKSPACE}/download/glassfish.zip
           '''
    }

    stage("Grab TCK") {
        env.TCK_BUNDLE_URL = "${TCK_BUNDLE_URL}"
        sh '''#!/bin/bash -ex
            cd ${WORKSPACE}/download 
            wget -q ${TCK_BUNDLE_URL} -O ${deliverabledir}tck.zip

            cd ${WORKSPACE}
            unzip ${WORKSPACE}/download/${deliverabledir}tck.zip

            touch ${deliverabledir}-tck/bin/run.log

            ls -altrh ${deliverabledir}-tck/bin/
           '''
    }

    stage ("Grab ANT") {
        sh '''#!/bin/bash -ex

            cd ${WORKSPACE}/download
            wget -q http://mirror.koddos.net/apache/ant/binaries/apache-ant-${ANT_VERSION}-bin.tar.gz -O ant.tar.gz
            tar xfz ant.tar.gz
            mkdir -p ${ANT_HOME} && cp -a ${WORKSPACE}/download/apache-ant-${ANT_VERSION}/. ${ANT_HOME}

           '''
    }

    stage ("Configure ts.jte") {

        sh '''#!/bin/bash -ex

            cd ${TS_HOME}/bin/

            sed -i "s#webServerHome=.*#webServerHome=$TCK_HOME/$GF_TOPLEVEL_DIR/glassfish#g" ts.jte
            sed -i 's#webServerPort=.*#webServerPort=8080#g' ts.jte
            sed -i 's#impl.vi=.*#impl.vi=glassfish#g' ts.jte
            sed -i "s#impl.vi.deploy.dir=.*#impl.vi.deploy.dir=$TCK_HOME/$GF_TOPLEVEL_DIR/glassfish/domains/domain1/autodeploy#g" ts.jte
            sed -i 's#impl.deploy.timeout.multiplier=.*#impl.deploy.timeout.multiplier=20#g' ts.jte
            sed -i 's#jdbc.classes=.*#jdbc.classes=\\$\\{webServerHome\\}/../javadb/lib/derbyclient.jar#g' ts.jte
            sed -i 's#webServerHost=.*#webServerHost=localhost#g' ts.jte
            sed -i 's#jstl.db.name=.*#jstl.db.name=derbyDB#g' ts.jte
            sed -i 's#jstl.db.server=.*#jstl.db.server=localhost#g' ts.jte
            sed -i 's#jstl.db.port=.*#jstl.db.port=1527#g' ts.jte
            sed -i 's#jstl.db.url=.*#jstl.db.url=jdbc:derby://\\$\\{jstl.db.server\\}:\\$\\{jstl.db.port\\}/\\$\\{jstl.db.name\\};create=true#g' ts.jte
            sed -i 's#jstl.db.driver=.*#jstl.db.driver=org.apache.derby.jdbc.ClientDriver#g' ts.jte
            sed -i 's#jstl.db.user=.*#jstl.db.user=cts1#g' ts.jte
            sed -i 's#jstl.db.password=.*#jstl.db.password=cts1#g' ts.jte
            sed -i 's#sigTestClasspath=.*#sigTestClasspath=\\$\\{ts.home\\}/classes:\\$\\{jstl.classes\\}:\\$\\{jspservlet.classes\\}:\\$\\{JAVA_HOME\\}/lib/rt.jar#g' ts.jte
            sed -i 's#jspservlet.classes=.*#jspservlet.classes=\\$\\{webServerHome\\}/modules/jakarta.servlet-api.jar:\\$\\{webServerHome\\}/modules/jakarta.servlet.jsp.jar:\\$\\{webServerHome\\}/modules/jakarta.servlet.jsp-api.jar:\\$\\{webServerHome\\}/modules/jakarta.el.jar:\\$\\{webServerHome\\}/modules/jakarta.el-api.jar#g' ts.jte
            sed -i 's#jstl.classes=.*#jstl.classes=\\$\\{webServerHome\\}/modules/jakarta.servlet.jsp.jstl.jar\\$\\{pathsep\\}\\$\\{webServerHome\\}/modules/jakarta.servlet.jsp.jstl-api.jar#g' ts.jte

            sed -i "s#^report.dir=.*#report.dir=$TCK_HOME/${TCK_NAME}report/${TCK_NAME}#g" ts.jte
            sed -i "s#^work.dir=.*#work.dir=$TCK_HOME/${TCK_NAME}work/${TCK_NAME}#g" ts.jte 

            cat ts.jte

           '''
    }

    stage("Configure TCK") {
        sh '''#!/bin/bash -ex
            export ANT_OPTS="${ANT_OPTS} -Djavax.xml.accessExternalStylesheet=all -Djavax.xml.accessExternalSchema=all -Djavax.xml.accessExternalDTD=file,http"

            cd $TCK_HOME/glassfish6/glassfish/bin
            ./asadmin start-database
            ./asadmin start-domain
            ./asadmin create-jvm-options -Djavax.xml.accessExternalStylesheet=all || true
            ./asadmin create-jvm-options -Djavax.xml.accessExternalSchema=all || true
            ./asadmin create-jvm-options -Djavax.xml.accessExternalDTD=file,http || true
            ./asadmin stop-domain || true
            ./asadmin start-domain

            cd $TS_HOME/bin
            ant init.javadb

           '''
    }

    stage ("Run TCK tests") {
         sh '''#!/bin/bash -x

         cd $javaee_home/bin
         ./asadmin stop-domain

         if [ $retval != 0 ]; then
            echo "Pending process to be killed:"
            ps -eaf | grep "com.sun.enterprise.admin.cli.AdminMain" | grep -v "grep" | grep -v "nohup" 
            for i in `ps -eaf | grep "com.sun.enterprise.admin.cli.AdminMain" | grep -v "grep" | grep -v "nohup" | tr -s " " | cut -d" " -f2`
            do
                echo "[killJava.sh] kill -9 $i"
                 kill $i
             done
         fi

         ./asadmin start-domain

         cd $TS_HOME/bin
         ant deploy.all | tee -a ${TS_HOME}/bin/run.log
         ant run.all | tee -a ${TS_HOME}/bin/run.log

           '''       
    } 

    stage ("Create summary.txt, API, and run.log artifacts") {
        env.API_JAR_NAME = "${API_JAR_NAME}"
        env.API_URL = "${API_URL}"
        env.GF_URL = "${GF_URL}"
        env.TCK_BUNDLE_URL = "${TCK_BUNDLE_URL}"

        sh '''#!/bin/bash -ex
            cd ${TS_HOME}/bin
            # cat run-ejb.log run-web.log > run.log
            cat run.log | sed -e '1,/Completed running/d' > summary.txt
            PASSED_COUNT=`head -1 summary.txt | tail -1 | sed 's/.*=\\s\\(.*\\)/\\1/'`
            FAILED_COUNT=`head -2 summary.txt | tail -1 | sed 's/.*=\\s\\(.*\\)/\\1/'`
            ERROR_COUNT=`head -3 summary.txt | tail -1 | sed 's/.*=\\s\\(.*\\)/\\1/'`

            echo ERROR_COUNT=${ERROR_COUNT}
            echo FAILED_COUNT=${FAILED_COUNT}
            echo PASSED_COUNT=${PASSED_COUNT}   

            SHA256_API=`sha256sum ${TCK_HOME}/${GF_TOPLEVEL_DIR}/glassfish/modules/${API_JAR_NAME} | awk '{print $1}'`
            SHA256_TCK=`sha256sum ${WORKSPACE}/download/${deliverabledir}tck.zip | awk '{print $1}'`

            echo SHA256_API=${SHA256_API} | tee -a summary.txt
            echo SHA256_TCK=${SHA256_TCK}  | tee -a summary.txt

            echo Product_download=${GF_URL} | tee -a summary.txt
            echo API_download=${API_URL} | tee -a summary.txt
            echo TCK_download=${TCK_BUNDLE_URL} | tee -a summary.txt

            OS1=`lsb_release -a || true`
            OS2=`cat /etc/issue.net || true`
            OS3=`cat /etc/*_version || true`
            OS4=`cat /etc/*-release || true`

            if [ ! -z "${OS1}" ]; then
                echo OS1=${OS1} | tee -a summary.txt
            fi
            if [ ! -z "${OS2}" ]; then
                echo OS2=${OS2} | tee -a summary.txt
            fi
            if [ ! -z "${OS3}" ]; then
                echo OS3=${OS3} | tee -a summary.txt
            fi
            if [ ! -z "${OS4}" ]; then
                echo OS4=${OS4} | tee -a summary.txt
            fi

            JDK_VERSION=$(java -version 2>&1 || true)

            echo JDK_VERSION=${JDK_VERSION} | tee -a summary.txt

           '''

        archiveArtifacts artifacts: "${env.deliverabledir}-tck/bin/summary.txt", fingerprint: true
        archiveArtifacts artifacts: "${env.deliverabledir}-tck/bin/run.log", fingerprint: true
        archiveArtifacts artifacts: "${env.GF_TOPLEVEL_DIR}/glassfish/modules/${API_JAR_NAME}", fingerprint: true
        archiveArtifacts artifacts: "${env.deliverabledir}-tck/bin/ts.jte", fingerprint: true

    }
}
scottmarlow commented 4 years ago

src/web/jstl/compat/onedotzero/WEB-INF/lib/jstltck_1_0.jar has classes that reference javax.servlet as well.

grep -rli javax
com/sun/ts/tests/jstl/common/listeners/SQLContextListener.class
com/sun/ts/tests/jstl/common/wrappers/TckConnectionWrapper.class
com/sun/ts/tests/jstl/common/wrappers/TckDataSourceWrapper.class
com/sun/ts/tests/jstl/common/wrappers/FormatRequestWrapper.class
com/sun/ts/tests/jstl/common/wrappers/FormatResponseWrapper.class
com/sun/ts/tests/jstl/common/filters/FormatFilter.class
com/sun/ts/tests/jstl/common/tags/ConfigTag.class
com/sun/ts/tests/jstl/common/tags/CheckRuntime.class
com/sun/ts/tests/jstl/common/tags/ThrowTag.class
com/sun/ts/tests/jstl/common/tags/ScopeCheckTag.class
com/sun/ts/tests/jstl/common/tags/GetLocalUrlTag.class
com/sun/ts/tests/jstl/common/tags/TestTag.class
com/sun/ts/tests/jstl/common/tags/TypeCheckTag.class
com/sun/ts/tests/jstl/common/tags/ExceptionCheckTag.class
com/sun/ts/tests/jstl/common/tags/DisplayTypeTag.class
lib/jstltck_1_0 $ asmifier com/sun/ts/tests/jstl/common/listeners/SQLContextListener.class | grep javax
cw.visit(V1_2, ACC_PUBLIC + ACC_FINAL + ACC_SUPER, "com/sun/ts/tests/jstl/common/listeners/SQLContextListener", null, "java/lang/Object", new String[] { "javax/servlet/ServletContextListener" });
fv = cw.visitField(ACC_PRIVATE, "_context", "Ljavax/servlet/ServletContext;", null, null);
mv.visitFieldInsn(PUTFIELD, "com/sun/ts/tests/jstl/common/listeners/SQLContextListener", "_context", "Ljavax/servlet/ServletContext;");
mv = cw.visitMethod(ACC_PUBLIC, "contextInitialized", "(Ljavax/servlet/ServletContextEvent;)V", null, null);
mv.visitMethodInsn(INVOKEVIRTUAL, "javax/servlet/ServletContextEvent", "getServletContext", "()Ljavax/servlet/ServletContext;", false);
mv.visitFieldInsn(PUTFIELD, "com/sun/ts/tests/jstl/common/listeners/SQLContextListener", "_context", "Ljavax/servlet/ServletContext;");
mv.visitFieldInsn(GETFIELD, "com/sun/ts/tests/jstl/common/listeners/SQLContextListener", "_context", "Ljavax/servlet/ServletContext;");
mv.visitMethodInsn(INVOKEINTERFACE, "javax/servlet/ServletContext", "getInitParameter", "(Ljava/lang/String;)Ljava/lang/String;", true);
mv.visitFieldInsn(GETFIELD, "com/sun/ts/tests/jstl/common/listeners/SQLContextListener", "_context", "Ljavax/servlet/ServletContext;");
mv.visitMethodInsn(INVOKEINTERFACE, "javax/servlet/ServletContext", "getInitParameter", "(Ljava/lang/String;)Ljava/lang/String;", true);
mv.visitFieldInsn(GETFIELD, "com/sun/ts/tests/jstl/common/listeners/SQLContextListener", "_context", "Ljavax/servlet/ServletContext;");
mv.visitMethodInsn(INVOKEINTERFACE, "javax/servlet/ServletContext", "getInitParameter", "(Ljava/lang/String;)Ljava/lang/String;", true);
mv.visitFieldInsn(GETFIELD, "com/sun/ts/tests/jstl/common/listeners/SQLContextListener", "_context", "Ljavax/servlet/ServletContext;");
mv.visitMethodInsn(INVOKEINTERFACE, "javax/servlet/ServletContext", "getInitParameter", "(Ljava/lang/String;)Ljava/lang/String;", true);
mv.visitFieldInsn(GETFIELD, "com/sun/ts/tests/jstl/common/listeners/SQLContextListener", "_context", "Ljavax/servlet/ServletContext;");
mv.visitMethodInsn(INVOKEINTERFACE, "javax/servlet/ServletContext", "getInitParameter", "(Ljava/lang/String;)Ljava/lang/String;", true);
mv.visitFieldInsn(GETFIELD, "com/sun/ts/tests/jstl/common/listeners/SQLContextListener", "_context", "Ljavax/servlet/ServletContext;");
mv.visitMethodInsn(INVOKEINTERFACE, "javax/servlet/ServletContext", "setAttribute", "(Ljava/lang/String;Ljava/lang/Object;)V", true);
mv.visitFieldInsn(GETFIELD, "com/sun/ts/tests/jstl/common/listeners/SQLContextListener", "_context", "Ljavax/servlet/ServletContext;");
mv.visitMethodInsn(INVOKEINTERFACE, "javax/servlet/ServletContext", "setAttribute", "(Ljava/lang/String;Ljava/lang/Object;)V", true);
mv.visitFieldInsn(GETFIELD, "com/sun/ts/tests/jstl/common/listeners/SQLContextListener", "_context", "Ljavax/servlet/ServletContext;");
mv.visitMethodInsn(INVOKESPECIAL, "com/sun/ts/tests/jstl/common/wrappers/TckDataSourceWrapper", "<init>", "(Ljavax/servlet/ServletContext;)V", false);
mv.visitFieldInsn(GETFIELD, "com/sun/ts/tests/jstl/common/listeners/SQLContextListener", "_context", "Ljavax/servlet/ServletContext;");
mv.visitMethodInsn(INVOKEINTERFACE, "javax/servlet/ServletContext", "setAttribute", "(Ljava/lang/String;Ljava/lang/Object;)V", true);
mv.visitFieldInsn(GETFIELD, "com/sun/ts/tests/jstl/common/listeners/SQLContextListener", "_context", "Ljavax/servlet/ServletContext;");
mv.visitMethodInsn(INVOKEINTERFACE, "javax/servlet/ServletContext", "setAttribute", "(Ljava/lang/String;Ljava/lang/Object;)V", true);
mv.visitFieldInsn(GETFIELD, "com/sun/ts/tests/jstl/common/listeners/SQLContextListener", "_context", "Ljavax/servlet/ServletContext;");
mv.visitMethodInsn(INVOKEINTERFACE, "javax/servlet/ServletContext", "getResourceAsStream", "(Ljava/lang/String;)Ljava/io/InputStream;", true);
mv = cw.visitMethod(ACC_PUBLIC, "contextDestroyed", "(Ljavax/servlet/ServletContextEvent;)V", null, null);
mv.visitFieldInsn(GETFIELD, "com/sun/ts/tests/jstl/common/listeners/SQLContextListener", "_context", "Ljavax/servlet/ServletContext;");
mv.visitMethodInsn(INVOKEINTERFACE, "javax/servlet/ServletContext", "removeAttribute", "(Ljava/lang/String;)V", true);
mv.visitFieldInsn(GETFIELD, "com/sun/ts/tests/jstl/common/listeners/SQLContextListener", "_context", "Ljavax/servlet/ServletContext;");
mv.visitMethodInsn(INVOKEINTERFACE, "javax/servlet/ServletContext", "removeAttribute", "(Ljava/lang/String;)V", true);
mv.visitFieldInsn(GETFIELD, "com/sun/ts/tests/jstl/common/listeners/SQLContextListener", "_context", "Ljavax/servlet/ServletContext;");
mv.visitMethodInsn(INVOKEINTERFACE, "javax/servlet/ServletContext", "removeAttribute", "(Ljava/lang/String;)V", true);
mv.visitFieldInsn(GETFIELD, "com/sun/ts/tests/jstl/common/listeners/SQLContextListener", "_context", "Ljavax/servlet/ServletContext;");
mv.visitMethodInsn(INVOKEINTERFACE, "javax/servlet/ServletContext", "removeAttribute", "(Ljava/lang/String;)V", true);
mv.visitFieldInsn(GETFIELD, "com/sun/ts/tests/jstl/common/listeners/SQLContextListener", "_context", "Ljavax/servlet/ServletContext;");
mv.visitMethodInsn(INVOKEINTERFACE, "javax/servlet/ServletContext", "log", "(Ljava/lang/String;)V", true);

@gurunrao it looks like we should rebuild the jars from source and check them in or change the ant scripts to generate the jars under dist during the Platform build. Any recommendation on which is better?

scottmarlow commented 4 years ago

@arjantijms +1 for handling the stop-domain failure of GlassFish better, are you suggesting that we do the same (as per related to our jakartaee-tck mailing list discussion about improving our test runs)? Or is your comment related to removing (updating) *.?ar archives from jstl tests?

+1 on adding kill of GlassFish logic if the GlassFish shutdown fails!

gurunrao commented 4 years ago

@scottmarlow - should we prune JSTL compat onedotzero tests, as we removed the compat12, compat13 tests?

scottmarlow commented 4 years ago

@gurunrao let's ask JSTL lead Zhijun Ren (as per https://projects.eclipse.org/projects/ee4j.jstl/who).

@ren-zhijun-oracle do you have a preference for whether we remove the JSTL (compatibility) onedotzero tests or update them to use jakarta.servlet?

Either way should help address the (EE 9) Platform TCK (Web Profile) JSTL failures like https://ci.eclipse.org/jakartaee-tck/job/eftl-jakartaeetck-run-web-900/8/junit-reports-with-handlebars/test-summary/7cd1e874-1019-44f2-89e4-ad8e6d995139.html

arjantijms commented 4 years ago

@ren-zhijun-oracle do you have a preference for whether we remove the JSTL (compatibility) onedotzero tests or update them to use jakarta.servlet?

I think Zhijun left Oracle a while ago. Not sure how aware he is that he's still the JSTL lead. I haven't seen him around for quite some time.

scottmarlow commented 4 years ago

One question that I have is how are we supposed to rebuild the https://github.com/eclipse-ee4j/jakartaee-tck/tree/master/src/web/jstl/compat/onedotzero/WEB-INF/lib/jstltcktlv_1_0.jar + https://github.com/eclipse-ee4j/jakartaee-tck/tree/master/src/web/jstl/compat/onedotzero/WEB-INF/lib/jstltck_1_0.jar files as there is no build.xml ant script.

I tried doing an "ant compile build" under the https://github.com/eclipse-ee4j/jakartaee-tck/tree/master/src/com/sun/ts/tests/jstl folder (in an already built Jakarta EE 9 Platform TCK) but the jars still reference javax.servlet.

gurunrao commented 4 years ago

@scottmarlow - JSTL tests are passing for Platform TCK Web profile - https://ci.eclipse.org/jakartaee-tck/job/jakartaee-tck-grao/job/master/9/testReport/

To create JSTL TCK jar - do we need to get source code for JSTL TCK 1.0? or should we use with latest JSTL TCK source code.

scottmarlow commented 4 years ago

@gurunrao that is weird that the (Web Profile) JSTL tests were failing before but are now passing.

To create JSTL TCK jar - do we need to get source code for JSTL TCK 1.0? or should we use with latest JSTL TCK source code.

Or we could run the Eclipse Transformer on the jar, to update for EE 9, that could be interesting to try.

scottmarlow commented 4 years ago

https://ci.eclipse.org/jakartaee-tck/job/jakartaee-tck/job/master/884/console shows Web Profile JSTL test errors still occurring, looks like the "cts1" database user/schema is not created.

HTTP Status 500 - Internal Server Error</h1><hr/><p><b>type</b> Exception report</p><p><b>message</b>Internal Server Error</p><p><b>description</b>The server encountered an internal error that prevented it from fulfilling this request.</p><p><b>exception</b> <pre>jakarta.servlet.ServletException: DELETE FROM jstl_tab3: Schema &#39;CTS1&#39; does not exist</pre></p><p><b>root cause</b> <pre>java.sql.SQLSyntaxErrorException: Schema &#39;CTS1&#39; does not exist</pre></p><p><b>root cause</b> <pre>ERROR 42Y07: Schema &#39;CTS1&#39; does not exist</pre></p><p><b>note</b> <u>The full stack traces of the exception and its root causes are available in the Eclipse GlassFish  6.0.0  logs.</u></p><hr/><h3>Eclipse GlassFish  6.0.0 </h3></body></html>
scottmarlow commented 4 years ago

The JSTL tests are passing now for Full Platform + Web Profile (verified locally and on Jenkins CI).

I'm closing issue as it is now complete.

Thanks all for the assistance on this important issue!