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: "Steve Millidge (Payara)" <steve.millidge@xxxxxxxxxxx>
  • Date: Thu, 25 Feb 2021 07:51:44 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=payara.fish; dmarc=pass action=none header.from=payara.fish; dkim=pass header.d=payara.fish; 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=qwv142DQhrA7NgRwnhtQk8SqQUNJ4GhsLd/sjA+QjoE=; b=aaxhpO+CsrvmRNwYyJBUbMxsFP2vapw8gwLzRgrnsXFSMvJckQe00CuLVjD7GhnExigQ/IvzXY77kT1V263uF++ea59RzaPDcmPYmON0dXSpKifLr+1L5EV0DwUG1un6FBOz4Zuliz20DDSvoG7q/ABafE60xiqMv6GSEGMTlg7zSzroqGBjf7XoQAjGiM5OsRjY9IuMsVWLscLLTGrPEkIdbVxk8paMAICXr1w7XcS9XszbivPsAokmJNKIUYZnira8Ko4ybXNMUWCFQYwnJG5DhJnjjo+OXnvmKzU7fY0zNa5GrWecNlfYmN2POQ1PiabAxlNO6+MmwRx5qmSquQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bno70Wh6fJXZ9cvNKEHtRIDune2zc3mthsjW/eCd5kpyJrHbaGySjeL6aMtclmmc76j6tFAtsDCXWVz0tMtzSip0WdidDy6lWxemi9gfwGWXRCMV19T04+9E8DhLZhgjbZ3GmD3ViDetJnU7kTCSxxD4UxQqiItpxupif3MbOfBFblHuxXemu7250WZTjDSkPezAfiLfWGSdYbDVn3MQO+iWOEgTG2u6B8iDlHN/abZB4tgiuNIzdKfuU0SXUechI8702FV6ttEeomQTWwt/uQgo7K50QKKqHpLc+FcjP0wDZg5wxWkagY2PLkMIW0FD2/JPU3bdvOpcgI/StU/IKA==
  • Delivered-to: glassfish-dev@xxxxxxxxxxx
  • 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: AQHXCsPwp+mcJDZqN0ykxZgpIbf2A6pnfgqAgACugQCAAFPK0g==
  • Thread-topic: [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


Back to the top