]
Rafael Chaves commented on HHH-521:
-----------------------------------
A similar problem occurs with Postgres:
Enabling hibernate.use_sql_comments fails
-----------------------------------------
Key: HHH-521
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-521
Project: Hibernate3
Issue Type: Bug
Environment: Hibernate 3.0.3
Reporter: Mathias Bogaert
When enabling hibernate.use_sql_comments I get the following exceptions:
INFO - SQLErrorCodes loaded: [DB2, HSQL, MS-SQL, MySQL, Oracle, Informix, PostgreSQL,
Sybase]
Hibernate: /*criteria query*/select this_.USER_ID as USER1_0_, this_1_.LOGIN as
LOGIN28_0_, this_1_.FIRST_NAME as FIRST3_28_0_, th
is_1_.LAST_NAME as LAST4_28_0_, this_1_.FULL_NAME as FULL5_28_0_, this_1_.EMAIL_ADDRESS
as EMAIL6_28_0_, this_1_.STATUS as STATUS2
8_0_, this_1_.UNIT_ID as UNIT8_28_0_, this_.PHONE as PHONE30_0_, this_.COUNTRY_ISO as
COUNTRY3_30_0_, this_.LAST_LOGIN as LAST4_30
_0_, this_.LAST_PASSWORD_ENTERED as LAST5_30_0_, roles2_.USER_ID as USER1___,
roles2_.ROLE_ID as ROLE2___ from AUD_USERS this_ inn
er join AUD_REF_USERS_VIEW this_1_ on this_.USER_ID=this_1_.USER_ID left outer join
AUD_REF_USERS_ROLES_VIEW roles2_ on this_.USER
_ID=roles2_.USER_ID where this_1_.LOGIN=?
WARN - SQL Error: 1009, SQLState: 72000
ERROR - ORA-01009: missing mandatory parameter
ERROR - Could not execute action
org.hibernate.exception.GenericJDBCException: could not execute query
at
org.hibernate.exception.ErrorCodeConverter.handledNonSpecificException(ErrorCodeConverter.java:92)
at
org.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:80)
at
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.loader.Loader.doList(Loader.java:1565)
at org.hibernate.loader.Loader.list(Loader.java:1545)
at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:111)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1316)
at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:299)
at org.hibernate.impl.CriteriaImpl.uniqueResult(CriteriaImpl.java:432)
at
eu.cec.regio.sysaudit.domain.reference.persistence.hibernate.HibernateReferenceDao.findUserByLogin(HibernateReferenceDa
o.java:311)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:287)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:155)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:122)
at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:57)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:174)
at $Proxy65.findUserByLogin(Unknown Source)
at
eu.cec.regio.sysaudit.security.OracleSecurityService.authenticate(OracleSecurityService.java:52)
at
eu.cec.regio.sysaudit.web.action.security.MultipleRoleLogin.authenticate(MultipleRoleLogin.java:23)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...
with undelying trace:
Caused by: java.sql.SQLException: ORA-01009: missing mandatory parameter
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:582)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1983)
at oracle.jdbc.ttc7.TTC7Protocol.fetch(TTC7Protocol.java:1250)
at oracle.jdbc.driver.OracleResultSetImpl.next(OracleResultSetImpl.java:295)
at
weblogic.jdbc.wrapper.ResultSet_oracle_jdbc_driver_OracleResultSetImpl.next(Unknown
Source)
at org.hibernate.loader.Loader.doQuery(Loader.java:391)
at
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:210)
at org.hibernate.loader.Loader.doList(Loader.java:1562)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: