Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1136160

Summary: Remove postgres and mysql datasource/drivers from JBoss EAP cartridge example project
Product: OpenShift Container Platform Reporter: Jochen Cordes <jcordes>
Component: ImageStreamsAssignee: Jason DeTiberus <jdetiber>
Status: CLOSED UPSTREAM QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 2.0.0CC: bleanhar, jcordes, jokerman, libra-onpremise-devel, mmccomas, tiwillia
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-04-07 17:40:37 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:
Attachments:
Description Flags
JBoss EAP server log none

Description Jochen Cordes 2014-09-02 04:35:36 UTC
Description of problem:

The example project from the JBoss EAP cartridge includes datasource and driver definitions for PostgreSQL and MySQL. As we (for obvious reasons) haven't included the drivers this leads to errors in the logs during startup.

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

OSE 2.0/2.1

How reproducible:


Steps to Reproduce:
1. Install JBoss EAP 6 cartridge on OSE
2. Observer server.log/jbosseap.log on the OpenShift application
3.

Actual results:

Errors during startup due to missing Postgres and MySQL drivers.

Expected results:

No errors

Additional info:

The PostgreSQL and/or MySQL datasources and drivers should be added to the JBoss EAP cartridge in case a user adds them to his application, not by default.

Comment 2 Brenton Leanhardt 2014-09-04 12:06:20 UTC
We do actually bundle these database drivers however a recent EAP update might have changed something that we depended on.

Comment 3 Brenton Leanhardt 2014-09-04 17:39:54 UTC
Can you paste the errors you find in your application logs?

If possible please run 'rpm -qa | sort' on the Node where the gear is running and provide the output as an attachment to this bug.  Be sure to remove any packages not provided by Red Hat that you believe are sensitive.

I took a look a few minutes ago and it appears to be working fine for me with the latest JBoss EAP from RHN and OpenShift Enterprise 2.1.z installation:

2014/09/04 13:13:49,650 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 35) JBAS010404: Deploying non-
JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)
2014/09/04 13:13:50,155 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 35) JBAS010404: Deploying non-
JDBC-compliant driver class org.postgresql.Driver (version 8.4)

In OpenShift Enterprise we ship the mysql driver with jboss-eap6-modules-6.0.0.GA-8.el6op.noarch.  Here are the relevant files:

/usr/share/jbossas/modules/com/mysql
/usr/share/jbossas/modules/com/mysql/jdbc
/usr/share/jbossas/modules/com/mysql/jdbc/main
/usr/share/jbossas/modules/com/mysql/jdbc/main/module.xml
/usr/share/jbossas/modules/com/mysql/jdbc/main/mysql-connector-java-5.1.18-bin.jar

For postgresql the driver is shipped with the postgresql-jdbc-8.4.704-2.el6.noarch package.  The logic in the EAP spec file wires it up for gears:

https://github.com/openshift/origin-server/blob/master/cartridges/openshift-origin-cartridge-jbosseap/openshift-origin-cartridge-jbosseap.spec#L74

Comment 4 Jochen Cordes 2014-09-05 07:08:42 UTC
Created attachment 934692 [details]
JBoss EAP server log

This is the JBoss EAP server.log from my customer, who's experiencing the same problem. I will ask him about the RPM's installed and will attach the information later to this BZ.

Comment 5 Brenton Leanhardt 2014-09-05 13:39:25 UTC
Were the packages I mentioned installed in your environment?

Additionally can you and the customer both run the following commands from within your gear:

find -L ./jbosseap/modules -name "postgres*"
find -L ./jbosseap/modules -name "mysql*"

If you examine the java process that is running your gear you should see a section like this:

-mp /var/lib/openshift/[gear uuid]/app-root/runtime/repo//.openshift/config/modules:/var/lib/openshift/[gear uuid]/jbosseap//modules

That is what allows you to place modules in your git repo's openshift/config/modules directory as well as picking up system modules that the OpenShift runtime provides under /var/lib/openshift/[gear uuid]/jbosseap//modules.

I did notice that you're running EAP 6.2 and technically 6.3 is the latest.  I really don't think that matters though.

Comment 6 Jochen Cordes 2014-09-05 13:58:11 UTC
I can confirm that with OSE 2.1.4a on my local OSE installation this issue is not present (I'm also using JBoss EAP 6.3), my customer is using 2.1.2. though.

My customer also confirmed that on all Nodes the following files are available:

/usr/share/jbossas/modules/com/mysql/jdbc/main/module.xml
/usr/share/jbossas/modules/com/mysql/jdbc/main/mysql-connector-java-5.1.18-bin.jar

I will ask my customer for information about the JBoss EAP java process and will attach the information as soon as I have gotten it.

Comment 7 Timothy Williams 2016-04-07 17:40:37 UTC
Due to this issue appearing to be resolved in newer versions (2.1.4a+) and sitting for over a year, I'm closing this bug.

If you feel it should remain open, please re-open it.

Comment 8 Red Hat Bugzilla 2023-09-14 02:46:47 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days