Bug 1251658 - tomcat jdbc mongodb driver
tomcat jdbc mongodb driver
Status: CLOSED CURRENTRELEASE
Product: OpenShift Container Platform
Classification: Red Hat
Component: Image (Show other bugs)
3.0.0
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: kconner
XiuJuan Wang
: UpcomingRelease
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-08 09:05 EDT by jooho lee
Modified: 2015-11-23 09:44 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-23 09:44:24 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker CLOUD-201 Major Closed connection pool not created for mongo db 2016-01-03 22:37 EST

  None (edit)
Description jooho lee 2015-08-08 09:05:53 EDT
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 10:02:01 EDT
Radovan Netuka <rnetuka@redhat.com> updated the status of jira CLOUD-201 to Coding In Progress
Comment 3 JBoss JIRA Server 2015-10-01 10:28:29 EDT
Kevin Conner <kevin.conner@jboss.com> updated the status of jira CLOUD-201 to Closed
Comment 4 kconner 2015-10-21 12:34:37 EDT
This is fixed in our upcoming release
Comment 5 Ben Parees 2015-10-26 16:22:35 EDT
Kevin, once the new images are published please move it to ON_QA.
Comment 8 Tomas Schlosser 2015-11-13 02:42:07 EST
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.