Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [glassfish-dev] Any idea why on Java 11 the GlassFish Client Container might be failing to see the Client Container classloader?


On 2/25/21 4:43 AM, sawamura.hiroki@xxxxxxxxxxx wrote:

Hi Steve

 

This fix was recently merged into master and GlassFish 6.1.0 is probably not deployed anywhere yet.

 

> Scott

Where did you download the GlassFish?

From https://ci.eclipse.org/jakartaee-tck/job/build-glassfish/ which builds the GlassFish master branch via "mvn -Pstaging clean install -DskipTests=true" which was built with the following as most recent commit:

git log '--max-count=64'
commit 0f99d34ef75a5e450a3231e83bdb8425a1c8eefe
Merge: 576479dab 733036417
Author: Steve Millidge <smillidge@xxxxxxxxxxxxxxxxxxxxxxxx>
Date:   Tue Feb 23 07:47:01 2021 +0000

    Merge pull request #23384 from hs536/docker-jdk11
    
    #23031 Update docker image for JDK 11


 

Regards

Hiroki

 

From: glassfish-dev <glassfish-dev-bounces@xxxxxxxxxxx> On Behalf Of Steve Millidge (Payara)
Sent: Thursday, February 25, 2021 4:52 PM
To: glassfish developer discussions <glassfish-dev@xxxxxxxxxxx>
Subject: Re: [glassfish-dev] Any idea why on Java 11 the GlassFish Client Container might be failing to see the Client Container classloader?

 

Hi Hiroki

If the fix is in the code why is the TCK seeing errors?

Thanks

Steve


From: glassfish-dev <glassfish-dev-bounces@xxxxxxxxxxx> on behalf of sawamura.hiroki@xxxxxxxxxxx <sawamura.hiroki@xxxxxxxxxxx>
Sent: Thursday, February 25, 2021 3:00:03 AM
To: glassfish developer discussions <glassfish-dev@xxxxxxxxxxx>
Subject: Re: [glassfish-dev] Any idea why on Java 11 the GlassFish Client Container might be failing to see the Client Container classloader?

 

Hi,

 

This is because the structure of the classloader has changed significantly between JDK 8 and JDK 11.

 

The ACCAgentClassLoader is implemented as a custom system class loader.

The agent JAR file(gf-client.jar) that contains ACCAgentClassLoader is no longer added in the system classpath in JDK 11, so ACCAgentClassLoader must have the appendToClassPathForInstrumentation method implemented.

 

