Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [glassfish-dev] [External] : Re: Any idea why on Java 11 the GlassFish Client Container might be failing to see the Client Container classloader?
  • From: Lukas Jungmann <lukas.jungmann@xxxxxxxxxx>
  • Date: Fri, 5 Mar 2021 20:28:07 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.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=DySCnVfVhxo8ZFvGO0ZnzML4tNjOhlo4dZ0FS2vAW0c=; b=kNnQmpKYSHY4omLyTinnNq53SJCryXA7AJKttTqN0IQxt9F47ujivxlIuK/A+rjZsbsRU+XyWx9XJ7EgdyK6z5VNPvr4tvPVncFJgTg59atrLglfksdeQPR1UUu67LWvxCBtLXsduaLqagHwuvHJvP2qYPnteJHLQMJdv6+JZCJj6hG0yUvBdRYhPDnoYnIE6f+l5wE3n1rOhsfbf2qcIhl4gdPoSivOnvsTdaEi7wa8WC3WS/kXpoGnohlW2HaXWmQHHsQdVpPwmmckIw091FEu82pOd1akN5UOihMSO0+92e+tk43DUOWb3OzToV/KLZjve3OJ0piUBX20GjaRow==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FUQkAtv13TC5zXrWEmpb1ZNpAHKJt2HLvqaNJ02FC/Ifjx2uoUMFBGw2wx72buBEzlLL60aAm6dnKAafkklQkh9tgvpZ7E5P5/1ekPPpoiITlTZnwTgJXZ7WnoiGM+/Azuk1CH6aQFhwUW+txsP+2HNaR1G6OPhUXht8x9P0Suf/Zy3E/1XSWUEUkhNKn7V1XtW71cgm9xeF3CQkrCdB9YsJvOyAy6MkEVxaM4z0hNirsHUekpMirI8TeGBxDopRIUt6NDBN9nhOboSk/hB5ERPNkdI/i/GVIr23z8QZLls+ZsOiNHLhOmQUd2CQ8cnCHLKkkiNvkFnr7KHrS2cJjg==
  • 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: AQHXEd+oAdAlUE/ySU+b50C/vzxKn6p1wTIAgAAVFhw=
  • Thread-topic: [External] : Re: [glassfish-dev] Any idea why on Java 11 the GlassFish Client Container might be failing to see the Client Container classloader?

Hi,


> If you have deployed the counterpart EJB module (or the entire ear) to GlassFish the above should just run.  When you remove the -classpath entry and specify simple-ejb-implicit-cdiAppClient.jar as the -jar argument, you should be able to reproduce the class not found exception.


This is obvious, even though not documented in 'java -help'; 'man java' says: "When you use the -jar option, the specified JAR file is the source of all user classes, and other class path settings are ignored.". So I guess the problem lies either in 'simple-ejb-implicit-cdiAppClient.jar's manifest file (check Class-Path entry there) or in missing app client classes in that jar. It would probably help to compare current jar with the one from some older, known to run, version.

thanks,
--lukas 



Hope that helps.

Kind regards,
Arjan Tijms





From: glassfish-dev <glassfish-dev-bounces@xxxxxxxxxxx<mailto:glassfish-dev-bounces@xxxxxxxxxxx>> On Behalf Of Scott Marlow
Sent: 05 March 2021 16:13
To: arjan tijms <arjan.tijms@xxxxxxxxx<mailto:arjan.tijms@xxxxxxxxx>>; glassfish developer discussions <glassfish-dev@xxxxxxxxxxx<mailto: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?


All,

We tried the suggestion via https://github.com/alwin-joseph/jakartaee-tck/tree/gfclientjar_issue<https://urldefense.com/v3/__https://github.com/alwin-joseph/jakartaee-tck/tree/gfclientjar_issue__;!!GqivPVa7Brio!Ln9SImz_VcFzDScbgAMU5vTDn_tt8Gf2XqihYtCkMRLdxd6TgbNSvayEFqZV_0ky1ek$> but as you all saw on the issue, that didn't help as we don't have the options correct (as per the "Unrecognized option: -Xt" + "Could not create the Java Virtual Machine" messages).

