Question

5
Replies
1629
Views
Senthil Kumar Mahalingam (_SENTHILM)
Express Scripts
Sr. Software Engineer
Express Scripts
US
_SENTHILM Member since 2010 3 posts
Express Scripts
Posted: May 8, 2017
Last activity: August 1, 2017
Posted: 8 May 2017 9:53 EDT
Last activity: 1 Aug 2017 21:57 EDT
Closed
Solved

Pega 7.2.2 integration with External database in Tomcat 7.0.69 - Linux - jdbc/DBNAME JNDI not bound error

Does any one faced similar issue during External database integration using connection pool configuration in Tomcat 7.0.69 - Linux. Any suggestion?


1) Added Resource in tomcat conf Context.xml file


<Context ...>

...

<Resource name="jdbc/EmployeeDB"

auth="Container"

type="javax.sql.DataSource"

username="dbusername"

password="dbpassword"

driverClassName="org.hsql.jdbcDriver"

url="jdbc:HypersonicSQL:database"

maxActive="8"

maxIdle="4"/>

...

</Context>


2) prweb.war - web.xml - Added resource reference.


<resource-ref>

<description>

EmpDB mapping

</description>

<res-ref-name>

jdbc/EmployeeDB

</res-ref-name>

<res-type>

javax.sql.DataSource

</res-type>

<res-auth>

Container

</res-auth>

</resource-ref>


3) Created a Database rule and mapped to Use Connection Pool option and used jdbc/EmployeeDB


We are getting the following error during test connection from the database configuration rule in Pega UI.


The DataSource jdbc/EmployeeDBis invalid: Unable to obtain DataSource object: code: <none> SQLState: Name [jdbc/EmployeeDB] is not bound in this Context. Unable to find [jdbc]. Message: <none>

DatabaseException caused by prior exception: javax.naming.NameNotFoundException: Name [jdbc/EmployeeDB] is not bound in this Context. Unable to find [jdbc].

Does any one faced similar issue during External database integration using connection pool configuration in Tomcat 7.0.69 - Linux. Any suggestion?

1) Added Resource in tomcat conf Context.xml file

<Context ...>
...
<Resource name="jdbc/EmployeeDB"
auth="Container"
type="javax.sql.DataSource"
username="dbusername"
password="dbpassword"
driverClassName="org.hsql.jdbcDriver"
url="jdbc:HypersonicSQL:database"
maxActive="8"
maxIdle="4"/>
...
</Context>

2) prweb.war - web.xml - Added resource reference.

<resource-ref>
<description>
EmpDB mapping
</description>
<res-ref-name>
jdbc/EmployeeDB
</res-ref-name>
<res-type>
javax.sql.DataSource
</res-type>
<res-auth>
Container
</res-auth>
</resource-ref>

3) Created a Database rule and mapped to Use Connection Pool option and used jdbc/EmployeeDB

We are getting the following error during test connection from the database configuration rule in Pega UI.

The DataSource jdbc/EmployeeDBis invalid: Unable to obtain DataSource object: code: <none> SQLState: Name [jdbc/EmployeeDB] is not bound in this Context. Unable to find [jdbc]. Message: <none>
DatabaseException caused by prior exception: javax.naming.NameNotFoundException: Name [jdbc/EmployeeDB] is not bound in this Context. Unable to find [jdbc].

***Edited 5/19/17 by Moderator, Maryrita: moved to PSC from Upgrade Center***

Data Integration
Moderation Team has archived post, This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question.