===Javadoc ( https://docs.oracle.com/en/java/javase/11/docs/api/java.instrument/java/lang/instrument/package-summary.html )

If a custom system class loader is configured (by means of the system property java.system.class.loader as specified in the getSystemClassLoader method) then it must define the appendToClassPathForInstrumentation method as specified in appendToSystemClassLoaderSearch. In other words, a custom system class loader must support the mechanism to add an agent JAR file to the system class loader search.

===

 

GlassFish 6.1 under development includes the following fixes:

https://github.com/eclipse-ee4j/glassfish/commit/00f315f845b82c8b9bd0291f72de706eed515b0f

 

Regards

Hiroki

 

From: Steve Millidge (Payara) <steve.millidge@xxxxxxxxxxx>
Sent: Thursday, February 25, 2021 1:26 AM
To: glassfish developer discussions <glassfish-dev@xxxxxxxxxxx>; Sawamura, Hiroki/
澤村 大輝 <sawamura.hiroki@xxxxxxxxxxx>
Subject: RE: [glassfish-dev] Any idea why on Java 11 the GlassFish Client Container might be failing to see the Client Container classloader?

 

@sawamura.hiroki@xxxxxxxxxxx may know more as he did this commit Revert "Remove ACCAgentClassLoader from system.class.loader" · eclipse-ee4j/glassfish@4792b49 (github.com)

 

From: glassfish-dev <glassfish-dev-bounces@xxxxxxxxxxx> On Behalf Of Scott Marlow
Sent: 24 February 2021 15:44
To: glassfish developer discussions <glassfish-dev@xxxxxxxxxxx>
Subject: [glassfish-dev] Any idea why on Java 11 the GlassFish Client Container might be failing to see the Client Container classloader?

 

Hi,

What configuration changes do we need on Java 11 for how we start the client container with glassfish/lib/gf-client.jar on the boot classpath?  The configuration file to change is https://github.com/eclipse-ee4j/jakartaee-tck/blob/master/install/jakartaee/bin/ts.jte.jdk11#L1204

We are seeing the following test failure:

"OUT => [javatest.batch] command: com.sun.ts.lib.harness.ExecTSTestCmd DISPLAY=:0.0 HOME=? LD_LIBRARY_PATH=/root/vi/glassfish6/glassfish/lib TMP= windir= SYSTEMROOT= PATH=/root/vi/glassfish6/glassfish/nativelib APPCPATH=/root/jakartaeetck/bin/xml/../../lib/tsharness.jar:/root/jakartaeetck/bin/xml/../../lib/cts.jar:/root/vi/glassfish6/glassfish/lib/jpa_alternate_provider.jar:/root/jakartaeetck/bin/xml/../../lib/tssv.jar:/root/vi/glassfish6/glassfish/modules/weld-osgi-bundle.jar:/root/vi/glassfish6/glassfish/modules/jakarta.enterprise.cdi-api.jar TZ=US/Eastern /opt/jdk-11.0.7/bin/java -Djava.system.class.loader=org.glassfish.appclient.client.acc.agent.ACCAgentClassLoader -Djava.security.policy=/root/vi/glassfish6/glassfish/lib/appclient/client.policy -Dcts.tmp=/root/jakartaeetck/bin/xml/../../tmp -Djava.security.auth.login.config=/root/vi/glassfish6/glassfish/lib/appclient/appclientlogin.conf -Djava.protocol.handler.pkgs=javax.net.ssl -Dcom.sun.enterprise.home=/root/vi/glassfish6/glassfish -Djavax.net.ssl.keyStore=/root/jakartaeetck/bin/xml/../../bin/certificates/clientcert.jks -Djavax.net.ssl.keyStorePassword=changeit -Dcom.sun.aas.installRoot=/root/vi/glassfish6/glassfish -Dcom.sun.aas.imqLib=/root/vi/glassfish6/glassfish/../mq/lib -Djavax.net.ssl.trustStore=/root/vi/glassfish6/glassfish/domains/domain1/config/cacerts.jks -Djavax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl -Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl -Djavax.xml.transform.TransformerFactory=com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl -Dorg.xml.sax.driver=com.sun.org.apache.xerces.internal.parsers.SAXParser -Dorg.xml.sax.parser=org.xml.sax.helpers.XMLReaderAdapter -Doracle.jdbc.J2EE13Compliant=true -Doracle.jdbc.mapDateToTimestamp -Djava.security.manager -Dstartup.login=false -Dauth.gui=false -Dlog.file.location=/root/vi/glassfish6/glassfish/domains/domain1/logs -Dri.log.file.location=/root/ri/glassfish6/glassfish/domains/domain1/logs -DwebServerHost.2=localhost -DwebServerPort.2=8002 -Dprovider.configuration.file=/root/vi/glassfish6/glassfish/domains/domain1/config/ProviderConfiguration.xml -Djava.security.properties=/root/vi/glassfish6/glassfish/domains/domain1/config/ts.java.security -Dcom.sun.aas.configRoot=/root/vi/glassfish6/glassfish/config -Ddeliverable.class=com.sun.ts.lib.deliverable.cts.CTSDeliverable -javaagent:/root/vi/glassfish6/glassfish/lib/gf-client.jar=arg=-configxml,arg=/root/jakartaeetck/bin/xml/../../tmp/appclient/s1as.sun-acc.xml,client=jar=/root/jakartaeetck/bin/xml/../../dist/com/sun/ts/tests/ejb30/assembly/librarydirectory/custom/ts_dep/ejb3_assembly_librarydirectory_customClient.jar,arg=-name,arg=ejb3_assembly_librarydirectory_custom_client -jar /root/jakartaeetck/bin/xml/../../dist/com/sun/ts/tests/ejb30/assembly/librarydirectory/custom/ts_dep/ejb3_assembly_librarydirectory_customClient.jar -p /root/jakartaeetck/bin/xml/../../tmp/tstest.jte -t libDirNotUsed
   [runcts] OUT => [javatest.batch] Error occurred during initialization of VM
   [runcts] OUT => [javatest.batch] java.lang.Error: org.glassfish.appclient.client.acc.agent.ACCAgentClassLoader
   [runcts] OUT => [javatest.batch]     at java.lang.ClassLoader.initSystemClassLoader(java.base@11.0.7/ClassLoader.java:1989)
   [runcts] OUT => [javatest.batch]     at java.lang.System.initPhase3(java.base@11.0.7/System.java:2070)
   [runcts] OUT => [javatest.batch] Caused by: java.lang.ClassNotFoundException: org.glassfish.appclient.client.acc.agent.ACCAgentClassLoader
   [runcts] OUT => [javatest.batch]     at jdk.internal.loader.BuiltinClassLoader.loadClass(java.base@11.0.7/BuiltinClassLoader.java:581)
   [runcts] OUT => [javatest.batch]     at jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(java.base@11.0.7/ClassLoaders.java:178)
   [runcts] OUT => [javatest.batch]     at java.lang.ClassLoader.loadClass(java.base@11.0.7/ClassLoader.java:521)
   [runcts] OUT => [javatest.batch]     at java.lang.Class.forName0(java.base@11.0.7/Native Method)
   [runcts] OUT => [javatest.batch]     at java.lang.Class.forName(java.base@11.0.7/Class.java:398)
   [runcts] OUT => [javatest.batch]     at java.lang.ClassLoader.initSystemClassLoader(java.base@11.0.7/ClassLoader.java:1975)
   [runcts] OUT => [javatest.batch]     at java.lang.System.initPhase3(java.base@11.0.7/System.java:2070)
   [runcts] OUT => [javatest.batch]
"

The test results that contain ^ are at https://ci.eclipse.org/jakartaee-tck/job/jakartaee-tck/job/master/1239/artifact/ejb30_assembly-results.tar.gz

Thanks,

Scott


_______________________________________________
glassfish-dev mailing list
glassfish-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/glassfish-dev

Back to the top