Who can clone the https://github.com/alwin-joseph/jakartaee-tck/tree/gfclientjar_issue<https://urldefense.com/v3/__https://github.com/alwin-joseph/jakartaee-tck/tree/gfclientjar_issue__;!!GqivPVa7Brio!Ln9SImz_VcFzDScbgAMU5vTDn_tt8Gf2XqihYtCkMRLdxd6TgbNSvayEFqZV_0ky1ek$> branch and revise the changes to work correctly?  All that you have to do is push your change to your github repo and respond here with the link to your "might possibly help" change and we will build the TCK with your change for you and run some tests.  We will do the building/testing on Jenkins.

Any volunteers to work on this?

Scott
On 2/28/21 10:53 AM, arjan tijms wrote:
Hi,

I think the fix may be that for the TCK execution string, -classpath should be added and -jar removed. -classpath should contain both the jar entry that's now in -jar as well as the full path to gf-client.jar. (/root/vi/glassfish6/glassfish/lib/gf-client.jar in this example).

Not entirely sure where the java command got the correct classpath entry from before, maybe it piggybacked on the agent, which happens to be the same jar, and this has now changed in JDK11?

Additionally, the command string as posted by Scott contains a "-t" option. I'm not sure that is anything that is supported, or even what it's supposed to be. It may have to be removed as well.

Kind regards,
Arjan Tijms





On Sat, Feb 27, 2021 at 4:19 PM arjan tijms <arjan.tijms@xxxxxxxxx<mailto:arjan.tijms@xxxxxxxxx>> wrote:
p.p.s

CLIBootstrap just generates a string with a command to execute, so the final command is:

/Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home//bin/java
    -Dcom.sun.aas.installRoot=/workspace/glassfish/glassfish6/glassfish/bin/
    -Djava.security.policy=/workspace/glassfish/glassfish6/glassfish/lib/appclient/client.policy
    -Djava.security.auth.login.config=/workspace/glassfish/glassfish6/glassfish/lib/appclient/appclientlogin.conf
    -Djava.system.class.loader=org.glassfish.appclient.client.acc.agent.ACCAgentClassLoader

    -javaagent:"/workspace/glassfish/glassfish6/glassfish/lib/gf-client.jar"=argsfile="/var/folders/47/ntsw6chs7jg874_8nk_w37_00000gn/T/acc13024400471617066333.dat"

    -classpath /workspace/glassfish/glassfish6/glassfish/lib/gf-client.jar:/workspace/glassfish/appserver/tests/appserv-tests/build/module/archive/simple-ejb-implicit-cdiAppClient.jar

    org.glassfish.appclient.client.AppClientGroupFacade



Comparing that again to the slightly reformatted command from the TCK:


/opt/jdk-11.0.7/bin/java

    -Dcom.sun.aas.installRoot=/root/vi/glassfish6/glassfish

    -Djava.security.policy=/root/vi/glassfish6/glassfish/lib/appclient/client.policy

    -Djava.security.auth.login.config=/root/vi/glassfish6/glassfish/lib/appclient/appclientlogin.conf

    -Djava.system.class.loader=org.glassfish.appclient.client.acc.agent.ACCAgentClassLoader





    -Dcts.tmp=/root/jakartaeetck/bin/xml/../../tmp

    -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.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/tmp/appclient/s1as.sun-acc.xml,client=jar=/root/jakartaeetck/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/dist/com/sun/ts/tests/ejb30/assembly/librarydirectory/custom/ts_dep/ejb3_assembly_librarydirectory_customClient.jar

     -p /root/jakartaeetck/tmp/tstest.jte

     -t libDirNotUsed




On Sat, Feb 27, 2021 at 1:09 PM arjan tijms <arjan.tijms@xxxxxxxxx<mailto:arjan.tijms@xxxxxxxxx>> wrote:
P.s. since /bin/appclient is a script, the actual java command executed is:

/Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home//bin/java
   -Dorg.glassfish.appclient.shell
   -classpath /workspace/glassfish/glassfish6/glassfish/lib/gf-client.jar

   org.glassfish.appclient.client.CLIBootstrap

   -client /workspace/glassfish/appserver/tests/appserv-tests/build/module/archive/simple-ejb-cdiAppClient.jar
   -name simple-ejb-cdiClient
   -textauth
   -user j2ee
   -password j2ee
   -xml /workspace/glassfish/glassfish6/glassfish/domains/domain1/config/glassfish-acc.xml

On Sat, Feb 27, 2021 at 12:52 PM arjan tijms <arjan.tijms@xxxxxxxxx<mailto:arjan.tijms@xxxxxxxxx>> wrote:
Hi,

The application client container is used among others in this test: /appserver/tests/appserv-tests/devtests/cdi/implicit/simple-ejb-cdi

