Cannot connect to an Oracle DB using a schema/user specified in lowercase
-------------------------------------------------------------------------
Key: HHH-6888
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-6888
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.6.7
Environment: Oracle 10g 10.2.0.1.0 with JDBC Driver 10.2.0.2 and
Oracle10gDialect
Reporter: Vincent Massol
I have an Oracle user with lowercase letters ("xwiki"). When I use the following
in my hibernate.cfg.xml:
{noformat}
<property
name="connection.url">jdbc:oracle:thin:@<ip>:1521:XE</property>
<property name="connection.username">xwiki</property>
<property name="connection.password">pass</property>
<property
name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property
name="dialect">org.hibernate.dialect.Oracle10gDialect</property>
{noformat}
Hibernate fails to connect.
The reason, I believe, is because Hibernate passes the username *as is* to Oracle without
escaping it in quotes. Since Oracle converts users passed to it to uppercase (unless
they're escaped with quotes) it fails to connect.
I found the following in a forum post
(
https://forums.oracle.com/forums/thread.jspa?threadID=732373&tstart=1500 ):
{noformat}
The username is passed to the ConnectionPool by the Properties attribute:
Properties="user=scott;portNumber=1521;SID=MYDB;serverName=myserver"
So, it's true that the username is not quoted.
{noformat}
Thanks
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira