-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Hibernate generated SQL names are too long for DB2 version 7
PostPosted: Fri Oct 28, 2005 5:02 pm 
Newbie

Joined: Fri Oct 28, 2005 4:53 pm
Posts: 2
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:

3.1 rc2

Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2] SQL0107N The name "OCCURRENCE30_211_0_" is too long. The maximum length is "18". SQLSTATE=42622

at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(SQLExceptionGenerator.java:269)
at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(SQLExceptionGenerator.java:206)
at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_return_code(SQLExceptionGenerator.java:457)
at COM.ibm.db2.jdbc.app.DB2PreparedStatement.<init>(DB2PreparedStatement.java:561)
at COM.ibm.db2.jdbc.app.DB2PreparedStatement.<init>(DB2PreparedStatement.java:614)
at COM.ibm.db2.jdbc.app.DB2PreparedStatementTrace.<init>(DB2PreparedStatementTrace.java:68)
at COM.ibm.db2.jdbc.app.DB2Connection.prepareStatement(DB2Connection.java:537)
at COM.ibm.db2.jdbc.app.DB2ConnectionTrace.prepareStatement(DB2ConnectionTrace.java:120)
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:431)
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:366)
at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:105)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1561)
at org.hibernate.loader.Loader.doQuery(Loader.java:661)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:223)
at org.hibernate.loader.Loader.loadEntity(Loader.java:1782)
at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:93)
at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:81)
at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:2729)
at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:365)
at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:346)
at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:123)
at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:177)
at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:87)
at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:809)
at org.hibernate.impl.SessionImpl.get(SessionImpl.java:749)
at org.hibernate.impl.SessionImpl.get(SessionImpl.java:742)
at com.lmig.pm.om.dom.tests.SampleSelect.main(SampleSelect.java:99)
2005-10-28 16:42:40:031 EDT [main] WARN - util.JDBCExceptionReporter - SQL Error: -107, SQLState: 42622
2005-10-28 16:42:40:031 EDT [main] ERROR - util.JDBCExceptionReporter - [IBM][CLI Driver][DB2] SQL0107N The name "OCCURRENCE30_211_0_" is too long. The maximum length is "18". SQLSTATE=42622


Name and version of the database you are using:

DB2 7.2 OS390


The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:

_________________
Gary


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 01, 2005 1:18 pm 
Newbie

Joined: Fri Oct 28, 2005 4:53 pm
Posts: 2
See response in forum to resolve problem:

<<http://forum.hibernate.org/viewtopic.php?t=941271&highlight=db2+length+18>>

_________________
Gary


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.