That one does pass. The execution method is a little bit different though.

The TCK uses (formatted:

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/lib/tsharness.jar:/root/jakartaeetck/lib/cts.jar:/root/vi/glassfish6/glassfish/lib/jpa_alternate_provider.jar:/root/jakartaeetck/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/tmp/appclient/s1as.sun-acc.xml,client=jar=/root/jakartaeetck/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/dist/com/sun/ts/tests/ejb30/assembly/librarydirectory/custom/ts_dep/ejb3_assembly_librarydirectory_customClient.jar
     -p /root/jakartaeetck/tmp/tstest.jte
     -t libDirNotUsed


While the test uses:

/workspace/glassfish/glassfish6/glassfish/bin/appclient
    -client /workspace/glassfish/appserver/tests/appserv-tests/build/module/archive/simple-ejb-cdiAppClient.jar
    -name simple-ejb-cdiClient
    -textauth
    -user j2ee
    -password j2ee
    -xml /workspace/glassfish/glassfish6/glassfish/domains/domain1/config/glassfish-acc.xml


With as output:

     [exec] Feb 27, 2021 12:40:12 PM org.glassfish.appclient.client.acc.AppclientCommandArguments warnAboutPasswordUsage
     [exec] WARNING: ACC013: The -password option is deprecated and will likely be removed in a future release.  Please use -passwordfile or let the app client container prompt for the username and/or password if they are needed to access a remote resource.

     [exec] WARNING: An illegal reflective access operation has occurred
     [exec] WARNING: Illegal reflective access by org.glassfish.appclient.client.acc.ACCClassLoader (file:/workspace/glassfish/glassfish6/glassfish/modules/gf-client-module.jar) to field java.lang.ClassLoader.parent
     [exec] WARNING: Please consider reporting this to the maintainers of org.glassfish.appclient.client.acc.ACCClassLoader
     [exec] WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
     [exec] WARNING: All illegal access operations will be denied in a future release

     [exec] Feb 27, 2021 12:40:12 PM org.glassfish.appclient.client.acc.FacadeLaunchable selectFacadeFromGroup
     [exec] WARNING: ACC001: Using the only client [simple-ejb-cdi-client] with main class [com.sun.s1asdev.cdi.ejb.hello.session.client.Client] in file:/workspace/glassfish/appserver/tests/appserv-tests/build/module/archive/simple-ejb-cdiAppClient.jar even though it does not match the specified main class name null or client name simple-ejb-cdiClient

     [exec] Creating InitialContext()

From the warning we can see that ACCClassLoader is used in the case of the test.

Hope this can help somewhat.

Kind regards,
Arjan






On Thu, Feb 25, 2021 at 11:07 PM Scott Marlow <smarlow@xxxxxxxxxx<mailto:smarlow@xxxxxxxxxx>> wrote:


On 2/25/21 4:43 AM, sawamura.hiroki@xxxxxxxxxxx<mailto: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/<https://urldefense.com/v3/__https://ci.eclipse.org/jakartaee-tck/job/build-glassfish/__;!!GqivPVa7Brio!Ln9SImz_VcFzDScbgAMU5vTDn_tt8Gf2XqihYtCkMRLdxd6TgbNSvayEFqZVhuByJuQ$> 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><mailto: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><mailto: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><mailto: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
Get Outlook for Android<https://urldefense.com/v3/__https://aka.ms/ghei36__;!!GqivPVa7Brio!Ln9SImz_VcFzDScbgAMU5vTDn_tt8Gf2XqihYtCkMRLdxd6TgbNSvayEFqZVr4KNMJs$>

________________________________
From: glassfish-dev <glassfish-dev-bounces@xxxxxxxxxxx<mailto:glassfish-dev-bounces@xxxxxxxxxxx>> on behalf of sawamura.hiroki@xxxxxxxxxxx<mailto:sawamura.hiroki@xxxxxxxxxxx> <sawamura.hiroki@xxxxxxxxxxx<mailto:sawamura.hiroki@xxxxxxxxxxx>>
Sent: Thursday, February 25, 2021 3:00:03 AM
To: glassfish developer discussions <glassfish-dev@xxxxxxxxxxx<mailto: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<https://urldefense.com/v3/__https://github.com/eclipse-ee4j/glassfish/commit/00f315f845b82c8b9bd0291f72de706eed515b0f__;!!GqivPVa7Brio!Ln9SImz_VcFzDScbgAMU5vTDn_tt8Gf2XqihYtCkMRLdxd6TgbNSvayEFqZV2d3WhoQ$>



Regards

Hiroki



From: Steve Millidge (Payara) <steve.millidge@xxxxxxxxxxx<mailto:steve.millidge@xxxxxxxxxxx>>
Sent: Thursday, February 25, 2021 1:26 AM
To: glassfish developer discussions <glassfish-dev@xxxxxxxxxxx<mailto:glassfish-dev@xxxxxxxxxxx>>; Sawamura, Hiroki/澤村 大輝 <sawamura.hiroki@xxxxxxxxxxx<mailto: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<mailto:sawamura.hiroki@xxxxxxxxxxx> may know more as he did this commit Revert "Remove ACCAgentClassLoader from system.class.loader" · eclipse-ee4j/glassfish@4792b49 (github.com)<https://urldefense.com/v3/__https://github.com/eclipse-ee4j/glassfish/commit/4792b49a7f34f4f3cf3562c5f240eb18127214e4*diff-c392a3897824470514905ac094e9f8a6a244ee938b1928c2caf6326176ad9bc9__;Iw!!GqivPVa7Brio!Ln9SImz_VcFzDScbgAMU5vTDn_tt8Gf2XqihYtCkMRLdxd6TgbNSvayEFqZVDzEniY0$>



From: glassfish-dev <glassfish-dev-bounces@xxxxxxxxxxx<mailto:glassfish-dev-bounces@xxxxxxxxxxx>> On Behalf Of Scott Marlow
Sent: 24 February 2021 15:44
To: glassfish developer discussions <glassfish-dev@xxxxxxxxxxx<mailto: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<https://urldefense.com/v3/__https://github.com/eclipse-ee4j/jakartaee-tck/blob/master/install/jakartaee/bin/ts.jte.jdk11*L1204__;Iw!!GqivPVa7Brio!Ln9SImz_VcFzDScbgAMU5vTDn_tt8Gf2XqihYtCkMRLdxd6TgbNSvayEFqZV6jUGnRk$>

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<mailto: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<mailto: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<mailto: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<mailto: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<mailto:java.base@11.0.7/ClassLoader.java:521>)
   [runcts] OUT => [javatest.batch]     at java.lang.Class.forName0(java.base@11.0.7/Native<mailto:java.base@11.0.7/Native> Method)
   [runcts] OUT => [javatest.batch]     at java.lang.Class.forName(java.base@11.0.7/Class.java:398<mailto: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<mailto: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<mailto: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<https://urldefense.com/v3/__https://ci.eclipse.org/jakartaee-tck/job/jakartaee-tck/job/master/1239/artifact/ejb30_assembly-results.tar.gz__;!!GqivPVa7Brio!Ln9SImz_VcFzDScbgAMU5vTDn_tt8Gf2XqihYtCkMRLdxd6TgbNSvayEFqZV0Yfw270$>

Thanks,

Scott



_______________________________________________

glassfish-dev mailing list

glassfish-dev@xxxxxxxxxxx<mailto:glassfish-dev@xxxxxxxxxxx>

To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/glassfish-dev<https://urldefense.com/v3/__https://www.eclipse.org/mailman/listinfo/glassfish-dev__;!!GqivPVa7Brio!Ln9SImz_VcFzDScbgAMU5vTDn_tt8Gf2XqihYtCkMRLdxd6TgbNSvayEFqZV4zKH6EA$>
_______________________________________________
glassfish-dev mailing list
glassfish-dev@xxxxxxxxxxx<mailto:glassfish-dev@xxxxxxxxxxx>
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/glassfish-dev<https://urldefense.com/v3/__https://www.eclipse.org/mailman/listinfo/glassfish-dev__;!!GqivPVa7Brio!Ln9SImz_VcFzDScbgAMU5vTDn_tt8Gf2XqihYtCkMRLdxd6TgbNSvayEFqZV4zKH6EA$>
_______________________________________________
glassfish-dev mailing list
glassfish-dev@xxxxxxxxxxx<mailto:glassfish-dev@xxxxxxxxxxx>
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/glassfish-dev<https://urldefense.com/v3/__https://www.eclipse.org/mailman/listinfo/glassfish-dev__;!!GqivPVa7Brio!Ln9SImz_VcFzDScbgAMU5vTDn_tt8Gf2XqihYtCkMRLdxd6TgbNSvayEFqZV4zKH6EA$>

Back to the top