Thanks, Scott. I had high hopes that this would fix the case insensitivity issues I’m having with a fresh install of Grouper-2.3.0 using MariaDB.
I’m still getting the same registry build time error. The following are relevant bits of console log on my most recent attempts. I’ve used comment blocks like the following example to
annotate things a bit.
##################
#
# My comment on what’s going on
#
##################
I searched the grouper-user archives, and didn’t find anything on this particular issue.
Thanks in advance for further assistance, ---Keith
########################
#
# KeithH: Showing my configuration related to use of MariaDB
# and so-far-unsuccessful attempts to get Grouper to support case-sensitive queries
#
########################
midpoint#>cat /etc/my.cnf
[client]
default-character-set=utf8
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
collation-server = utf8_bin
init-connect='SET NAMES utf8'
character-set-server = utf8
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# Settings user and group are ignored when systemd is used.
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mariadb according to the
# instructions in http://fedoraproject.org/wiki/Systemd
[mysqld_safe]
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/run/mariadb/mariadb.pid
#
# include all files from the config directory
#
!includedir /etc/my.cnf.d
########################
#
# all my.cnf.d files edited to include:
#
# collation-server = utf8_bin
# init-connect='SET NAMES utf8'
# character-set-server = utf8
#
########################
ls -la /etc/my.cnf.d
drwxr-xr-x. 2 root root 4096 Sep 6 20:56 .
drwxr-xr-x. 93 root root 8192 Sep 6 21:37 ..
-rw-r--r--. 1 root root 351 Sep 5 21:48 client.cnf
-rw-r--r--. 1 root root 295 Sep 5 21:45 client.cnf.orig
-rw-r--r--. 1 root root 260 Sep 5 21:58 mysql-clients.cnf
-rw-r--r--. 1 root root 232 Sep 5 21:57 mysql-clients.cnf.orig
-rw-r--r--. 1 root root 744 Jun 16 15:08 server.cnf
########################
#
# Hibernate properties check
#
########################
midpoint#>vi /opt/grouper/grouper.apiBinary-2.3.0/conf/grouper.hibernate.properties
midpoint#>cat /opt/grouper/grouper.apiBinary-2.3.0/conf/grouper.hibernate.properties
#
# Copyright 2014 Internet2
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
# Grouper Hibernate Configuration
# $Id: grouper.hibernate.example.properties,v 1.9 2009-08-11 20:18:09 mchyzer Exp $
#
# The grouper hibernate config uses Grouper Configuration Overlays (documented on wiki)
# By default the configuration is read from grouper.hibernate.base.properties
# (which should not be edited), and the grouper.hibernate.properties overlays
# the base settings. See the grouper.hibernate.base.properties for the possible
# settings that can be applied to the grouper.hibernate.properties
########################################
## DB settings
########################################
# e.g. mysql: jdbc:mysql://localhost:3306/grouper
# e.g. p6spy (log sql): [use the URL that your DB requires]
# e.g. oracle: jdbc:oracle:thin:@server.school.edu:1521:sid
# e.g. hsqldb (a): jdbc:hsqldb:dist/run/grouper;create=true
# e.g. hsqldb (b): jdbc:hsqldb:hsql://localhost:9001/grouper
# e.g. postgres: jdbc:postgresql://localhost:5432/database
# e.g. mssql: jdbc:sqlserver://localhost:3280;databaseName=grouper
########################
#
# Note the following two properties
#
########################
# --> khazelton <-- added at suggestion of Scott Koranda
hibernate.connection.driver_class = org.mariadb.jdbc.Driver
hibernate.dialect = org.hibernate.dialect.MySQL5Dialect
# --> end edit <--
hibernate.connection.url = "jdbc:mysql://localhost:3306/grouper?autoReconnect=true&CharSet=utf8&useUnicode=true&characterEncoding=utf8&sessionVariables=wait_timeout=120960
hibernate.connection.username = sa
# If you are using an empty password, depending upon your version of
# Java and Ant you may need to specify a password of "".
# Note: you can keep passwords external and encrypted: https://bugs.internet2.edu/jira/browse/GRP-122
hibernate.connection.password..............
########################
#
# put the latest 1.5.2 MariaDB driver .jar file in the right places
#
########################
midpoint#>cp /home/kh/mariadb-java-client-1.5.2.jar /opt/grouper/grouper.apiBinary-2.3.0/lib/custom
midpoint#>cp /home/kh/mariadb-java-client-1.5.2.jar /opt/grouper/grouper.apiBinary-2.3.0/lib
midpoint#>cp /home/kh/mariadb-java-client-1.5.2.jar /opt/grouper/grouper.apiBinary-2.3.0/lib/grouper
midpoint#>cp /home/kh/mariadb-java-client-1.5.2.jar /opt/grouper/grouper.apiBinary-2.3.0/lib/test
########################
#
# re-initialize the registry now that proper drivers and .cnf edits are in place
#
########################
midpoint#>export GROUPER_HOME=/opt/grouper/grouper.apiBinary-2.3.0
midpoint#>$GROUPER_HOME/bin/gsh.sh -registry -reset
Using GROUPER_HOME: /opt/grouper/grouper.apiBinary-2.3.0
Using GROUPER_CONF: /opt/grouper/grouper.apiBinary-2.3.0/conf
Using JAVA: /etc/alternatives/java_sdk_1.7.0/bin/java
using MEMORY: 64m-750m
(note, might need to type in your response multiple times (Java stdin is flaky))
(note, you can whitelist or blacklist db urls and users in the grouper.properties)
Are you sure you want to delete all grouper data in db user 'sa', db url 'jdbc:mysql://localhost:3306/grouper?autoReconnect=true&CharSet=utf8&useUnicode=true&characterEncoding=utf8&sessionVariables=wait_timeout=120960'?
(y|n):
y
Continuing...
Grouper starting up: version: 2.3.0, build date: 2016/04/16 05:37:21, env: <no label configured>
grouper.properties read from: /opt/grouper/grouper.apiBinary-2.3.0/conf/grouper.properties
Grouper current directory is: /opt/grouper.installer-2.3.0
log4j.properties read from: /opt/grouper/grouper.apiBinary-2.3.0/conf/log4j.properties
Grouper is logging to file: /opt/grouper/grouper.apiBinary-2.3.0/logs/grouper_error.log, at min level WARN for package: edu.internet2.middleware.grouper, based on log4j.properties
grouper.hibernate.properties: /opt/grouper/grouper.apiBinary-2.3.0/conf/grouper.hibernate.properties
grouper.hibernate.properties: sa@jdbc:mysql://localhost:3306/grouper?autoReconnect=true&CharSet=utf8&useUnicode=true&characterEncoding=utf8&sessionVariables=wait_timeout=120960
sources.xml read from: /opt/grouper/grouper.apiBinary-2.3.0/conf/sources.xml
sources.xml groupersource id: g:gsa
sources.xml groupersource id: grouperEntities
sources.xml jdbc source id: jdbc: GrouperJdbcConnectionProvider
########################
#
# This is where the error re case insensitivity shows up
#
########################
Error: Queries in your database seem to be case insensitive, this can be a problem for Grouper, if you are using MySQL you should use a bin collation
Grouper error: detected mismatch in hibernate.connection.driver_class (org.mariadb.jdbc.Driver) and hibernate.dialect (org.hibernate.dialect.MySQL5Dialect) in grouper.hibernate.properties
Grouper error: detected mismatch in hibernate.connection.driver_class (org.mariadb.jdbc.Driver) and hibernate.dialect (org.hibernate.dialect.MySQL5Dialect) in grouper.hibernate.properties
___________________________________
email & jabber:
calendar:
http://go.wisc.edu/i6zxx0
From:
Scott Koranda <>
Date: Tuesday, September 6, 2016 at 07:36
To: Keith Hazelton <>
Cc: "" <>
Subject: Re: [grouper-users] Grouper 2.3.0 startup error: Queries seem to be case insensitive
Hi,
I use this in my grouper.hibernate.properties:
hibernate.connection.driver_class = org.mariadb.jdbc.Driver
hibernate.dialect = org.hibernate.dialect.MySQL5Dialect
hibernate.connection.url = "jdbc:mysql://my.host:3306/grouper?autoReconnect=true&CharSet=utf8&useUnicode=true&characterEncoding=utf8&sessionVariables=wait_timeout=1209600
hibernate.connection.username = grouper
hibernate.connection.password = MY_PASSWORD
On Tue, Sep 6, 2016 at 7:22 AM, Keith Hazelton <> wrote:
When I start up the Grouper 2.3.0 Tomcat instance with a MariaDB 5.5.50 database, I get the following in logs/grouperUi/grouper_error.log:
2016-09-06 08:03:10,089: [pool-2-thread-1] ERROR GrouperStartup.verifyUtf8andTransactionsHelper(407) - - Error:
Queries in your database seem to be case insensitive, this can be a problem for Grouper, if you are using MySQL you should use a bin collation
I’ve done all the steps I can find to make Mariadb use utf8 by default. There must be something I’m missing.
--Keith
https://mariadb.com/kb/en/mariadb/setting-character-sets-and-collations/#example-changing-the-default-character-set-to-utf-8
To change the default character set from latin1 to UTF-8, the following settings should be specified in the my.cnf configuration file.
[client]
...
default-character-set=utf8
...
[mysql]
...
default-character-set=utf8
...
[mysqld]
...
collation-server = utf8_unicode_ci
init-connect='SET NAMES utf8'
character-set-server = utf8
...
- changes
midpoint#>cat /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
collation-server = utf8_unicode_ci
init-connect='SET NAMES utf8'
character-set-server = utf8
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# Settings user and group are ignored when systemd is used.
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mariadb according to the
# instructions in
http://fedoraproject.org/wiki/Systemd
[mysqld_safe]
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/run/mariadb/mariadb.pid
#
# include all files from the config directory
#
!includedir /etc/my.cnf.d
midpoint#>cat /etc/my.cnf.d/client.cnf
#
# These two groups are read by the client library
# Use it for options that affect all clients, but not the server
#
[client]
# This group is not read by mysql client library,
# If you use the same .cnf file for MySQL and MariaDB,
# use it for MariaDB-only client options
default-character-set=utf8
[client-mariadb]
default-character-set=utf8
midpoint#>cat /etc/my.cnf.d/mysql-clients.cnf
#
# These groups are read by MariaDB command-line tools
# Use it for options that affect only one utility
#
[mysql]
default-character-set=utf8
[mysql_upgrade]
[mysqladmin]
[mysqlbinlog]
[mysqlcheck]
[mysqldump]
[mysqlimport]
[mysqlshow]
[mysqlslap]
- restart mariadb.service to pick up new character sets
___________________________________
email & jabber:
calendar:
http://go.wisc.edu/i6zxx0