Bug 1251658 - tomcat jdbc mongodb driver
Summary: tomcat jdbc mongodb driver
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: ImageStreams
Version: 3.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: kconner
QA Contact: XiuJuan Wang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-08 13:05 UTC by jooho lee
Modified: 2015-11-23 14:44 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-23 14:44:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker CLOUD-201 0 Major Closed connection pool not created for mongo db 2016-01-04 03:37:18 UTC

Description jooho lee 2015-08-08 13:05:53 UTC
Description of problem:
It is script bug in tomcat 7/8.

With /opt/webserver/bin/launch.sh file, you can see this part :
~~~
 if [ "$db" = "MYSQL" ]; then
      driver="com.mysql.jdbc.Driver"
    elif [ "$db" = "POSTGRESQL" ]; then
      driver="org.postgresql.Driver"
    fi
datasources="$datasources$(generate_datasource $jndi $username $password $driver $url)\n\n"
~~~

As you easily see, there is no mongodb driver so $driver is nothing. Therefore, url will replace of driver.

In conclusion, there wouldn't be mongo db driver in tomcat jdbc connection configuration file.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.create template "jws-tomcat7-mongodb-sti" or "jws-tomcat8-mongodb-sti"

2.configure jdbc connection tomcat to mongodb



Actual results:
it fails to create connection pool.

Expected results:
it should create connection pool

Additional info:

This is configuration that is generated by ose3 :

<Resource name="jdbc/mydb" auth="Container" type="javax.sql.DataSource" user
name="user02" password="user)@" driverClassName="jdbc:mongodb://172.30.124.139:2
7017/mydb" url="" maxWait="10000" maxIdle="30" factory="org.apache.tomcat.jdbc.p
ool.DataSourceFactory" minIdle="2" maxActive="3" />

See, there is mongo db url in driverClassName instead of driver name.(mongodb.jdbc.MongoDriver)

Comment 2 JBoss JIRA Server 2015-08-24 14:02:01 UTC
Radovan Netuka <rnetuka> updated the status of jira CLOUD-201 to Coding In Progress

Comment 3 JBoss JIRA Server 2015-10-01 14:28:29 UTC
Kevin Conner <kevin.conner> updated the status of jira CLOUD-201 to Closed

Comment 4 kconner 2015-10-21 16:34:37 UTC
This is fixed in our upcoming release

Comment 5 Ben Parees 2015-10-26 20:22:35 UTC
Kevin, once the new images are published please move it to ON_QA.

Comment 8 Tomas Schlosser 2015-11-13 07:42:07 UTC
The new JWS images have been released and this bug is fixed there. Use the latest tomcat images from Red Hat registry:

jboss-webserver-3/webserver30-tomcat7-openshift:1.1
jboss-webserver-3/webserver30-tomcat8-openshift:1.1


Note You need to log in before you can comment on or make changes to this bug.