1
votes

DBMS - oracle 11gr2

we recently upgraded the IDE and OS of a java console application that runs 10 times a month. now None of our queries work properly since hibernate converts the letter i to İ which is not I. All insert statements and id fields affected negatively. now in our queries

id -> İD not ID insert -> İNSERT not INSERT neither select statements nor inserts do not execute.

for example: in the previous version Select id from table a is now sent to the db as

SELECT İD from table a ,

and we dont have such a column called İD at all. stack trace is as follows


Internal Exception: java.sql.SQLSyntaxErrorException: ORA-00904: "İD": geçersiz belirleyici (invalid identifier)


Query: ReadObjectQuery(name="readObject" referenceClass=OrtakEntity sql="SELECT İD, ADİ, ALACAKLARİNDAHACİZVARMİ, ANNEADİ, FROM A WHERE (İD = ?)") ********************sistem toplam sure***********************0.0 ********************Time unit toplam sure***********************0 Local Exception Stack: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.2.0.v20110202-r8913): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLSyntaxErrorException: ORA-00904: "İD": geçersiz belirleyici

Error Code: 904 at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:333) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:684) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:526) at org.eclipse.persistence.internal.session

1
Eek, what version of hibernate? I'm sure I logged a bug like this and it got fixed. Hmm hibernate JIRA seems broken at this time. HTTP/404 to all POSTs. - Darryl Miles
<dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-ehcache</artifactId> <version>3.6.7.Final</version> </dependency> - desperado06
From Aug 2011? Try 3.6.10.Final from Feb 2012 ? But I don't think the fix is in there, see my bug report hibernate.atlassian.net/browse/HHH-8579 - Darryl Miles
Solution to keep 3.6.7.Final is obviously to use strict US-ASCII in your identifiers for variable/property/column names. Maybe you can enforce escaping by using backquote characters in HBM or in JPA annoatations for column names. Like @Column(name="`non_USASCII_id`") - Darryl Miles
I resolved the issue by chaning the regional settings of the computer to English and United States. - desperado06

1 Answers

0
votes

I resolved the issue by changing the settings of the computer to English and United States as location. (still not the best approach but now the program runs)