You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GlassFish Version (and build number): 8.0.0-JDK17-M7
JDK version: Temurin-17.0.4.1+1
OS: macos 12.7.6
Problem Description
The https://github.com/jakartaredhat/gf-appclient-jndi.git has an appclient that accesses a remote ejb using jndi. The reference to the ejb is specfified via the application-client.xml ejb-ref/ejb-link. The test launches the appclient using the target/glassfish8/glassfish/bin/appclient script and the unpackaged test ear contents. This mimics what is done in the EE platform tck appclient tests.
This fails with a jndi look up error that indicates although the ejb is found, the jndi name that is associated with the java:comp/env/ejb/StatelessVehicleBean local binding is "#ejb.VehicleIF" rather than the full name of "ejb_vehicle_StatelessVehicleBean#ejb.VehicleIF" as indicated in the server.log.
There is a target/appclient-0.log produced by running the test. The following can be found in that log:
[2024-11-20 08:52:05] F org.glassfish.naming Clearing map of proxies: {}
[2024-11-20 08:52:05] F com.sun.enterprise.naming.impl.JavaURLContext lookup(name=java:comp/env/ejb/StatelessVehicleBean); this=JavaURLContext[]
[2024-11-20 08:52:05] F com.sun.enterprise.naming.impl.JavaURLContext Computed fullname=java:comp/env/ejb/StatelessVehicleBean for name=java:comp/env/ejb/StatelessVehicleBean
[2024-11-20 08:52:05] F com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl lookup(componentId=client_stateless_vehicle_client_client.RemoteEjbClient, name=java:comp/env/ejb/StatelessVehicleBean, ctx=javax.naming.InitialContext@1f3165e7)
[2024-11-20 08:52:05] F com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl Found componentIdInfo=ComponentIdInfo[appName=jpa_core_EntityGraph_vehicle_client, module=jpa_core_EntityGraph_vehicle_client, componentId=client_stateless_vehicle_client_client.RemoteEjbClient, treatComponentAsModule=false]
[2024-11-20 08:52:05] F com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl getNamespace(info, logicalJndiName=java:comp/env/ejb/StatelessVehicleBean)
[2024-11-20 08:52:05] F com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl For java:comp/env/ejb/StatelessVehicleBean found object=com.sun.enterprise.container.common.impl.ComponentEnvManagerImpl$EjbReferenceProxy@150ede8b in namespace.name=client_stateless_vehicle_client_client.RemoteEjbClient
[2024-11-20 08:52:05] C com.sun.logging.LogDomains Registered new logger: com.sun.logging.LogDomainsLogger@26221bad[name=jakarta.enterprise.system.container.ejb.com.sun.ejb, level=null, bundleName=com.sun.logging.enterprise.system.container.ejb.LogStrings]
[2024-11-20 08:52:05] F org.glassfish.common.util.GlassfishUrlClassLoader loadClass(name=ejb.VehicleIF, resolve=false)
[2024-11-20 08:52:05] F org.glassfish.naming lookup(name=#ejb.VehicleIF level=0)
ejb-link can only access the EJB in the same application[*]. ejb-link can reference another JAR using #, but that JAR must reside within the same application (within the EAR file).
*) Eclipse GlassFish Application Development Guide
"""
4. Deploy the calling application.
The calling EJB or web component must specify in its glassfish-ejb-jar.xml or glassfish-web.xml file the JNDI name of the EJB component in the dependent application. Using an ejb-link mapping does not work when the EJB component being called resides in another application.
"""
As an alternative to using <lookup-name> mentioned in the original issue, there is <mapped-name> for resolving jndi names.
Environment Details
Problem Description
The https://github.com/jakartaredhat/gf-appclient-jndi.git has an appclient that accesses a remote ejb using jndi. The reference to the ejb is specfified via the application-client.xml ejb-ref/ejb-link. The test launches the appclient using the target/glassfish8/glassfish/bin/appclient script and the unpackaged test ear contents. This mimics what is done in the EE platform tck appclient tests.
This fails with a jndi look up error that indicates although the ejb is found, the jndi name that is associated with the java:comp/env/ejb/StatelessVehicleBean local binding is "#ejb.VehicleIF" rather than the full name of "ejb_vehicle_StatelessVehicleBean#ejb.VehicleIF" as indicated in the server.log.
There is a target/appclient-0.log produced by running the test. The following can be found in that log:
Steps to reproduce
Impact of Issue
This is a current block in the JPA platform tests that use an appclient vehicle
The text was updated successfully, but these errors were encountered: