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?
  • From: "sawamura.hiroki@xxxxxxxxxxx" <sawamura.hiroki@xxxxxxxxxxx>
  • Date: Thu, 25 Feb 2021 03:00:03 +0000
  • Accept-language: ja-JP, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=fujitsu.com; dmarc=pass action=none header.from=fujitsu.com; dkim=pass header.d=fujitsu.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=EkPN2nGbYexw1S+CD2GN01JNWNzg1CKTFkn+3MKR6eQ=; b=lYflpmZUUhZ1E1JqirduHS02YV0VHLAMnwpnL3HeivBmnrSe7b5Z28tNK6o+j729TPM1e6LpaewBp6Rta6qmgF6PtJbvxOzdpC/tzRHF+RFA8BUSdsM9NeYp/pDqt7rX5cN4Af+S3zv8kNTqLUdHjggNHjlrS3vtAkQ3+q4M2FjLkNSav8E90wLAd/CwVkSMlr71YnRHf6yTRiJXzFvN53iDG4yRdkBvP5R+ODufy+89C5NHxmnB9+Bn05szXDIZJ+fcxZkpVJnHRgRb2MOt/iRdrGj93rduDgO2FFtaAnp2c4w3XPhdl6e7r23d5Ebq9fj1iHMMaAtGFa1JN2Cw9g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TgjcGk9wumhFMAzYz6qZaI8/YsZcMiHOezJ4chQP7UUgQhYAPfLUKQvRt8D/gKaE1x2dYw8pejGROqkCJhdNdFJVDBvlUeRqlCQ7JvIaJPenb2uVudAR6i1RVBTkh0IGYyTTajO710H/i25EO9XXZ6Zi5dTkrecMgoLOULYKHoCKbuvMdurOHbXrAbQfEf4JE8m+DFQoTqWl0N8oeUiWRPJPpwIA4zB9QxvjrahaFA3zIUbh9EQkd+QhetvOcJdD+mnsMQSQ0iWdk+ke5TnlY/A5e61mvrZqAX5Wh/XPMr44Gzmxdj3hyTDkZqIQnlquSwtwMnu3ZIwnHyxiFD+LBg==
  • Delivered-to: glassfish-dev@xxxxxxxxxxx
  • Ironport-sdr: WPjskSQTfioHXk/dKpTc1qz2fD7kNgmtA3oj1EstCeA1AcUe9dod2cUgrC9xncU4qHNNVLGzFQ fqzDZLCOcJ+yel9rQEPPZsMlsFY9jVTk8Repu5reqi0y4ORMI7ylPFJFfglodu67KCxIJ2InNh 40IbW9j4Z+0uo2I6ALcks7aaKxhFDw5IXaUt8wX15/hAo+gXcUiQFCA1ElzwzTqe+aTQnBTeZJ xS9h4QrdR6Ko4H5Ay9MW8D6dmRY/nVM6HVAwG2m0/99qe28O58GEFdN3PA2j4fZ7ufKSJPLF/I HTY=
  • List-archive: <https://www.eclipse.org/mailman/private/glassfish-dev/>
  • List-help: <mailto:glassfish-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/glassfish-dev>, <mailto:glassfish-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/glassfish-dev>, <mailto:glassfish-dev-request@eclipse.org?subject=unsubscribe>
  • Thread-index: AQHXCsPx2eY5OJKyrUq0qiKkHeMNEKpnfgqAgACugQA=
  • Thread-topic: [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


Back to the top