Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-21248

Quickstarts: Document JNDI lookup warning from WildFly Glow in affected quickstarts

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 39.0.0.Beta1
    • Quickstarts
    • None
    • ---
    • ---

      Problem

      When running mvn clean package on several quickstarts, users see the following warning from WildFly Glow:

      [WARNING] * jakarta.naming.Context or InitialContext lookup. Enable verbose output to see the locations.
      

      This warning appears because Glow scans the source code for JNDI lookups (InitialContext, Context.lookup) but cannot statically determine which server layers are needed at runtime.

      Affected Quickstarts

      The following quickstarts use JNDI lookup and WildFly Glow (discover-provisioning-info):

      Quickstart Has pom.xml comment Has failsOnError=false Mentioned in README
      ejb-security-programmatic-auth
      ejb-txn-remote-call
      ejb-security-context-propagation
      ejb-remote
      helloworld-jms
      thread-racing

      Note: ejb-multi-server also has JNDI lookups but does not use Glow (no discover-provisioning-info), so it is not affected.

      Suggested Changes

      For each affected quickstart:
      Add comment in pom.xml explaining the JNDI lookup warning (in [discover-provisioning-info] section):

      [!--
          The src code contains JNDI lookups resulting in Glow
          failures
      --]
      [failsOnError]false[/failsOnError]
      

      2. Add section in README explaining the warning to developers, for example:

      == Known Build Warnings
      
      When building this quickstart, you may see the following warning:
      
      [WARNING] * jakarta.naming.Context or InitialContext lookup.
      
      This is expected. The quickstart uses JNDI lookups for remote EJB/JMS access, 
      and WildFly Glow cannot statically analyze these lookups. The warning can be safely ignored.
      

      Files with JNDI lookups

      • ejb-security-context-propagation: SecurityContextPropagationIT.java (test)
      • ejb-remote: EJBRemoteIT.java (test)
      • helloworld-jms: HelloWorldJMSClientIT.java (test)
      • thread-racing: EEConcurrencyRaceStage.java (main)
      • ejb-security-programmatic-auth: RemoteClient.java (main)
      • ejb-txn-remote-call: RemoteBeanCaller.java, RemoteLookupHelper.java, InfoUtils.java (main)

              emartins@redhat.com Eduardo Martins
              rhn-support-kstekovi Krystof Stekovic
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: