Bug 1251658

Summary: tomcat jdbc mongodb driver
Product: OpenShift Container Platform Reporter: jooho lee <jlee>
Component: ImageStreamsAssignee: kconner
Status: CLOSED CURRENTRELEASE QA Contact: XiuJuan Wang <xiuwang>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.0.0CC: bparees, dmcphers, jkrieger, jokerman, kconner, libra-bugs, libra-onpremise-devel, mmccomas, tschloss
Target Milestone: ---Keywords: UpcomingRelease
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-23 14:44:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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