Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-14761

WAS Liberty doesn't read JNDI-defined bpm-platform location

    • Icon: Bug Report Bug Report
    • Resolution: Unresolved
    • Icon: L3 - Default L3 - Default
    • None
    • None
    • engine

      Environment (Required on creation):

      WebSphere Liberty 22.0.0.3

      Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket):

      Camunda Platform 7 allows defining a custom location of the bpm-platform.xml configuration file through a JNDI entry with the label java:comp/env/bpm-platform-xml

      Steps to reproduce (Required on creation):

      Define a jndiEntry in the server.xml of the Camunda Platform 7 WAS Liberty installation.

      <jndiEntry jndiName="java:comp/env/bpm-platform-xml" value='"${server.config.dir}/bpm-platform.xml"' />
      
      <enterpriseApplication id="camundaBpmPlatform" 
                       name="camunda-bpm-platform"
                       location="${server.config.dir}/apps/camunda-ibm-websphere-ear-7.18.0-SNAPSHOT.ear" >
              <classloader commonLibraryRef="Camunda"/>
              <ejb-jar-bnd moduleName="camunda-ibm-websphere-service">
                  <session name="EjbBpmPlatformBootstrap">
                      <resource-ref name="java:comp/env/bpm-platform-xml" binding-name="bpm-platform-xml" />
                  </session>
              </ejb-jar-bnd>
          </enterpriseApplication>
      

      The JNDI entry must be added in the ejb-jar-bnd application section (or the ibm-ejb-jar-bnd.xml) to be available through the java:comp/env/ namespace.

      Observed Behavior (Required on creation):

      A NameNotFoundException is thrown when the engine attempts to look-up a JNDI entry called java:comp/env/bpm-platform-xml.

      Expected behavior (Required on creation):

      The JNDI entry is successfully found.

      Root Cause (Required on prioritization):

      Solution Ideas (Optional):

      Hints (optional):

      WAS Liberty had a bug related to comp/env JNDI entries, but it was resolved (ref, ref2).

        This is the controller panel for Smart Panels app

            [CAM-14761] WAS Liberty doesn't read JNDI-defined bpm-platform location

            Nikola Koevski created issue -
            Nikola Koevski made changes -
            Link New: This issue is depended on by CAM-13102 [ CAM-13102 ]
            Nikola Koevski made changes -
            Status Original: Open [ 1 ] New: In Progress [ 3 ]
            Nikola Koevski made changes -
            Description Original: h3. Environment (Required on creation):
            WebSphere Liberty 22.0.0.3
             
            h3. Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket):

            Camunda Platform 7 allows defining a custom location of the {{bpm-platform.xml}} configuration file through a JNDI entry with the label {{java:comp/env/bpm-platform-xml}}
             
            h3. Steps to reproduce (Required on creation):
            Define a {{jndiEntry}} in the {{server.xml}} of the Camunda Platform 7 WAS Liberty installation.
            {code}
            <jndiEntry jndiName="java:comp/env/bpm-platform-xml" value='"${server.config.dir}/bpm-platform.xml"' />

            <enterpriseApplication id="camundaBpmPlatform"
                             name="camunda-bpm-platform"
                             location="${server.config.dir}/apps/camunda-ibm-websphere-ear-7.18.0-SNAPSHOT.ear" >
                    <classloader commonLibraryRef="Camunda"/>
                    <ejb-jar-bnd moduleName="camunda-ibm-websphere-service">
                        <session name="EjbBpmPlatformBootstrap">
                            <resource-ref name="java:comp/env/bpm-platform-xml" binding-name="bpm-platform-xml" />
                            <!-- <resource-env-ref>
                                <description>Camunda Platform configuration location</description>
                                <res-ref-name>bpm-platform-xml</res-ref-name>
                                <res-ref-type>java.lang.String</res-ref-type>
                            </resource-env-ref> -->
                        </session>
                    </ejb-jar-bnd>
                </enterpriseApplication>
            {code}

            h3. Observed Behavior (Required on creation):
            A {{NameNotFoundException}} is thrown when the engine attempts to look-up a JNDI entry called {{java:comp/env/bpm-platform-xml}}.

            h3. Expected behavior (Required on creation):
            The JNDI entry is successfully found.
                
            h3. Root Cause (Required on prioritization):
                
            h3. Solution Ideas (Optional):
                
            h3. Hints (optional):
            WAS Liberty had a bug related to {{comp/env}} JNDI entries, but it was resolved ([ref|https://github.com/OpenLiberty/open-liberty/issues/11044]).
            New: h3. Environment (Required on creation):
            WebSphere Liberty 22.0.0.3
             
            h3. Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket):

            Camunda Platform 7 allows defining a custom location of the {{bpm-platform.xml}} configuration file through a JNDI entry with the label {{java:comp/env/bpm-platform-xml}}
             
            h3. Steps to reproduce (Required on creation):
            Define a {{jndiEntry}} in the {{server.xml}} of the Camunda Platform 7 WAS Liberty installation.
            {code}
            <jndiEntry jndiName="java:comp/env/bpm-platform-xml" value='"${server.config.dir}/bpm-platform.xml"' />

            <enterpriseApplication id="camundaBpmPlatform"
                             name="camunda-bpm-platform"
                             location="${server.config.dir}/apps/camunda-ibm-websphere-ear-7.18.0-SNAPSHOT.ear" >
                    <classloader commonLibraryRef="Camunda"/>
                    <ejb-jar-bnd moduleName="camunda-ibm-websphere-service">
                        <session name="EjbBpmPlatformBootstrap">
                            <resource-ref name="java:comp/env/bpm-platform-xml" binding-name="bpm-platform-xml" />
                            <!-- <resource-env-ref>
                                <description>Camunda Platform configuration location</description>
                                <res-ref-name>bpm-platform-xml</res-ref-name>
                                <res-ref-type>java.lang.String</res-ref-type>
                            </resource-env-ref> -->
                        </session>
                    </ejb-jar-bnd>
                </enterpriseApplication>
            {code}

            The JNDI entry must be added in the {{ejb-jar-bnd}} application section (or the ibm-ejb-jar-bnd.xml) to be available through the {{java:comp/env/}} namespace.

            h3. Observed Behavior (Required on creation):
            A {{NameNotFoundException}} is thrown when the engine attempts to look-up a JNDI entry called {{java:comp/env/bpm-platform-xml}}.

            h3. Expected behavior (Required on creation):
            The JNDI entry is successfully found.
                
            h3. Root Cause (Required on prioritization):
                
            h3. Solution Ideas (Optional):
                
            h3. Hints (optional):
            WAS Liberty had a bug related to {{comp/env}} JNDI entries, but it was resolved ([ref|https://github.com/OpenLiberty/open-liberty/issues/11044], [ref2|https://www.ibm.com/support/pages/apar/PI63821]).
            Nikola Koevski made changes -
            Description Original: h3. Environment (Required on creation):
            WebSphere Liberty 22.0.0.3
             
            h3. Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket):

            Camunda Platform 7 allows defining a custom location of the {{bpm-platform.xml}} configuration file through a JNDI entry with the label {{java:comp/env/bpm-platform-xml}}
             
            h3. Steps to reproduce (Required on creation):
            Define a {{jndiEntry}} in the {{server.xml}} of the Camunda Platform 7 WAS Liberty installation.
            {code}
            <jndiEntry jndiName="java:comp/env/bpm-platform-xml" value='"${server.config.dir}/bpm-platform.xml"' />

            <enterpriseApplication id="camundaBpmPlatform"
                             name="camunda-bpm-platform"
                             location="${server.config.dir}/apps/camunda-ibm-websphere-ear-7.18.0-SNAPSHOT.ear" >
                    <classloader commonLibraryRef="Camunda"/>
                    <ejb-jar-bnd moduleName="camunda-ibm-websphere-service">
                        <session name="EjbBpmPlatformBootstrap">
                            <resource-ref name="java:comp/env/bpm-platform-xml" binding-name="bpm-platform-xml" />
                            <!-- <resource-env-ref>
                                <description>Camunda Platform configuration location</description>
                                <res-ref-name>bpm-platform-xml</res-ref-name>
                                <res-ref-type>java.lang.String</res-ref-type>
                            </resource-env-ref> -->
                        </session>
                    </ejb-jar-bnd>
                </enterpriseApplication>
            {code}

            The JNDI entry must be added in the {{ejb-jar-bnd}} application section (or the ibm-ejb-jar-bnd.xml) to be available through the {{java:comp/env/}} namespace.

            h3. Observed Behavior (Required on creation):
            A {{NameNotFoundException}} is thrown when the engine attempts to look-up a JNDI entry called {{java:comp/env/bpm-platform-xml}}.

            h3. Expected behavior (Required on creation):
            The JNDI entry is successfully found.
                
            h3. Root Cause (Required on prioritization):
                
            h3. Solution Ideas (Optional):
                
            h3. Hints (optional):
            WAS Liberty had a bug related to {{comp/env}} JNDI entries, but it was resolved ([ref|https://github.com/OpenLiberty/open-liberty/issues/11044], [ref2|https://www.ibm.com/support/pages/apar/PI63821]).
            New: h3. Environment (Required on creation):
            WebSphere Liberty 22.0.0.3
             
            h3. Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket):

            Camunda Platform 7 allows defining a custom location of the {{bpm-platform.xml}} configuration file through a JNDI entry with the label {{java:comp/env/bpm-platform-xml}}
             
            h3. Steps to reproduce (Required on creation):
            Define a {{jndiEntry}} in the {{server.xml}} of the Camunda Platform 7 WAS Liberty installation.
            {code}
            <jndiEntry jndiName="java:comp/env/bpm-platform-xml" value='"${server.config.dir}/bpm-platform.xml"' />

            <enterpriseApplication id="camundaBpmPlatform"
                             name="camunda-bpm-platform"
                             location="${server.config.dir}/apps/camunda-ibm-websphere-ear-7.18.0-SNAPSHOT.ear" >
                    <classloader commonLibraryRef="Camunda"/>
                    <ejb-jar-bnd moduleName="camunda-ibm-websphere-service">
                        <session name="EjbBpmPlatformBootstrap">
                            <resource-ref name="java:comp/env/bpm-platform-xml" binding-name="bpm-platform-xml" />
                        </session>
                    </ejb-jar-bnd>
                </enterpriseApplication>
            {code}

            The JNDI entry must be added in the {{ejb-jar-bnd}} application section (or the ibm-ejb-jar-bnd.xml) to be available through the {{java:comp/env/}} namespace.

            h3. Observed Behavior (Required on creation):
            A {{NameNotFoundException}} is thrown when the engine attempts to look-up a JNDI entry called {{java:comp/env/bpm-platform-xml}}.

            h3. Expected behavior (Required on creation):
            The JNDI entry is successfully found.
                
            h3. Root Cause (Required on prioritization):
                
            h3. Solution Ideas (Optional):
                
            h3. Hints (optional):
            WAS Liberty had a bug related to {{comp/env}} JNDI entries, but it was resolved ([ref|https://github.com/OpenLiberty/open-liberty/issues/11044], [ref2|https://www.ibm.com/support/pages/apar/PI63821]).

            Nikola Koevski added a comment - - edited

            Internal note:

            • The bpm-platform.xml JNDI entry is java:comp/env/bpm-platform-xml (src). In WebSphere Liberty, JNDI entries in the java:comp/env/ context are not directly available, and a JNDI reference must be made in one of the application's descriptor files (e.g. ibm-ejb-jar-bnd.xml}} (see ref). This should be easily doable through the server.xml using application bindings (see ref) to a WAS Liberty admin.
            • An alternative is to define the system environment variable BPM_PLATFORM_XML in the server.env file.

            Note

            The failure to detect the java:comp/env/bpm-platform-xml JNDI entry is not a bug in Camunda Platform 7. WAS Liberty requires additional configuration to be able to pass JNDI entries in the java:comp/env context. This "additional configuration" is currently not clear.

            We also need to make clear that while Tomcat defines the java:/comp/env/ context, in Liberty it is java:comp/env.

            Nikola Koevski added a comment - - edited Internal note: The bpm-platform.xml JNDI entry is java:comp/env/bpm-platform-xml ( src ). In WebSphere Liberty, JNDI entries in the java:comp/env/ context are not directly available, and a JNDI reference must be made in one of the application's descriptor files (e.g. ibm-ejb-jar-bnd.xml}} (see ref ). This should be easily doable through the server.xml using application bindings (see ref ) to a WAS Liberty admin. An alternative is to define the system environment variable BPM_PLATFORM_XML in the server.env file. Note The failure to detect the java:comp/env/bpm-platform-xml JNDI entry is not a bug in Camunda Platform 7. WAS Liberty requires additional configuration to be able to pass JNDI entries in the java:comp/env context. This "additional configuration" is currently not clear. We also need to make clear that while Tomcat defines the java:/comp/env/ context, in Liberty it is java:comp/env .
            Nikola Koevski made changes -
            Status Original: In Progress [ 3 ] New: Ready [ 10005 ]
            Nikola Koevski made changes -
            Assignee Original: Nikola Koevski [ nikola.koevski ]
            Nikola Koevski made changes -
            Fix Version/s Original: 7.18.0 [ 17394 ]
            Nikola Koevski made changes -
            Link New: This issue is related to CAM-13102 [ CAM-13102 ]

              Unassigned Unassigned
              nikola.koevski Nikola Koevski
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: