Failed to create table for this segment
Pega 7.3.1 is installed on WebSphere Application Server (WAS) Liberty server.
Pega Marketing is installed on the application.
Error occurs when the 'Use configuration in preferences' option in the ExternalMKT database setting is selected to create a segment.
Error in the UI:
Failed to create table for this segment.
Error in the PegaRULES log file:
egamkt_engine_pegamktutilities) ERROR - Cannot get DB connection using JNDI lookup javax.naming.NamingException: CWNEN1000E: A JNDI operation on a java:comp/env name cannot be completed because the current thread is not associated with a Java Enterprise Edition application component. This condition can occur when the JNDI client using the java:comp/env name does not occur on the thread of a server application request. Make sure that a Java EE application does not run JNDI operations on java:comp/env names within static code blocks or in threads created by that application. Such code does not necessarily run on the thread of a server application request and therefore is not supported by JNDI operations on java:comp/env names.
Steps to Reproduce
- Stop the Liberty Server.
- Define the jndi/mktDatasource settings in the Liberty profile server.xml file.
- In the prconfig.xml file define the Java Naming and Directory Interface (JNDI) settings as below,
<env name="database/databases/ExternalMKTData/dataSource" value="jdbc/mktDataSource"/>
- Verify the below Pega out-of-the-box Dynamic System Settings (DSS) rule and retain the default.
- Start the server.
- Log in to the application.
- Open the ExternalMKT Data-Admin-DB-Name rule.
- Configure it to use 'Use configuration in preferences' and save it.
- Log in to the Pega Marketing portal.
- Create an audience (segment rule).
The mktDatasource fetches the DSS value when 'Use configuration in preferences' is selected.
The error occurs due mismatch of the prconfig.xml and DSS values.
It is recommended to use JDBC Pool connection.
For information about the usage of JDBC Pool Connection, refer to: https://community1.pega.com/sites/pdn.pega.com/files/help_v731/procomhelpmain.htm#data-/data-admin-/data-admin-db-/data-admin-db-name/database.htm
Perform the following local-change to maintain the prconfig.xml file:
- Edit the DSS.
- Set the value to jndi/mktDatasource instead of java:comp/jndi/mktDatasource
0% found this useful