Bug 1175386

Summary: Dashboard builder SecurityLogging workspace problem with some DBs used for logging
Product: [JBoss] JBoss Data Virtualization 6 Reporter: Jan Stastny <jstastny>
Component: Dashboard BuilderAssignee: David Le Sage <dlesage>
Status: CLOSED ERRATA QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.1.0CC: atangrin, jstastny, nshendye, vhalbert
Target Milestone: ---Keywords: Documentation
Target Release: 6.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
When using either a PostgreSQL or MySQL database for command logging, the JBoss Data Virtualization dashboard fails due to its inability to find the AuditLog or CommandLog tables. This is due to the case sensitive names that these database use and the table names exist in lower case. The dashboard fails with an exception indicating it cannot find the table. The workaround is to edit the data source query in the dashboard. The JBoss Data Virtualization Dashboard should be able to present data from these tables.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-22 23:29:33 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
postgresLog none

Description Jan Stastny 2014-12-17 15:54:06 UTC
Created attachment 970176 [details]
postgresLog

Description of problem:
When using database logging problems with deploying dashboard builder occur. It depends on the type of used database for logging.
With Oracle and SQLServer the dashboard builder deploys fine.
But with MySQL, PostgreSQL not.

For MySQL 5.1 db:
14:33:27,638 ERROR [org.jboss.dashboard.dataset.sql.SQLDataSet] (ServerService Thread Pool -- 54) Error in load() SQLDataset. SQL = Select * from AuditLog: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'dballo02.AuditLog' doesn't exist
When examined the db directly, there is a table called 'auditlog' within schema 'dballo02'. I tried running the query from error message and got the same error, but with 'dballo02.auditlog' the query works just fine. Looks like case-sensitivity issue.

MySQL 5.5 worked fine.

For PostgreSQL 9.1 db:
During the first starting of server and deploying of dashboard builder an error is thrown about non-existing auditlog table. Consecutive starts/deployments run fine. See the attached postgresLog.

Comment 1 Van Halbert 2014-12-22 13:59:37 UTC
MySql 5.1 isn't a supported database (don't look at supported datasources for this) - see supported databases on the supported configuration page, but 5.5 is.

Comment 2 Van Halbert 2014-12-22 14:01:41 UTC
Can you confirm this fails the same way on Postgres 9.2?  Which is what we're indicating that's supposed as a database.

Comment 3 Jan Stastny 2015-01-05 07:23:29 UTC
Hi Van,
I have just tried with PostgreSQL 9.2 and I can confirm, that this fails too.

Comment 4 Jan Stastny 2015-01-05 07:41:25 UTC
It seems that you have to use a db which is clean to run into the issue. A db which wasn't used as logging database before and thus doesn't have the auditlog table created yet.

Comment 5 Van Halbert 2015-01-06 18:29:31 UTC
You are right about the case sensitive issue.  The fix would be to edit the data source query in the dashboard, to make it lower case.  

As for the first start versus subsequent start issues, that appears to be a hibernate issue on what's its choosing to do.

I would say, just make this a KI for postgres and mysql.   

And I'll make the change to the dashboard for future releases.

Is this ok?

Comment 6 Jan Stastny 2015-01-07 06:40:58 UTC
Yes Van, I think it is sufficient measure for the issue.

Comment 7 JBoss JIRA Server 2015-01-07 18:16:28 UTC
Van Halbert <vhalbert> updated the status of jira TEIIDDSHB-11 to Coding In Progress

Comment 8 JBoss JIRA Server 2015-01-07 22:09:01 UTC
Van Halbert <vhalbert> updated the status of jira TEIIDDSHB-11 to Open

Comment 9 JBoss JIRA Server 2015-01-07 22:09:10 UTC
Van Halbert <vhalbert> updated the status of jira TEIIDDSHB-11 to Resolved

Comment 10 Van Halbert 2015-01-07 22:14:01 UTC
I've got the fix in.  

Would it be possible for you to try the attached war which contains the changes?  I've got posgres 9.3.5 installed and I don't have the case sensitive issue.

Comment 12 Van Halbert 2015-01-19 16:02:22 UTC
Back ported fixes to the 2.0.x branch.

Comment 13 JBoss JIRA Server 2015-04-01 21:54:42 UTC
Van Halbert <vhalbert> updated the status of jira TEIIDDSHB-11 to Closed