Question

error data source for pega marketing 8.1 tomcat

Hi,

I am installing Pega Marketing 8.1. I am creating the data source in order to be able to create de database externalmktData.

So to create it, in my context.xml I added the following

  1. <Resource
  2. name="jdbc/mktDataSource" auth="Container"
  3. type="javax.sql.DataSource"
  4. driverClassName="oracle.jdbc.OracleDriver"
  5. url="jdbc:oracle:thin:@//xxxxxxxxx:1521/PEGA"
  6. username="APPMKT"
  7. password=xxxxxxxxx
  8. maxTotal="100"
  9. maxIdle="30"
  10. maxWaitMillis="10000"
  11.  
  12. />
  13.  
  14. <Environment
  15. name="prconfig/database/databases/mktDataSource/dataSource"
  16. value="java:comp/env/jdbc/mktDataSource"
  17. type="java.lang.String"
  18. />
  19.  
  20. <Environment
  21. name="prconfig/database/databases/mktDataSource/defaultSchema"
  22. value="APPMKT"
  23. type="java.lang.String"
  24. />

but when I create the database ExternalMKTData i get this error

  1. The JNDI name of the Data Source used to connect to this DB—
  2. The DataSource jdbc/mktDataSource is invalid: Unable to obtain DataSource object: code: <none> SQLState: Name [jdbc/mktDataSource] is not bound in this Context. Unable to find [jdbc]. Message: <none>
  3. DatabaseException caused by prior exception: javax.naming.NameNotFoundException: Name [jdbc/mktDataSource] is not bound in this Context. Unable to find [jdbc].
  4.  
  5. The DataSource jdbc/mktDataSource is invalid: A connection could not be obtained.

can anyone help me? I am more use to use weblogic as a app server, but it seems to have an error with pega 8.1

thank you

**Moderation Team has archived post**

This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.

Comments

Keep up to date on this post and subscribe to comments

Pega
November 18, 2018 - 4:31am

Hi Alvaro,

Can you please add "/" before "comp" in JNDI Name and check whether you are able to connect to the Data source as required. Please refer to the below links for reference. 

https://community.pega.com/support/support-articles/javaxnamingnamenotfound-exception-db-connection-pool

https://tomcat.apache.org/tomcat-7.0-doc/jndi-datasource-examples-howto.html 

 

November 19, 2018 - 3:45am

Hi,

 thank you for your response.

I have tried but not luck yet

is it not supposed to be the same that pegaRules and PegaData??

November 19, 2018 - 4:31am

I am using tomcat 9 by the way

November 19, 2018 - 5:15am

I have tried to add this inside the prweb/WEB-INF/web.xml

  1. <resource-ref id="ResourceRef_10">
  2. <description>ExternalMKTData datasource</description>
  3. <res-ref-name>jdbc/mktDataSource</res-ref-name>
  4. <res-type>javax.sql.DataSource</res-type>
  5. <res-auth>Container</res-auth>
  6. <res-sharing-scope>Shareable</res-sharing-scope> <!-- Shareable is default -->
  7. </resource-ref>

but I am still getting the same error :(

Pega
November 20, 2018 - 7:31am

What type of connection are use using on the ExternalMKTData DB rule?

At this time Pega Marketing does not use the defaultSchema property - the DB user that is used to connect must have the correct schema as its default.

November 20, 2018 - 8:23am
Response to WINKM

I am using "use JDBC Connection pool" and then I put the jdbc/mktdatasource inside JDBC DataSource Settings>JNDI name