diff --git a/Jenkinsfile b/Jenkinsfile index ce9625ff46f..151d54c197b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -48,7 +48,7 @@ pipeline { stage('Run Quicklook Tests') { steps { echo '*#*#*#*#*#*#*#*#*#*#*#*# Running test *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#' - sh """mvn -B -V -ff -e clean test \ + sh """mvn -B -V -ff -e clean test -Pall \ -Dglassfish.home=\"${pwd()}/appserver/distributions/payara/target/stage/payara5/glassfish\" \ -Djavax.net.ssl.trustStore=${env.JAVA_HOME}/jre/lib/security/cacerts \ -Djavax.xml.accessExternalSchema=all \ diff --git a/Jenkinsfile-Nightly b/Jenkinsfile-Nightly index 69f61e9d061..de714f53120 100644 --- a/Jenkinsfile-Nightly +++ b/Jenkinsfile-Nightly @@ -53,7 +53,7 @@ pipeline { stage('Run Quicklook Tests') { steps { echo '*#*#*#*#*#*#*#*#*#*#*#*# Running test *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#' - sh """mvn -B -V -ff -e clean test \ + sh """mvn -B -V -ff -e clean test -Pall \ -Dglassfish.home=\"${pwd()}/appserver/distributions/payara/target/stage/payara5/glassfish\" \ -Djavax.net.ssl.trustStore=${env.JAVA_HOME}/jre/lib/security/cacerts \ -Djavax.xml.accessExternalSchema=all -Dsurefire.rerunFailingTestsCount=2 \ diff --git a/appserver/admin/gf_template/src/main/resources/config/domain.xml b/appserver/admin/gf_template/src/main/resources/config/domain.xml index 8f08f5c22a1..a5b01f2bf2e 100644 --- a/appserver/admin/gf_template/src/main/resources/config/domain.xml +++ b/appserver/admin/gf_template/src/main/resources/config/domain.xml @@ -198,14 +198,16 @@ - + -client - -Xbootclasspath/a:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap.jar - --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED - --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED - --illegal-access=permit - -XX:+IgnoreUnrecognizedVMOptions - -XX:+UnlockExperimentalVMOptions + [9|]--add-opens=java.base/jdk.internal.loader=ALL-UNNAMED + [9|]--add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED + + [9|]--add-exports=java.base/jdk.internal.ref=ALL-UNNAMED + [9|]--add-opens=java.base/java.lang=ALL-UNNAMED + [9|]--add-opens=java.base/java.nio=ALL-UNNAMED + [9|]--add-opens=java.base/sun.nio.ch=ALL-UNNAMED + [9|]--add-opens=java.management/sun.management=ALL-UNNAMED -Djava.awt.headless=true -Djdk.corba.allowOutputStreamSubclass=true -Djavax.xml.accessExternalSchema=all @@ -261,6 +263,7 @@ [1.8.0u121|1.8.0u160]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.7.jar [1.8.0u161|1.8.0u190]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.8.jar [1.8.0u191|1.8.0u500]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.8.1.jar + [9|]-Xbootclasspath/a:${com.sun.aas.installRoot}/lib/grizzly-npn-api.jar @@ -409,14 +412,16 @@ - + -server - -Xbootclasspath/a:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap.jar - --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED - -add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED - --illegal-access=permit - -XX:+IgnoreUnrecognizedVMOptions - -XX:+UnlockExperimentalVMOptions + [9|]--add-opens=java.base/jdk.internal.loader=ALL-UNNAMED + [9|]--add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED + + [9|]--add-exports=java.base/jdk.internal.ref=ALL-UNNAMED + [9|]--add-opens=java.base/java.lang=ALL-UNNAMED + [9|]--add-opens=java.base/java.nio=ALL-UNNAMED + [9|]--add-opens=java.base/sun.nio.ch=ALL-UNNAMED + [9|]--add-opens=java.management/sun.management=ALL-UNNAMED -Djava.awt.headless=true -Djdk.corba.allowOutputStreamSubclass=true -XX:+UnlockDiagnosticVMOptions @@ -470,6 +475,7 @@ [1.8.0u121|1.8.0u160]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.7.jar [1.8.0u161|1.8.0u190]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.8.jar [1.8.0u191|1.8.0u500]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.8.1.jar + [9|]-Xbootclasspath/a:${com.sun.aas.installRoot}/lib/grizzly-npn-api.jar diff --git a/appserver/admin/gf_template_web/src/main/resources/config/domain.xml b/appserver/admin/gf_template_web/src/main/resources/config/domain.xml index 5c9aa0381e1..bb6e564cd23 100644 --- a/appserver/admin/gf_template_web/src/main/resources/config/domain.xml +++ b/appserver/admin/gf_template_web/src/main/resources/config/domain.xml @@ -192,14 +192,16 @@ - + -client - -Xbootclasspath/a:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap.jar - --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED - --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED - --illegal-access=permit - -XX:+IgnoreUnrecognizedVMOptions - -XX:+UnlockExperimentalVMOptions + [9|]--add-opens=java.base/jdk.internal.loader=ALL-UNNAMED + [9|]--add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED + + [9|]--add-exports=java.base/jdk.internal.ref=ALL-UNNAMED + [9|]--add-opens=java.base/java.lang=ALL-UNNAMED + [9|]--add-opens=java.base/java.nio=ALL-UNNAMED + [9|]--add-opens=java.base/sun.nio.ch=ALL-UNNAMED + [9|]--add-opens=java.management/sun.management=ALL-UNNAMED -Djava.awt.headless=true -Djdk.corba.allowOutputStreamSubclass=true -Djavax.xml.accessExternalSchema=all @@ -255,6 +257,7 @@ [1.8.0u121|1.8.0u160]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.7.jar [1.8.0u161|1.8.0u190]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.8.jar [1.8.0u191|1.8.0u500]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.8.1.jar + [9|]-Xbootclasspath/a:${com.sun.aas.installRoot}/lib/grizzly-npn-api.jar @@ -399,14 +402,16 @@ - + -server - -Xbootclasspath/a:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap.jar - --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED - -add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED - --illegal-access=permit - -XX:+IgnoreUnrecognizedVMOptions - -XX:+UnlockExperimentalVMOptions + [9|]--add-opens=java.base/jdk.internal.loader=ALL-UNNAMED + [9|]--add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED + + [9|]--add-exports=java.base/jdk.internal.ref=ALL-UNNAMED + [9|]--add-opens=java.base/java.lang=ALL-UNNAMED + [9|]--add-opens=java.base/java.nio=ALL-UNNAMED + [9|]--add-opens=java.base/sun.nio.ch=ALL-UNNAMED + [9|]--add-opens=java.management/sun.management=ALL-UNNAMED -Djava.awt.headless=true -Djdk.corba.allowOutputStreamSubclass=true -XX:+UnlockDiagnosticVMOptions @@ -460,6 +465,7 @@ [1.8.0u121|1.8.0u160]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.7.jar [1.8.0u161|1.8.0u190]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.8.jar [1.8.0u191|1.8.0u500]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.8.1.jar + [9|]-Xbootclasspath/a:${com.sun.aas.installRoot}/lib/grizzly-npn-api.jar diff --git a/appserver/admin/production_domain_template/src/main/resources/config/domain.xml b/appserver/admin/production_domain_template/src/main/resources/config/domain.xml index b8b55cb15cb..b3b711fba8a 100644 --- a/appserver/admin/production_domain_template/src/main/resources/config/domain.xml +++ b/appserver/admin/production_domain_template/src/main/resources/config/domain.xml @@ -175,13 +175,15 @@ - - -Xbootclasspath/a:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap.jar - --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED - --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED - --illegal-access=permit - -XX:+IgnoreUnrecognizedVMOptions - -XX:+UnlockExperimentalVMOptions + + [9|]--add-opens=java.base/jdk.internal.loader=ALL-UNNAMED + [9|]--add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED + + [9|]--add-exports=java.base/jdk.internal.ref=ALL-UNNAMED + [9|]--add-opens=java.base/java.lang=ALL-UNNAMED + [9|]--add-opens=java.base/java.nio=ALL-UNNAMED + [9|]--add-opens=java.base/sun.nio.ch=ALL-UNNAMED + [9|]--add-opens=java.management/sun.management=ALL-UNNAMED -Xmx2g -Xms2g -XX:+UseG1GC @@ -209,6 +211,7 @@ [1.8.0u121|1.8.0u160]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.7.jar [1.8.0u161|1.8.0u190]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.8.jar [1.8.0u191|1.8.0u500]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.8.1.jar + [9|]-Xbootclasspath/a:${com.sun.aas.installRoot}/lib/grizzly-npn-api.jar @@ -369,12 +372,14 @@ - -Xbootclasspath/a:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap.jar - --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED - -add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED - --illegal-access=permit - -XX:+IgnoreUnrecognizedVMOptions - -XX:+UnlockExperimentalVMOptions + [9|]--add-opens=java.base/jdk.internal.loader=ALL-UNNAMED + [9|]--add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED + + [9|]--add-exports=java.base/jdk.internal.ref=ALL-UNNAMED + [9|]--add-opens=java.base/java.lang=ALL-UNNAMED + [9|]--add-opens=java.base/java.nio=ALL-UNNAMED + [9|]--add-opens=java.base/sun.nio.ch=ALL-UNNAMED + [9|]--add-opens=java.management/sun.management=ALL-UNNAMED -Xmx2g -Xms2g -XX:+UseG1GC @@ -401,6 +406,7 @@ [1.8.0u121|1.8.0u160]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.7.jar [1.8.0u161|1.8.0u190]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.8.jar [1.8.0u191|1.8.0u500]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.8.1.jar + [9|]-Xbootclasspath/a:${com.sun.aas.installRoot}/lib/grizzly-npn-api.jar diff --git a/appserver/admin/production_domain_template_web/src/main/resources/config/domain.xml b/appserver/admin/production_domain_template_web/src/main/resources/config/domain.xml index 798aefde543..d087612c041 100644 --- a/appserver/admin/production_domain_template_web/src/main/resources/config/domain.xml +++ b/appserver/admin/production_domain_template_web/src/main/resources/config/domain.xml @@ -197,13 +197,15 @@ - - -Xbootclasspath/a:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap.jar - --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED - --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED - --illegal-access=permit - -XX:+IgnoreUnrecognizedVMOptions - -XX:+UnlockExperimentalVMOptions + + [9|]--add-opens=java.base/jdk.internal.loader=ALL-UNNAMED + [9|]--add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED + + [9|]--add-exports=java.base/jdk.internal.ref=ALL-UNNAMED + [9|]--add-opens=java.base/java.lang=ALL-UNNAMED + [9|]--add-opens=java.base/java.nio=ALL-UNNAMED + [9|]--add-opens=java.base/sun.nio.ch=ALL-UNNAMED + [9|]--add-opens=java.management/sun.management=ALL-UNNAMED -XX:+UseG1GC -XX:+UseStringDeduplication -XX:MetaspaceSize=256m @@ -231,6 +233,7 @@ [1.8.0u121|1.8.0u160]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.7.jar [1.8.0u161|1.8.0u190]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.8.jar [1.8.0u191|1.8.0u500]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.8.1.jar + [9|]-Xbootclasspath/a:${com.sun.aas.installRoot}/lib/grizzly-npn-api.jar @@ -384,13 +387,15 @@ - - -Xbootclasspath/a:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap.jar - --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED - --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED - --illegal-access=permit - -XX:+IgnoreUnrecognizedVMOptions - -XX:+UnlockExperimentalVMOptions + + [9|]--add-opens=java.base/jdk.internal.loader=ALL-UNNAMED + [9|]--add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED + + [9|]--add-exports=java.base/jdk.internal.ref=ALL-UNNAMED + [9|]--add-opens=java.base/java.lang=ALL-UNNAMED + [9|]--add-opens=java.base/java.nio=ALL-UNNAMED + [9|]--add-opens=java.base/sun.nio.ch=ALL-UNNAMED + [9|]--add-opens=java.management/sun.management=ALL-UNNAMED -XX:+UseG1GC -XX:+UseStringDeduplication -XX:MetaspaceSize=256m @@ -417,6 +422,7 @@ [1.8.0u121|1.8.0u160]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.7.jar [1.8.0u161|1.8.0u190]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.8.jar [1.8.0u191|1.8.0u500]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.8.1.jar + [9|]-Xbootclasspath/a:${com.sun.aas.installRoot}/lib/grizzly-npn-api.jar diff --git a/appserver/admingui/reference-manual/src/main/help/en/help/reference/list-jvm-options.html b/appserver/admingui/reference-manual/src/main/help/en/help/reference/list-jvm-options.html index 4eedc017e52..c2f881a1b53 100644 --- a/appserver/admingui/reference-manual/src/main/help/en/help/reference/list-jvm-options.html +++ b/appserver/admingui/reference-manual/src/main/help/en/help/reference/list-jvm-options.html @@ -189,7 +189,6 @@

list-jvm-options

/lib/ext${path.separator}${com.sun.aas.derbyRoot}/lib -Xmx512m -XX:MaxPermSize=192m --Djava.endorsed.dirs=${com.sun.aas.installRoot}/lib/endorsed -XX:LogFile=${com.sun.aas.instanceRoot}/logs/jvm.log Command list-jvm-options executed successfully. diff --git a/appserver/batch/glassfish-batch-connector/pom.xml b/appserver/batch/glassfish-batch-connector/pom.xml index 99a00650340..9d4bedf6099 100755 --- a/appserver/batch/glassfish-batch-connector/pom.xml +++ b/appserver/batch/glassfish-batch-connector/pom.xml @@ -40,7 +40,7 @@ holder. --> - + 4.0.0 @@ -60,21 +60,19 @@ ${project.version} - javax.batch - javax.batch-api - ${javax.batch-api.version} - + javax.batch + javax.batch-api + com.ibm.jbatch com.ibm.jbatch.spi - ${com.ibm.jbatch.spi.version} org.glassfish.main.persistence persistence-common ${project.version} - + org.glassfish.main.concurrent concurrent-connector ${project.version} @@ -82,7 +80,6 @@ com.ibm.jbatch com.ibm.jbatch.container - ${com.ibm.jbatch.container.version} org.jboss.weld.se @@ -94,6 +91,6 @@ fish.payara.payara-modules requesttracing-core ${project.version} - + diff --git a/appserver/common/glassfish-ee-api/src/main/java/com/sun/appserv/ClassLoaderUtil.java b/appserver/common/glassfish-ee-api/src/main/java/com/sun/appserv/ClassLoaderUtil.java index 432236cba19..d5aa4b7c6fd 100644 --- a/appserver/common/glassfish-ee-api/src/main/java/com/sun/appserv/ClassLoaderUtil.java +++ b/appserver/common/glassfish-ee-api/src/main/java/com/sun/appserv/ClassLoaderUtil.java @@ -40,6 +40,7 @@ // Portions Copyright [2017-2019] Payara Foundation and/or affiliates. package com.sun.appserv; +import com.sun.enterprise.util.JDK; import static java.util.logging.Level.WARNING; import java.io.IOException; @@ -54,7 +55,7 @@ import java.util.logging.Logger; import com.sun.logging.LogDomains; -import java.util.ArrayDeque; +import java.util.Collection; /** @@ -77,7 +78,7 @@ public class ClassLoaderUtil { private static final String URLCLASSPATH_JDK9_CLASS_NAME = "jdk.internal.loader.URLClassPath"; private static final String URLCLASSPATH_LOADERS_FIELD_NAME = "loaders"; // ArrayList of URLClassPath.Loader - private static final String URLCLASSPATH_URLS_FIELD_NAME = "unopenedUrls"; // The deque of unopened URLs + private static final String URLCLASSPATH_URLS_FIELD_NAME = JDK.getMajor() < 11 ? "urls" : "unopenedUrls"; private static final String URLCLASSPATH_LMAP_FIELD_NAME = "lmap"; // HashMap of String -> URLClassPath.Loader private static final String URLCLASSPATH_JARLOADER_INNER_CLASS_NAME = "$JarLoader"; @@ -146,7 +147,7 @@ public static void releaseLoader(URLClassLoader classLoader) { Object ucp = ucpField.get(classLoader); List loaders = (List) loadersField.get(ucp); - ArrayDeque unopenedUrls = (ArrayDeque) unopenedUrlsField.get(ucp); + Collection unopenedUrls = (Collection) unopenedUrlsField.get(ucp); Map lmap = (Map) lmapField.get(ucp); /* diff --git a/appserver/connectors/connectors-runtime/pom.xml b/appserver/connectors/connectors-runtime/pom.xml index 834f34809a1..9fd9df07280 100644 --- a/appserver/connectors/connectors-runtime/pom.xml +++ b/appserver/connectors/connectors-runtime/pom.xml @@ -85,7 +85,7 @@ - com.sun.enterprise.resource.pool.monitor.ConnectorConnPoolProbeProvider,com.sun.enterprise.resource.pool.monitor.ConnectorConnPoolAppProbeProvider + com.sun.enterprise.resource.pool.monitor.ConnectorConnPoolProbeProvider,com.sun.enterprise.resource.pool.monitor.ConnectorConnPoolAppProbeProvider diff --git a/appserver/core/api-exporter-fragment/pom.xml b/appserver/core/api-exporter-fragment/pom.xml index 63729f3a25d..8f18ccb74a8 100755 --- a/appserver/core/api-exporter-fragment/pom.xml +++ b/appserver/core/api-exporter-fragment/pom.xml @@ -40,7 +40,7 @@ holder. --> - + 4.0.0 @@ -75,282 +75,282 @@ maven-jar-plugin - + - GlassFish-Application-Common-Module-Fragment - 2 - GlassFish-Application-Common-Module - ${project.name} - - -javax.accessibility; \ -javax.activation; \ -javax.activity; \ -javax.annotation; \ -javax.annotation.processing; \ -javax.annotation.security; \ -javax.annotation.sql; \ -javax.crypto; \ -javax.crypto.interfaces; \ -javax.crypto.spec; \ -javax.decorator; \ -javax.ejb; \ -javax.ejb.embeddable; \ -javax.ejb.spi; \ -javax.el; \ -javax.enterprise.context; \ -javax.enterprise.context.spi; \ -javax.enterprise.deploy.model; \ -javax.enterprise.deploy.model.exceptions; \ -javax.enterprise.deploy.shared; \ -javax.enterprise.deploy.shared.factories; \ -javax.enterprise.deploy.spi; \ -javax.enterprise.deploy.spi.exceptions; \ -javax.enterprise.deploy.spi.factories; \ -javax.enterprise.deploy.spi.status; \ -javax.enterprise.event; \ -javax.enterprise.inject; \ -javax.enterprise.inject.spi; \ -javax.enterprise.util; \ -javax.faces; \ -javax.faces.application; \ -javax.faces.bean; \ -javax.faces.component; \ -javax.faces.component.behavior; \ -javax.faces.component.html; \ -javax.faces.component.visit; \ -javax.faces.context; \ -javax.faces.convert; \ -javax.faces.el; \ -javax.faces.event ; \ -javax.faces.lifecycle; \ -javax.faces.model; \ -javax.faces.render; \ -javax.faces.validator; \ -javax.faces.view.facelets; \ -javax.faces.webapp; \ -javax.inject; \ -javax.imageio; \ -javax.imageio.event; \ -javax.imageio.metadata; \ -javax.imageio.plugins.bmp; \ -javax.imageio.plugins.jpeg; \ -javax.imageio.spi; \ -javax.imageio.stream; \ -javax.interceptor; \ -javax.jms; \ -javax.jws; \ -javax.jws.soap; \ -javax.lang.model; \ -javax.lang.model.element; \ -javax.lang.model.type; \ -javax.lang.model.util; \ -javax.mail; \ -javax.mail.event; \ -javax.mail.internet; \ -javax.mail.search; \ -javax.mail.util; \ -javax.management; \ -javax.management.j2ee; \ -javax.management.j2ee.statistics; \ -javax.management.loading; \ -javax.management.modelmbean; \ -javax.management.monitor; \ -javax.management.openmbean; \ -javax.management.relation; \ -javax.management.remote; \ -javax.management.remote.generic; \ -javax.management.remote.jmxmp; \ -javax.management.remote.rmi; \ -javax.management.remote.message; \ -javax.management.timer; \ -javax.naming; \ -javax.naming.directory; \ -javax.naming.event; \ -javax.naming.ldap; \ -javax.naming.spi; \ -javax.net; \ -javax.net.ssl; \ -javax.persistence; \ -javax.persistence.criteria; \ -javax.persistence.metamodel; \ -javax.persistence.spi; \ -javax.print; \ -javax.print.attribute; \ -javax.print.attribute.standard; \ -javax.print.event; \ -javax.resource; \ -javax.resource.cci; \ -javax.resource.spi; \ -javax.resource.spi.endpoint; \ -javax.resource.spi.security; \ -javax.resource.spi.work; \ -javax.rmi; \ -javax.rmi.CORBA; \ -javax.rmi.ssl; \ -javax.script; \ -javax.security.auth; \ -javax.security.auth.callback; \ -javax.security.auth.kerberos; \ -javax.security.auth.message; \ -javax.security.auth.message.callback; \ -javax.security.auth.message.config; \ -javax.security.auth.message.module; \ -javax.security.auth.login; \ -javax.security.auth.spi; \ -javax.security.auth.x500; \ -javax.security.cert; \ -javax.security.jacc; \ -javax.security.sasl; \ -javax.servlet; \ -javax.servlet.annotation; \ -javax.servlet.descriptor; \ -javax.servlet.http; \ -javax.servlet.jsp; \ -javax.servlet.jsp.el; \ -javax.servlet.jsp.jstl.core; \ -javax.servlet.jsp.jstl.fmt; \ -javax.servlet.jsp.jstl.sql; \ -javax.servlet.jsp.jstl.tlv; \ -javax.servlet.jsp.tagext; \ -javax.sound.midi; \ -javax.sound.midi.spi; \ -javax.sound.sampled; \ -javax.sound.sampled.spi; \ -javax.sql; \ -javax.sql.rowset; \ -javax.sql.rowset.serial; \ -javax.sql.rowset.spi; \ -javax.swing; \ -javax.swing.border; \ -javax.swing.colorchooser; \ -javax.swing.event; \ -javax.swing.filechooser; \ -javax.swing.plaf; \ -javax.swing.plaf.basic; \ -javax.swing.plaf.metal; \ -javax.swing.plaf.multi; \ -javax.swing.plaf.synth; \ -javax.swing.table; \ -javax.swing.text; \ -javax.swing.text.html; \ -javax.swing.text.html.parser; \ -javax.swing.text.rtf; \ -javax.swing.tree; \ -javax.swing.undo; \ -javax.tools; \ -javax.transaction; javax.transaction.xa; \ -javax.transaction.xa; \ -javax.validation; \ -javax.validation.bootstrap; \ -javax.validation.constraints; \ -javax.validation.groups; \ -javax.validation.metadata; \ -javax.validation.spi; \ -javax.ws.rs; \ -javax.ws.rs.core; \ -javax.ws.rs.ext; \ -javax.xml.bind; \ -javax.xml.bind.annotation; \ -javax.xml.bind.annotation.adapters; \ -javax.xml.bind.attachment; \ -javax.xml.bind.helpers; \ -javax.xml.bind.util; \ -javax.xml.crypto; \ -javax.xml.crypto.dom; \ -javax.xml.crypto.dsig; \ -javax.xml.crypto.dsig.dom; \ -javax.xml.crypto.dsig.keyinfo; \ -javax.xml.crypto.dsig.spec; \ -javax.xml.datatype; \ -javax.xml.namespace; \ -javax.xml.parsers; \ -javax.xml.registry; \ -javax.xml.registry.infomodel; \ -javax.xml.rpc; \ -javax.xml.rpc.encoding; \ -javax.xml.rpc.handler; \ -javax.xml.rpc.handler.soap; \ -javax.xml.rpc.holders; \ -javax.xml.rpc.server; \ -javax.xml.rpc.soap; \ -javax.xml.soap; \ -javax.xml.stream; javax.xml.stream.events; javax.xml.stream.util; \ -javax.xml.transform; \ -javax.xml.transform.dom; \ -javax.xml.transform.sax; \ -javax.xml.transform.stax; \ -javax.xml.transform.stream; \ -javax.xml.validation; \ -javax.xml.ws; \ -javax.xml.ws.handler; \ -javax.xml.ws.handler.soap; \ -javax.xml.ws.http; \ -javax.xml.ws.soap; \ -javax.xml.ws.spi; \ -javax.xml.ws.spi.http; \ -javax.xml.ws.wsaddressing; \ -javax.xml.xpath; \ -org.ietf.jgss; \ -org.omg.CORBA; \ -org.omg.CORBA_2_3; \ -org.omg.CORBA_2_3.portable; \ -org.omg.CORBA.DynAnyPackage; \ -org.omg.CORBA.ORBPackage; \ -org.omg.CORBA.portable; \ -org.omg.CORBA.TypeCodePackage; \ -org.omg.CosNaming; \ -org.omg.CosNaming.NamingContextExtPackage; \ -org.omg.CosNaming.NamingContextPackage; \ -org.omg.Dynamic; \ -org.omg.DynamicAny; \ -org.omg.DynamicAny.DynAnyFactoryPackage; \ -org.omg.DynamicAny.DynAnyPackage; \ -org.omg.IOP; \ -org.omg.IOP.CodecFactoryPackage; \ -org.omg.IOP.CodecPackage; \ -org.omg.Messaging; \ -org.omg.PortableInterceptor; \ -org.omg.PortableInterceptor.ORBInitInfoPackage; \ -org.omg.PortableServer; \ -org.omg.PortableServer.CurrentPackage; \ -org.omg.PortableServer.POAManagerPackage; \ -org.omg.PortableServer.POAPackage; \ -org.omg.PortableServer.portable; \ -org.omg.PortableServer.ServantLocatorPackage; \ -org.omg.SendingContext; \ -org.w3c.dom; \ -org.w3c.dom.bootstrap; \ -org.w3c.dom.events; \ -org.w3c.dom.ls; \ -org.xml.sax; \ -org.xml.sax.ext; \ -org.xml.sax.helpers; \ -org.glassfish.hk2.v3.admin; \ -org.glassfish.hk2.naming.impl; \ -org.glassfish.grizzly.http.server.res; \ -org.glassfish.hk2.security.ssl; \ -com.sun.org.apache.xerces.internal.jaxp; \ -com.sun.org.apache.xalan.internal.xsltc.trax; \ -com.sun.org.apache.xerces.internal.parsers; \ -com.sun.pkg.client; \ -com.ctc.wstx.stax; \ -com.sun.jmx.remote.protocol.jmxmp; \ -org.glassfish.hk2.security.provider; \ -org.glassfish.hk2.security.auth.realm.file; \ -org.glassfish.hk2.security.auth.realm.certificate; \ -org.glassfish.hk2.security; \ -com.sun.faces.config; \ -com.sun.jersey.server.impl.container.servlet; \ -org.apache.jasper.runtime; \ -com.sun.xml.ws.transport.http.servlet; \ -org.apache.jasper.servlet; \ - resolution:=optional - + GlassFish-Application-Common-Module-Fragment + 2 + GlassFish-Application-Common-Module + ${project.name} + + + javax.accessibility; \ + javax.activation; \ + javax.activity; \ + javax.annotation; \ + javax.annotation.processing; \ + javax.annotation.security; \ + javax.annotation.sql; \ + javax.crypto; \ + javax.crypto.interfaces; \ + javax.crypto.spec; \ + javax.decorator; \ + javax.ejb; \ + javax.ejb.embeddable; \ + javax.ejb.spi; \ + javax.el; \ + javax.enterprise.context; \ + javax.enterprise.context.spi; \ + javax.enterprise.deploy.model; \ + javax.enterprise.deploy.model.exceptions; \ + javax.enterprise.deploy.shared; \ + javax.enterprise.deploy.shared.factories; \ + javax.enterprise.deploy.spi; \ + javax.enterprise.deploy.spi.exceptions; \ + javax.enterprise.deploy.spi.factories; \ + javax.enterprise.deploy.spi.status; \ + javax.enterprise.event; \ + javax.enterprise.inject; \ + javax.enterprise.inject.spi; \ + javax.enterprise.util; \ + javax.faces; \ + javax.faces.application; \ + javax.faces.bean; \ + javax.faces.component; \ + javax.faces.component.behavior; \ + javax.faces.component.html; \ + javax.faces.component.visit; \ + javax.faces.context; \ + javax.faces.convert; \ + javax.faces.el; \ + javax.faces.event ; \ + javax.faces.lifecycle; \ + javax.faces.model; \ + javax.faces.render; \ + javax.faces.validator; \ + javax.faces.view.facelets; \ + javax.faces.webapp; \ + javax.inject; \ + javax.imageio; \ + javax.imageio.event; \ + javax.imageio.metadata; \ + javax.imageio.plugins.bmp; \ + javax.imageio.plugins.jpeg; \ + javax.imageio.spi; \ + javax.imageio.stream; \ + javax.interceptor; \ + javax.jms; \ + javax.jws; \ + javax.jws.soap; \ + javax.lang.model; \ + javax.lang.model.element; \ + javax.lang.model.type; \ + javax.lang.model.util; \ + javax.mail; \ + javax.mail.event; \ + javax.mail.internet; \ + javax.mail.search; \ + javax.mail.util; \ + javax.management; \ + javax.management.j2ee; \ + javax.management.j2ee.statistics; \ + javax.management.loading; \ + javax.management.modelmbean; \ + javax.management.monitor; \ + javax.management.openmbean; \ + javax.management.relation; \ + javax.management.remote; \ + javax.management.remote.generic; \ + javax.management.remote.jmxmp; \ + javax.management.remote.rmi; \ + javax.management.remote.message; \ + javax.management.timer; \ + javax.naming; \ + javax.naming.directory; \ + javax.naming.event; \ + javax.naming.ldap; \ + javax.naming.spi; \ + javax.net; \ + javax.net.ssl; \ + javax.persistence; \ + javax.persistence.criteria; \ + javax.persistence.metamodel; \ + javax.persistence.spi; \ + javax.print; \ + javax.print.attribute; \ + javax.print.attribute.standard; \ + javax.print.event; \ + javax.resource; \ + javax.resource.cci; \ + javax.resource.spi; \ + javax.resource.spi.endpoint; \ + javax.resource.spi.security; \ + javax.resource.spi.work; \ + javax.rmi; \ + javax.rmi.CORBA; \ + javax.rmi.ssl; \ + javax.script; \ + javax.security.auth; \ + javax.security.auth.callback; \ + javax.security.auth.kerberos; \ + javax.security.auth.message; \ + javax.security.auth.message.callback; \ + javax.security.auth.message.config; \ + javax.security.auth.message.module; \ + javax.security.auth.login; \ + javax.security.auth.spi; \ + javax.security.auth.x500; \ + javax.security.cert; \ + javax.security.jacc; \ + javax.security.sasl; \ + javax.servlet; \ + javax.servlet.annotation; \ + javax.servlet.descriptor; \ + javax.servlet.http; \ + javax.servlet.jsp; \ + javax.servlet.jsp.el; \ + javax.servlet.jsp.jstl.core; \ + javax.servlet.jsp.jstl.fmt; \ + javax.servlet.jsp.jstl.sql; \ + javax.servlet.jsp.jstl.tlv; \ + javax.servlet.jsp.tagext; \ + javax.sound.midi; \ + javax.sound.midi.spi; \ + javax.sound.sampled; \ + javax.sound.sampled.spi; \ + javax.sql; \ + javax.sql.rowset; \ + javax.sql.rowset.serial; \ + javax.sql.rowset.spi; \ + javax.swing; \ + javax.swing.border; \ + javax.swing.colorchooser; \ + javax.swing.event; \ + javax.swing.filechooser; \ + javax.swing.plaf; \ + javax.swing.plaf.basic; \ + javax.swing.plaf.metal; \ + javax.swing.plaf.multi; \ + javax.swing.plaf.synth; \ + javax.swing.table; \ + javax.swing.text; \ + javax.swing.text.html; \ + javax.swing.text.html.parser; \ + javax.swing.text.rtf; \ + javax.swing.tree; \ + javax.swing.undo; \ + javax.tools; \ + javax.transaction; javax.transaction.xa; \ + javax.transaction.xa; \ + javax.validation; \ + javax.validation.bootstrap; \ + javax.validation.constraints; \ + javax.validation.groups; \ + javax.validation.metadata; \ + javax.validation.spi; \ + javax.ws.rs; \ + javax.ws.rs.core; \ + javax.ws.rs.ext; \ + javax.xml.bind; \ + javax.xml.bind.annotation; \ + javax.xml.bind.annotation.adapters; \ + javax.xml.bind.attachment; \ + javax.xml.bind.helpers; \ + javax.xml.bind.util; \ + javax.xml.crypto; \ + javax.xml.crypto.dom; \ + javax.xml.crypto.dsig; \ + javax.xml.crypto.dsig.dom; \ + javax.xml.crypto.dsig.keyinfo; \ + javax.xml.crypto.dsig.spec; \ + javax.xml.datatype; \ + javax.xml.namespace; \ + javax.xml.parsers; \ + javax.xml.registry; \ + javax.xml.registry.infomodel; \ + javax.xml.rpc; \ + javax.xml.rpc.encoding; \ + javax.xml.rpc.handler; \ + javax.xml.rpc.handler.soap; \ + javax.xml.rpc.holders; \ + javax.xml.rpc.server; \ + javax.xml.rpc.soap; \ + javax.xml.soap; \ + javax.xml.stream; javax.xml.stream.events; javax.xml.stream.util; \ + javax.xml.transform; \ + javax.xml.transform.dom; \ + javax.xml.transform.sax; \ + javax.xml.transform.stax; \ + javax.xml.transform.stream; \ + javax.xml.validation; \ + javax.xml.ws; \ + javax.xml.ws.handler; \ + javax.xml.ws.handler.soap; \ + javax.xml.ws.http; \ + javax.xml.ws.soap; \ + javax.xml.ws.spi; \ + javax.xml.ws.spi.http; \ + javax.xml.ws.wsaddressing; \ + javax.xml.xpath; \ + org.ietf.jgss; \ + org.omg.CORBA; \ + org.omg.CORBA_2_3; \ + org.omg.CORBA_2_3.portable; \ + org.omg.CORBA.DynAnyPackage; \ + org.omg.CORBA.ORBPackage; \ + org.omg.CORBA.portable; \ + org.omg.CORBA.TypeCodePackage; \ + org.omg.CosNaming; \ + org.omg.CosNaming.NamingContextExtPackage; \ + org.omg.CosNaming.NamingContextPackage; \ + org.omg.Dynamic; \ + org.omg.DynamicAny; \ + org.omg.DynamicAny.DynAnyFactoryPackage; \ + org.omg.DynamicAny.DynAnyPackage; \ + org.omg.IOP; \ + org.omg.IOP.CodecFactoryPackage; \ + org.omg.IOP.CodecPackage; \ + org.omg.Messaging; \ + org.omg.PortableInterceptor; \ + org.omg.PortableInterceptor.ORBInitInfoPackage; \ + org.omg.PortableServer; \ + org.omg.PortableServer.CurrentPackage; \ + org.omg.PortableServer.POAManagerPackage; \ + org.omg.PortableServer.POAPackage; \ + org.omg.PortableServer.portable; \ + org.omg.PortableServer.ServantLocatorPackage; \ + org.omg.SendingContext; \ + org.w3c.dom; \ + org.w3c.dom.bootstrap; \ + org.w3c.dom.events; \ + org.w3c.dom.ls; \ + org.xml.sax; \ + org.xml.sax.ext; \ + org.xml.sax.helpers; \ + org.glassfish.hk2.v3.admin; \ + org.glassfish.hk2.naming.impl; \ + org.glassfish.grizzly.http.server.res; \ + org.glassfish.hk2.security.ssl; \ + com.sun.org.apache.xerces.internal.jaxp; \ + com.sun.org.apache.xalan.internal.xsltc.trax; \ + com.sun.org.apache.xerces.internal.parsers; \ + com.sun.pkg.client; \ + com.ctc.wstx.stax; \ + com.sun.jmx.remote.protocol.jmxmp; \ + org.glassfish.hk2.security.provider; \ + org.glassfish.hk2.security.auth.realm.file; \ + org.glassfish.hk2.security.auth.realm.certificate; \ + org.glassfish.hk2.security; \ + com.sun.faces.config; \ + com.sun.jersey.server.impl.container.servlet; \ + org.apache.jasper.runtime; \ + com.sun.xml.ws.transport.http.servlet; \ + org.apache.jasper.servlet; \ + resolution:=optional + ${project.description} diff --git a/appserver/installer/src/cpp/share/launcher/java.c b/appserver/installer/src/cpp/share/launcher/java.c index 091d25ba312..502b17a68aa 100644 --- a/appserver/installer/src/cpp/share/launcher/java.c +++ b/appserver/installer/src/cpp/share/launcher/java.c @@ -37,12 +37,12 @@ * only if the new code is made subject to such option by the copyright * holder. */ +/* Portions Copyright [2019] [Payara Foundation and/or its affiliates] */ #include "java.h" #define AWT_HEADLESS_OPTION "-Djava.awt.headless=true" #define CLASSPATH_OPTION "-classpath" -#define ENDORSED_DIRS_OPTION "-Djava.endorsed.dirs=" #define JAVA_IO_TMPDIR_OPTION "-Djava.io.tmpdir=" #define MAX_HEAP_OPTION "-Xmx512m" #define STATE_OPTION "-DInstallFile=" @@ -569,10 +569,6 @@ main(int argc, char **argv) AddOption(s); s = NULL; - - /* Set the "java.endorsed.dir" property to use the default XML parser */ - /* TODO FIX AddOption(StrDup(ENDORSED_DIRS_OPTION)); */ - /* Set the "-Xmx" argument high enough so load the main class */ AddOption(StrDup(MAX_HEAP_OPTION)); diff --git a/appserver/orb/orb-iiop/src/main/java/org/glassfish/enterprise/iiop/impl/IIOPSSLSocketFactory.java b/appserver/orb/orb-iiop/src/main/java/org/glassfish/enterprise/iiop/impl/IIOPSSLSocketFactory.java index 49207f197cc..fab9b7598e1 100644 --- a/appserver/orb/orb-iiop/src/main/java/org/glassfish/enterprise/iiop/impl/IIOPSSLSocketFactory.java +++ b/appserver/orb/orb-iiop/src/main/java/org/glassfish/enterprise/iiop/impl/IIOPSSLSocketFactory.java @@ -231,7 +231,7 @@ public IIOPSSLSocketFactory() { * Return a default SSLInfo object. */ private SSLInfo getDefaultSslInfo() throws Exception { - return init(null, false, null, true, null, true, true, true, true); + return init(null, false, null, true, null, true, true, true, false); } /** diff --git a/appserver/persistence/cmp/enhancer/src/main/java/com/sun/jdo/api/persistence/enhancer/EnhancerClassLoader.java b/appserver/persistence/cmp/enhancer/src/main/java/com/sun/jdo/api/persistence/enhancer/EnhancerClassLoader.java index ff1d8fd78b9..1e7defe93d6 100644 --- a/appserver/persistence/cmp/enhancer/src/main/java/com/sun/jdo/api/persistence/enhancer/EnhancerClassLoader.java +++ b/appserver/persistence/cmp/enhancer/src/main/java/com/sun/jdo/api/persistence/enhancer/EnhancerClassLoader.java @@ -37,7 +37,7 @@ * only if the new code is made subject to such option by the copyright * holder. */ -// Portions Copyright [2018] [Payara Foundation and/or its affiliates] +// Portions Copyright [2018-2019] [Payara Foundation and/or its affiliates] /* * EnhancerClassLoader.java @@ -47,7 +47,6 @@ import java.lang.ref.WeakReference; -import java.io.InputStream; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -57,9 +56,6 @@ import java.net.URLClassLoader; import java.net.URL; - -import jdk.internal.loader.Resource; -import jdk.internal.loader.URLClassPath; import sun.security.tools.PathList; import java.util.jar.Manifest; diff --git a/appserver/persistence/cmp/enhancer/src/main/java/com/sun/jdo/api/persistence/enhancer/URLClassPath.java b/appserver/persistence/cmp/enhancer/src/main/java/com/sun/jdo/api/persistence/enhancer/URLClassPath.java new file mode 100644 index 00000000000..435d95a0e33 --- /dev/null +++ b/appserver/persistence/cmp/enhancer/src/main/java/com/sun/jdo/api/persistence/enhancer/URLClassPath.java @@ -0,0 +1,144 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 2019 Payara Foundation 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 + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * https://github.com/payara/Payara/blob/master/LICENSE.txt + * See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at glassfish/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * The Payara Foundation designates this particular file as subject to the "Classpath" + * exception as provided by the Payara Foundation in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ +package com.sun.jdo.api.persistence.enhancer; +import com.sun.enterprise.util.JDK; +import java.io.IOException; +import java.lang.reflect.Constructor; +import java.lang.reflect.Method; +import java.net.URL; +import java.security.AccessControlContext; +import java.security.cert.Certificate; +import java.util.jar.Manifest; + +/** + * + * @author Gaurav Gupta + */ +public class URLClassPath { + + private static final String URL_CLASSPATH_CLASS_NAME = JDK.getMajor() > 8 ? "jdk.internal.loader.URLClassPath" : "sun.misc.URLClassPath"; + private static Constructor constructor; + private static final String GET_RESOURCE_METHOD_NAME = "getResource"; + private static Method getResource; + + private Object instance; + + public URLClassPath(URL[] urls, AccessControlContext acc) { + try { + if (constructor == null) { + Class clazz = Class.forName(URL_CLASSPATH_CLASS_NAME); + constructor = clazz.getConstructor(URL[].class, AccessControlContext.class); + } + instance = constructor.newInstance(urls, acc); + } catch (Exception ex) { + throw new RuntimeException(ex); + } + + } + + Resource getResource(String name, boolean check) { + if (getResource == null) { + getResource = getMethod(instance, GET_RESOURCE_METHOD_NAME, String.class, boolean.class); + } + return new Resource(invoke(instance, getResource, name, check)); + } + + static Method getMethod(Object instance, String name, Class... parameterTypes) { + try { + return instance.getClass().getMethod(name, parameterTypes); + } catch (Exception ex) { + throw new RuntimeException(ex); + } + } + + static Object invoke(Object instance, Method method, Object... args) { + try { + return method.invoke(instance, args); + } catch (Exception ex) { + throw new RuntimeException(ex); + } + } + +} + +class Resource { + + private final Object instance; + private static final String GET_CODE_SOURCE_URL_METHOD_NAME = "getCodeSourceURL"; + private static Method getCodeSourceURL; + private static final String GET_MANIFEST_METHOD_NAME = "getManifest"; + private static Method getManifest; + private static final String GET_BYTES_METHOD_NAME = "getBytes"; + private static Method getBytes; + private static final String GET_CERTIFICATES_METHOD_NAME = "getCertificates"; + private static Method getCertificates; + + public Resource(Object instance) { + this.instance = instance; + } + + public URL getCodeSourceURL() { + if (getCodeSourceURL == null) { + getCodeSourceURL = URLClassPath.getMethod(instance, GET_CODE_SOURCE_URL_METHOD_NAME); + } + return (URL) URLClassPath.invoke(instance, getCodeSourceURL); + } + + public Manifest getManifest() throws IOException { + if (getManifest == null) { + getManifest = URLClassPath.getMethod(instance, GET_MANIFEST_METHOD_NAME); + } + return (Manifest) URLClassPath.invoke(instance, getManifest); + } + + public byte[] getBytes() throws IOException { + if (getBytes == null) { + getBytes = URLClassPath.getMethod(instance, GET_BYTES_METHOD_NAME); + } + return (byte[]) URLClassPath.invoke(instance, getBytes); + } + + public Certificate[] getCertificates() { + if (getCertificates == null) { + getCertificates = URLClassPath.getMethod(instance, GET_CERTIFICATES_METHOD_NAME); + } + return (Certificate[]) URLClassPath.invoke(instance, getCertificates); + } +} diff --git a/appserver/security/ejb.security/src/main/java/com/sun/enterprise/iiop/security/GSSUtils.java b/appserver/security/ejb.security/src/main/java/com/sun/enterprise/iiop/security/GSSUtils.java index 5da2e8258f4..02f11e9a220 100644 --- a/appserver/security/ejb.security/src/main/java/com/sun/enterprise/iiop/security/GSSUtils.java +++ b/appserver/security/ejb.security/src/main/java/com/sun/enterprise/iiop/security/GSSUtils.java @@ -37,7 +37,7 @@ * only if the new code is made subject to such option by the copyright * holder. */ -// Portions Copyright [2016-2019] [Payara Foundation] +// Portions Copyright [2016-2019] [Payara Foundation and/or its affiliates] package com.sun.enterprise.iiop.security; @@ -176,7 +176,7 @@ public static byte[] importName(ObjectIdentifier oid, byte[] externalName) throw byte[] deroid = new byte[mechoidlen]; System.arraycopy(externalName, 4, deroid, 0, mechoidlen); ObjectIdentifier oid1 = getOID(deroid); - if (!oid1.equals(oid)) + if (!oid1.equals((Object) oid)) throw e; int pos = 4 + mechoidlen; @@ -230,10 +230,7 @@ public static boolean verifyMechOID(ObjectIdentifier oid, byte[] externalName) t byte[] deroid = new byte[mechoidlen]; System.arraycopy(externalName, 4, deroid, 0, mechoidlen); ObjectIdentifier oid1 = getOID(deroid); - if (!oid1.equals(oid)) - return false; - else - return true; + return oid1.equals((Object) oid); } /* @@ -413,7 +410,7 @@ private static int verifyTokenHeader(ObjectIdentifier oid, byte[] token) throws _logger.log(Level.FINE, "expected mech OID: " + dumpHex(getDER(oid))); } - if (!mechoid.equals(oid)) { + if (!mechoid.equals((Object) oid)) { if (_logger.isLoggable(Level.FINE)) { _logger.log(Level.FINE, "mech OID in token does not match expected mech OID"); } diff --git a/appserver/tests/quicklook/pom.xml b/appserver/tests/quicklook/pom.xml index e0c83c91adf..ae5bba24b70 100644 --- a/appserver/tests/quicklook/pom.xml +++ b/appserver/tests/quicklook/pom.xml @@ -81,7 +81,7 @@ - + @@ -263,16 +263,13 @@ all - - true - true - + - default + tools_jar ${java.home}/../lib/tools.jar diff --git a/appserver/web/weld-integration-fragment/pom.xml b/appserver/web/weld-integration-fragment/pom.xml index a8b285a0747..0a039a1bc2c 100644 --- a/appserver/web/weld-integration-fragment/pom.xml +++ b/appserver/web/weld-integration-fragment/pom.xml @@ -40,14 +40,14 @@ holder. --> - + 4.0.0 org.glassfish.main.web - web + web 5.192-SNAPSHOT ../pom.xml @@ -72,57 +72,72 @@ + org.apache.felix + maven-bundle-plugin + + + bundle-manifest + process-classes + + manifest + + + + org.jboss.weld.osgi-bundle;bundle-version=${weld-bundle.version} + + + org.jboss.weld.proxy.util, + org.jboss.weld.bean.proxy.util, + org.jboss.weld.context.http, + org.jboss.weld.contexts.bound, + org.jboss.weld.contexts.cache, + org.jboss.weld.bean.builtin.ee, + javassist.util.proxy, + org.jboss.weld.interceptor.proxy, + org.jboss.weld.interceptor.util.proxy, + org.jboss.weld.util.bean, + org.jboss.weld.serialization, + org.jboss.weld.injection.attributes, + org.jboss.weld.util.collections, + org.jboss.weld.annotated.slim, + org.jboss.weld.annotated.slim.backed, + org.jboss.weld.security, + org.jboss.weld.annotated.enhanced, + org.jboss.weld.resources, + org.jboss.weld.bean.attributes, + org.jboss.weld.contexts, + org.jboss.weld.util.reflection, + org.jboss.weld.executor, + org.jboss.weld.exceptions + + org.glassfish.weld, + javax.ejb,org.glassfish.weld.services + ${project.description} + + + + + + + org.apache.maven.plugins maven-jar-plugin - - ${project.groupId}.${project.artifactId} - 2 - org.jboss.weld.osgi-bundle;bundle-version=${weld-bundle.version} - - - org.jboss.weld.proxy.util, - org.jboss.weld.bean.proxy.util, - org.jboss.weld.context.http, - org.jboss.weld.contexts.bound, - org.jboss.weld.contexts.cache, - org.jboss.weld.bean.builtin.ee, - javassist.util.proxy, - org.jboss.weld.interceptor.proxy, - org.jboss.weld.interceptor.util.proxy, - org.jboss.weld.util.bean, - org.jboss.weld.serialization, - org.jboss.weld.injection.attributes, - org.jboss.weld.util.collections, - org.jboss.weld.annotated.slim, - org.jboss.weld.annotated.slim.backed, - org.jboss.weld.security, - org.jboss.weld.annotated.enhanced, - org.jboss.weld.resources, - org.jboss.weld.bean.attributes, - org.jboss.weld.contexts, - org.jboss.weld.util.reflection, - org.jboss.weld.executor, - org.jboss.weld.exceptions - - org.glassfish.weld, - javax.ejb,org.glassfish.weld.services - ${project.description} - + ${project.build.outputDirectory}/META-INF/MANIFEST.MF diff --git a/appserver/web/weld-integration-test-fragment/pom.xml b/appserver/web/weld-integration-test-fragment/pom.xml index 96d4b8aaf24..a460ed9e0a5 100644 --- a/appserver/web/weld-integration-test-fragment/pom.xml +++ b/appserver/web/weld-integration-test-fragment/pom.xml @@ -40,7 +40,7 @@ holder. --> - + 4.0.0 @@ -68,30 +68,44 @@ + org.apache.felix + maven-bundle-plugin + + + bundle-manifest + process-classes + + manifest + + + + org.jboss.weld.osgi-bundle + + org.jboss.weld.literal, + org.jboss.weld.logging, + org.jboss.weld.logging.messages, + org.jboss.metadata.validation, + org.jboss.weld.bean.interceptor, + org.jboss.weld.metadata, + org.jboss.weld.metadata.cache, + org.jboss.weld.resources, + org.jboss.weld.test, + org.jboss.weld.tests, + org.jboss.weld.tests.extensions, + org.jboss.weld.tests.extensions.injectionTarget, + org.jboss.weld.exceptions, + + + + + + + + org.apache.maven.plugins maven-jar-plugin - - ${project.groupId}.${project.artifactId} - 2 - org.jboss.weld.osgi-bundle - -org.jboss.weld.literal, -org.jboss.weld.logging, -org.jboss.weld.logging.messages, -org.jboss.metadata.validation, -org.jboss.weld.bean.interceptor, -org.jboss.weld.metadata, -org.jboss.weld.metadata.cache, -org.jboss.weld.resources, -org.jboss.weld.test, -org.jboss.weld.tests, -org.jboss.weld.tests.extensions, -org.jboss.weld.tests.extensions.injectionTarget, -org.jboss.weld.exceptions, - - ${project.description} - + ${project.build.outputDirectory}/META-INF/MANIFEST.MF diff --git a/appserver/web/weld-integration/osgi.bundle b/appserver/web/weld-integration/osgi.bundle index 506e9ae2582..ad71f3c4a11 100644 --- a/appserver/web/weld-integration/osgi.bundle +++ b/appserver/web/weld-integration/osgi.bundle @@ -37,6 +37,7 @@ # only if the new code is made subject to such option by the copyright # holder. # +# Portions Copyright [2019] [Payara Foundation and/or its affiliates] -exportcontents: org.glassfish.weld.*; \ org.glassfish.cdi.*; version=${project.osgi.version} @@ -45,5 +46,6 @@ Bundle-Activator: org.glassfish.weld.WeldActivator # Because this module needs to run in web profile which does not have # full javaee deployment support, we mark corresponding package as optional. Import-Package: org.glassfish.javaee.full.deployment; resolution:= optional, \ + javax.xml.ws; version=${jaxws-api.version}, \ javax.transaction;, \ * diff --git a/nucleus/admin/launcher/src/main/java/com/sun/enterprise/admin/launcher/JavaConfig.java b/nucleus/admin/launcher/src/main/java/com/sun/enterprise/admin/launcher/JavaConfig.java index 0ade47791a6..aa46a609ca1 100644 --- a/nucleus/admin/launcher/src/main/java/com/sun/enterprise/admin/launcher/JavaConfig.java +++ b/nucleus/admin/launcher/src/main/java/com/sun/enterprise/admin/launcher/JavaConfig.java @@ -37,11 +37,13 @@ * only if the new code is made subject to such option by the copyright * holder. */ +// Portions Copyright [2019] [Payara Foundation and/or its affiliates] package com.sun.enterprise.admin.launcher; import com.sun.enterprise.universal.glassfish.GFLauncherUtils; import static com.sun.enterprise.admin.launcher.GFLauncherConstants.*; +import com.sun.enterprise.util.JDK; import java.io.*; import java.util.*; @@ -132,17 +134,23 @@ List getDebugOptions() { // options in one String -- the JVM will ignore the second option... // sample "-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9999" List empty = Collections.emptyList(); - String s = map.get("debug-options"); + String debugOptions = map.get("debug-options"); - if(!GFLauncherUtils.ok(s)) { + if(!GFLauncherUtils.ok(debugOptions)) { return empty; } - String[] ss = s.split(" "); - if(ss.length <= 0) { + if(JDK.getMajor() >= 9 + && debugOptions.contains("address=") + && !debugOptions.contains("address=*:")){ + debugOptions = debugOptions.replace("address=", "address=*:"); + } + String[] debugOptionArray = debugOptions.split(" "); + + if(debugOptionArray.length <= 0) { return empty; } - return Arrays.asList(ss); + return Arrays.asList(debugOptionArray); } boolean isDebugEnabled() { diff --git a/nucleus/core/bootstrap/pom.xml b/nucleus/core/bootstrap/pom.xml index 6891ba33e91..1407d0033de 100755 --- a/nucleus/core/bootstrap/pom.xml +++ b/nucleus/core/bootstrap/pom.xml @@ -86,8 +86,8 @@ true - custom - ${artifact.artifactId}.${artifact.extension} + custom + ${artifact.artifactId}.${artifact.extension} com.sun.enterprise.glassfish.bootstrap.ASMain ${project.build.outputDirectory}/META-INF/MANIFEST.MF diff --git a/nucleus/core/extra-jre-packages/pom.xml b/nucleus/core/extra-jre-packages/pom.xml index f7f7aaa51a5..f3aa143ddc6 100755 --- a/nucleus/core/extra-jre-packages/pom.xml +++ b/nucleus/core/extra-jre-packages/pom.xml @@ -40,7 +40,7 @@ holder. --> - + 4.0.0 @@ -68,89 +68,104 @@ + org.apache.felix + maven-bundle-plugin + + + bundle-manifest + process-classes + + manifest + + + + system.bundle; extension:=framework + ${project.description} + + com.ibm.security.util, + com.ibm.security.x509, + com.sun.corba.se.impl.orbutil.threadpool, + com.sun.corba.se.spi.orbutil.threadpool, + com.sun.j3d.loaders, + com.sun.j3d.loaders.lw3d, + com.sun.j3d.loaders.objectfile, + com.sun.j3d.utils.behaviors.keyboard, + com.sun.j3d.utils.behaviors.mouse, + com.sun.j3d.utils.geometry, + com.sun.j3d.utils.image, + com.sun.j3d.utils.timer, + com.sun.java.swing.plaf.windows, + com.sun.jndi.cosnaming, + com.sun.jndi.ldap, + com.sun.mirror.apt, + com.sun.mirror.declaration, + com.sun.mirror.type, + com.sun.mirror.util, + com.sun.net.httpserver, + com.sun.org.apache.xalan.internal.res, + com.sun.org.apache.xalan.internal.xsltc.trax, + com.sun.org.apache.xerces.internal.dom, + com.sun.org.apache.xerces.internal.impl, + com.sun.org.apache.xerces.internal.impl.dv.util, + com.sun.org.apache.xerces.internal.jaxp, + com.sun.org.apache.xerces.internal.parsers, + com.sun.org.apache.xerces.internal.util, + com.sun.org.apache.xerces.internal.xni, + com.sun.org.apache.xerces.internal.xni.grammars, + com.sun.org.apache.xerces.internal.xni.parser, + com.sun.org.apache.xml.internal.dtm, + com.sun.org.apache.xml.internal.serialize, + com.sun.org.apache.xml.internal.utils, + com.sun.org.apache.xpath.internal, + com.sun.org.apache.xpath.internal.compiler, + com.sun.org.apache.xpath.internal.functions, + com.sun.org.apache.xpath.internal.jaxp, + com.sun.org.apache.xpath.internal.objects, + com.sun.security.auth, + com.sun.security.auth.login, + com.sun.security.auth.callback, + com.sun.tools.apt, + com.sun.tools.javac, + org.omg.stub.java.rmi, + org.w3c.dom.css, + org.w3c.dom.html, + org.w3c.dom.ranges, + org.w3c.dom.traversal, + org.w3c.dom.views, + sun.awt.shell, + sun.corba, + sun.misc, + sun.net.www, + sun.nio.cs, + sun.reflect, + sun.rmi.rmic, + sun.rmi.transport, + sun.security.action, + sun.security.jgss, + sun.security.jgss.spi, + sun.security.krb5, + sun.security.krb5.internal.crypto, + com.sun.security.jgss, + sun.security.provider, + sun.security.tools, + sun.security.util, + sun.security.x509, + sun.security.pkcs, + sun.tools.javac, + sunw.io, + sunw.util + + + + + + + + org.apache.maven.plugins maven-jar-plugin - - ${project.groupId}.${project.artifactId} - 2 - system.bundle; extension:=framework - - com.ibm.security.util, - com.ibm.security.x509, - com.sun.corba.se.impl.orbutil.threadpool, - com.sun.corba.se.spi.orbutil.threadpool, - com.sun.j3d.loaders, - com.sun.j3d.loaders.lw3d, - com.sun.j3d.loaders.objectfile, - com.sun.j3d.utils.behaviors.keyboard, - com.sun.j3d.utils.behaviors.mouse, - com.sun.j3d.utils.geometry, - com.sun.j3d.utils.image, - com.sun.j3d.utils.timer, - com.sun.java.swing.plaf.windows, - com.sun.jndi.cosnaming, - com.sun.jndi.ldap, - com.sun.mirror.apt, - com.sun.mirror.declaration, - com.sun.mirror.type, - com.sun.mirror.util, - com.sun.net.httpserver, - com.sun.org.apache.xalan.internal.res, - com.sun.org.apache.xalan.internal.xsltc.trax, - com.sun.org.apache.xerces.internal.dom, - com.sun.org.apache.xerces.internal.impl, - com.sun.org.apache.xerces.internal.impl.dv.util, - com.sun.org.apache.xerces.internal.jaxp, - com.sun.org.apache.xerces.internal.parsers, - com.sun.org.apache.xerces.internal.util, - com.sun.org.apache.xerces.internal.xni, - com.sun.org.apache.xerces.internal.xni.grammars, - com.sun.org.apache.xerces.internal.xni.parser, - com.sun.org.apache.xml.internal.dtm, - com.sun.org.apache.xml.internal.serialize, - com.sun.org.apache.xml.internal.utils, - com.sun.org.apache.xpath.internal, - com.sun.org.apache.xpath.internal.compiler, - com.sun.org.apache.xpath.internal.functions, - com.sun.org.apache.xpath.internal.jaxp, - com.sun.org.apache.xpath.internal.objects, - com.sun.security.auth, - com.sun.security.auth.login, - com.sun.security.auth.callback, - com.sun.tools.apt, - com.sun.tools.javac, - org.omg.stub.java.rmi, - org.w3c.dom.css, - org.w3c.dom.html, - org.w3c.dom.ranges, - org.w3c.dom.traversal, - org.w3c.dom.views, - sun.awt.shell, - sun.corba, - sun.misc, - sun.net.www, - sun.nio.cs, - sun.reflect, - sun.rmi.rmic, - sun.rmi.transport, - sun.security.action, - sun.security.jgss, - sun.security.jgss.spi, - sun.security.krb5, - sun.security.krb5.internal.crypto, - com.sun.security.jgss, - sun.security.provider, - sun.security.tools, - sun.security.util, - sun.security.x509, - sun.security.pkcs, - sun.tools.javac, - sunw.io, - sunw.util - - ${project.description} - + ${project.build.outputDirectory}/META-INF/MANIFEST.MF diff --git a/nucleus/core/kernel/src/main/manpages/com/sun/enterprise/v3/admin/commands/list-jvm-options.1 b/nucleus/core/kernel/src/main/manpages/com/sun/enterprise/v3/admin/commands/list-jvm-options.1 index c3b1cefe87e..ef487a588f2 100644 --- a/nucleus/core/kernel/src/main/manpages/com/sun/enterprise/v3/admin/commands/list-jvm-options.1 +++ b/nucleus/core/kernel/src/main/manpages/com/sun/enterprise/v3/admin/commands/list-jvm-options.1 @@ -69,7 +69,6 @@ EXAMPLES /lib/ext${path.separator}${com.sun.aas.derbyRoot}/lib -Xmx512m -XX:MaxPermSize=192m - -Djava.endorsed.dirs=${com.sun.aas.installRoot}/lib/endorsed -XX:LogFile=${com.sun.aas.instanceRoot}/logs/jvm.log Command list-jvm-options executed successfully. diff --git a/nucleus/packager/nucleus-grizzly/pom.xml b/nucleus/packager/nucleus-grizzly/pom.xml index 0dc8f8d8559..6d42838d57d 100644 --- a/nucleus/packager/nucleus-grizzly/pom.xml +++ b/nucleus/packager/nucleus-grizzly/pom.xml @@ -39,7 +39,7 @@ only if the new code is made subject to such option by the copyright holder. - Portions Copyright [2018] [Payara Foundation and/or its affiliates] + Portions Copyright [2018-2019] [Payara Foundation and/or its affiliates] --> @@ -89,6 +89,12 @@ + + org.glassfish.grizzly + grizzly-npn-api + 1.9 + grizzly-npn-api.jar + org.glassfish.grizzly diff --git a/nucleus/packager/nucleus/src/main/resources/lib/package-appclient.xml b/nucleus/packager/nucleus/src/main/resources/lib/package-appclient.xml index 4ace0bcd1c7..065ac9615a1 100644 --- a/nucleus/packager/nucleus/src/main/resources/lib/package-appclient.xml +++ b/nucleus/packager/nucleus/src/main/resources/lib/package-appclient.xml @@ -40,6 +40,7 @@ holder. --> + @@ -86,7 +87,6 @@ -