-->
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.  [ 10 posts ] 
Author Message
 Post subject: Strange Id generation with Oracle9i
PostPosted: Sat Jan 01, 2005 12:47 am 
Newbie

Joined: Fri Dec 31, 2004 11:53 pm
Posts: 6
I am using Hibernate with Spring 1.1 container with Tomcat 5.0.18 and RDBMS is Oracle 9i. My project is undergoing development phase.We already developed around 200 business component. Things are going fine untill.....Two tables is showing strange behavior by generating id like 1.5000E-8, -(.00E-130 etc.I observed the log file of hibernate. the log shows id is generating properly....Even save operation returns proper number(1,2 etc.) as id. But during finding operation I am getting DataOverflwoException from Oracle JDBC driver or 0 value as the database contains that strange value.I tried in several ways to get rid from this situation(Changing the machine,Flushing the entire database,changing the Id generating scheme like increment,native etc.).....but this stupid numbers are generating consistently.......... Stranger to that When I test the operation without deploying to Tomcat server using Spring testing framework things are ok(Id like 1,2,3 are generated)......

Please help ..............




Hibernate version:2.1.6

Mapping documents:

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

Full stack trace of any exception that occurs:

Name and version of the database you are using:

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 01, 2005 9:28 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
you don't show code. stacktrace, log, mappings, data examples of any kind - so not much we can do.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: Further Information
PostPosted: Sun Jan 02, 2005 12:20 am 
Newbie

Joined: Fri Dec 31, 2004 11:53 pm
Posts: 6
Here are attatchments:

01. HBM file ::

<?xml version="1.0"?>

<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">

<hibernate-mapping>
<class
name="com.sikraft.ihis.wardadministration.physicianreply.WPReplyDTO"
table="WPReply">
<id column="wpreplyIdentifier" name="id">
<generator class="native">
<param name="sequence">wpreplyid_sequence</param>
</generator>
</id>
<version name="versionNumber"/>
<property name="creationDate"/>
<property name="status"/>
<property name="creationTime"/>
<property name="department"/>
<property name="ward"/>
<property name="physician"/>
<property name="patientId"/>
<property name="patientName"/>
<property name="bedRoom"/>
<property name="departmentId"/>
<property name="wardId"/>
<property name="physicianId"/>
<property name="callId"/>
<property name="delay"/>
</class>
</hibernate-mapping>


Here WPReplyDTO extends a class named PersistentCapableDTO which contains the id field of Long type. Things are working nice for all other dtos of my application.

02. JDBC driver I am using is Oracle 9i Thin driver.Are OCI drivers better option?Can driver be the culprits....What I am seeing is Hibernate is producing Id properly....

03. Hibernate log file is very smooth in generating the Id......

05 Jan 2005 09:56:27 -- net.sf.hibernate.impl.BatcherImpl -- DEBUG -- about to open: 0 open PreparedStatements, 0 open ResultSets
05 Jan 2005 09:56:27 -- net.sf.hibernate.SQL -- DEBUG -- insert into WPReply(versionNumber, creationDate, status, creationTime, department, ward, physician, patientId, patientName, bedRoom, departmentId, wardId, physicianId, callId, delay, wpreplyIdentifier) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
05 Jan 2005 09:56:27 -- net.sf.hibernate.impl.BatcherImpl -- DEBUG -- preparing statement
05 Jan 2005 09:56:27 -- net.sf.hibernate.persister.EntityPersister -- DEBUG -- Dehydrating entity: [com.sikraft.ihis.wardadministration.physicianreply.WPReplyDTO#41]
05 Jan 2005 09:56:27 -- net.sf.hibernate.type.IntegerType -- DEBUG -- binding '0' to parameter: 1
05 Jan 2005 09:56:27 -- net.sf.hibernate.type.CalendarType -- DEBUG -- binding '2005-01-05 00:00:00' to parameter: 2
05 Jan 2005 09:56:27 -- net.sf.hibernate.type.IntegerType -- DEBUG -- binding '1' to parameter: 3
05 Jan 2005 09:56:27 -- net.sf.hibernate.type.CalendarType -- DEBUG -- binding '2005-01-05 00:00:00' to parameter: 4
05 Jan 2005 09:56:27 -- net.sf.hibernate.type.StringType -- DEBUG -- binding 'Cardiology' to parameter: 5
05 Jan 2005 09:56:27 -- net.sf.hibernate.type.StringType -- DEBUG -- binding 'CardiologyWard' to parameter: 6
05 Jan 2005 09:56:27 -- net.sf.hibernate.type.StringType -- DEBUG -- binding 'Omar Gani' to parameter: 7
05 Jan 2005 09:56:27 -- net.sf.hibernate.type.LongType -- DEBUG -- binding '1' to parameter: 8
05 Jan 2005 09:56:27 -- net.sf.hibernate.type.StringType -- DEBUG -- binding 'Md. Safiqul Islam' to parameter: 9
05 Jan 2005 09:56:27 -- net.sf.hibernate.type.StringType -- DEBUG -- binding '' to parameter: 10
05 Jan 2005 09:56:27 -- net.sf.hibernate.type.LongType -- DEBUG -- binding '1' to parameter: 11
05 Jan 2005 09:56:27 -- net.sf.hibernate.type.LongType -- DEBUG -- binding '1' to parameter: 12
05 Jan 2005 09:56:27 -- net.sf.hibernate.type.LongType -- DEBUG -- binding '1' to parameter: 13
05 Jan 2005 09:56:27 -- net.sf.hibernate.type.LongType -- DEBUG -- binding '12' to parameter: 14
05 Jan 2005 09:56:27 -- net.sf.hibernate.type.CalendarType -- DEBUG -- binding '1970-01-01 00:00:12' to parameter: 15
05 Jan 2005 09:56:27 -- net.sf.hibernate.type.LongType -- DEBUG -- binding '41' to parameter: 16

04. Then in the finding operation I am getting :
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- opened session
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- find: select searchItem from searchItem in class com.sikraft.ihis.wardadministration.physicianreply.WPReplyDTO where searchItem.id != ?
05 Jan 2005 09:59:22 -- net.sf.hibernate.engine.QueryParameters -- DEBUG -- parameters: [0]
05 Jan 2005 09:59:22 -- net.sf.hibernate.engine.QueryParameters -- DEBUG -- named parameters: {}
05 Jan 2005 09:59:22 -- net.sf.hibernate.hql.QueryTranslator -- DEBUG -- compiling query
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- flushing session
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- Flushing entities and processing referenced collections
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- Processing unreferenced collections
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- Scheduling collection removes/(re)creates/updates
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- Flushed: 0 insertions, 0 updates, 0 deletions to 0 objects
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- Dont need to execute flush
05 Jan 2005 09:59:22 -- net.sf.hibernate.hql.QueryTranslator -- DEBUG -- HQL: select searchItem from searchItem in class com.sikraft.ihis.wardadministration.physicianreply.WPReplyDTO where searchItem.id != ?
05 Jan 2005 09:59:22 -- net.sf.hibernate.hql.QueryTranslator -- DEBUG -- SQL: select searchItem.wpreplyIdentifier as wpreplyI1_, searchItem.versionNumber as versionN2_, searchItem.creationDate as creation3_, searchItem.status as status, searchItem.creationTime as creation5_, searchItem.department as department, searchItem.ward as ward, searchItem.physician as physician, searchItem.patientId as patientId, searchItem.patientName as patient10_, searchItem.bedRoom as bedRoom, searchItem.departmentId as departm12_, searchItem.wardId as wardId, searchItem.physicianId as physici14_, searchItem.callId as callId, searchItem.delay as delay from WPReply searchItem where (searchItem.wpreplyIdentifier!=? )
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.BatcherImpl -- DEBUG -- about to open: 0 open PreparedStatements, 0 open ResultSets
05 Jan 2005 09:59:22 -- net.sf.hibernate.SQL -- DEBUG -- select searchItem.wpreplyIdentifier as wpreplyI1_, searchItem.versionNumber as versionN2_, searchItem.creationDate as creation3_, searchItem.status as status, searchItem.creationTime as creation5_, searchItem.department as department, searchItem.ward as ward, searchItem.physician as physician, searchItem.patientId as patientId, searchItem.patientName as patient10_, searchItem.bedRoom as bedRoom, searchItem.departmentId as departm12_, searchItem.wardId as wardId, searchItem.physicianId as physici14_, searchItem.callId as callId, searchItem.delay as delay from WPReply searchItem where (searchItem.wpreplyIdentifier!=? )
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.BatcherImpl -- DEBUG -- preparing statement
05 Jan 2005 09:59:22 -- net.sf.hibernate.type.IntegerType -- DEBUG -- binding '0' to parameter: 1
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- running Session.finalize()
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- running Session.finalize()
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- running Session.finalize()
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- running Session.finalize()
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- running Session.finalize()
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- running Session.finalize()
05 Jan 2005 09:59:22 -- net.sf.hibernate.loader.Loader -- DEBUG -- processing result set
05 Jan 2005 09:59:22 -- net.sf.hibernate.type.LongType -- DEBUG -- returning '0' as column: wpreplyI1_
05 Jan 2005 09:59:22 -- net.sf.hibernate.loader.Loader -- DEBUG -- result row: 0
05 Jan 2005 09:59:22 -- net.sf.hibernate.loader.Loader -- DEBUG -- Initializing object from ResultSet: 0
05 Jan 2005 09:59:22 -- net.sf.hibernate.loader.Loader -- DEBUG -- Hydrating entity: com.sikraft.ihis.wardadministration.physicianreply.WPReplyDTO#0
05 Jan 2005 09:59:22 -- net.sf.hibernate.type.IntegerType -- DEBUG -- returning '0' as column: versionN2_
05 Jan 2005 09:59:22 -- net.sf.hibernate.type.CalendarType -- DEBUG -- returning '2005-01-05 00:00:00' as column: creation3_
05 Jan 2005 09:59:22 -- net.sf.hibernate.type.IntegerType -- DEBUG -- returning '1' as column: status
05 Jan 2005 09:59:22 -- net.sf.hibernate.type.CalendarType -- DEBUG -- returning '2005-01-05 00:00:00' as column: creation5_
05 Jan 2005 09:59:22 -- net.sf.hibernate.type.StringType -- DEBUG -- returning 'Cardiology' as column: department
05 Jan 2005 09:59:22 -- net.sf.hibernate.type.StringType -- DEBUG -- returning 'CardiologyWard' as column: ward
05 Jan 2005 09:59:22 -- net.sf.hibernate.type.StringType -- DEBUG -- returning 'Omar Gani' as column: physician
05 Jan 2005 09:59:22 -- net.sf.hibernate.type.LongType -- DEBUG -- returning '1' as column: patientId
05 Jan 2005 09:59:22 -- net.sf.hibernate.type.StringType -- DEBUG -- returning 'Md. Safiqul Islam' as column: patient10_
05 Jan 2005 09:59:22 -- net.sf.hibernate.type.StringType -- DEBUG -- returning null as column: bedRoom
05 Jan 2005 09:59:22 -- net.sf.hibernate.type.LongType -- DEBUG -- returning '1' as column: departm12_
05 Jan 2005 09:59:22 -- net.sf.hibernate.type.LongType -- DEBUG -- returning '1' as column: wardId
05 Jan 2005 09:59:22 -- net.sf.hibernate.type.LongType -- DEBUG -- returning '1' as column: physici14_
05 Jan 2005 09:59:22 -- net.sf.hibernate.type.LongType -- DEBUG -- returning '10' as column: callId
05 Jan 2005 09:59:22 -- net.sf.hibernate.type.CalendarType -- DEBUG -- returning '1970-01-01 00:00:12' as column: delay
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- Version: 0
05 Jan 2005 09:59:22 -- net.sf.hibernate.type.LongType -- DEBUG -- returning '0' as column: wpreplyI1_
05 Jan 2005 09:59:22 -- net.sf.hibernate.loader.Loader -- DEBUG -- result row: 0
05 Jan 2005 09:59:22 -- net.sf.hibernate.type.LongType -- DEBUG -- returning '0' as column: wpreplyI1_
05 Jan 2005 09:59:22 -- net.sf.hibernate.loader.Loader -- DEBUG -- result row: 0
05 Jan 2005 09:59:22 -- net.sf.hibernate.loader.Loader -- DEBUG -- done processing result set (3 rows)
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.BatcherImpl -- DEBUG -- done closing: 0 open PreparedStatements, 0 open ResultSets
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.BatcherImpl -- DEBUG -- closing statement
05 Jan 2005 09:59:22 -- net.sf.hibernate.loader.Loader -- DEBUG -- total objects hydrated: 1
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- resolving associations for [com.sikraft.ihis.wardadministration.physicianreply.WPReplyDTO#0]
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- done materializing entity [com.sikraft.ihis.wardadministration.physicianreply.WPReplyDTO#0]
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- initializing non-lazy collections
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- flushing session
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- Flushing entities and processing referenced collections
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- Processing unreferenced collections
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- Scheduling collection removes/(re)creates/updates
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- Flushed: 0 insertions, 0 updates, 0 deletions to 1 objects
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.Printer -- DEBUG -- listing entities:
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.Printer -- DEBUG -- com.sikraft.ihis.wardadministration.physicianreply.WPReplyDTO{creationTime=2005-01-05 00:00:00, physician=Omar Gani, callId=10, creationDate=2005-01-05 00:00:00, status=1, physicianId=1, id=0, ward=CardiologyWard, department=Cardiology, departmentId=1, wardId=1, patientName=Md. Safiqul Islam, bedRoom=null, patientId=1, delay=1970-01-01 00:00:12, versionNumber=0}
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- executing flush
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- post flush
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- closing session
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- disconnecting session
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- transaction completion


05. And in the database I am seeing the id value 1.5000E-81

Regards,

Murad


Top
 Profile  
 
 Post subject: Stacktrace : SQLException
PostPosted: Sun Jan 02, 2005 2:01 am 
Newbie

Joined: Fri Dec 31, 2004 11:53 pm
Posts: 6
With same scenario I got the following exception stacktrace during fidning operation:
05 Jan 2005 11:43:32 -- net.sf.hibernate.util.JDBCExceptionReporter -- ERROR -- Could not execute query
java.sql.SQLException: Overflow Exception
at oracle.sql.NUMBER.toLong(NUMBER.java:376)
at oracle.jdbc.dbaccess.DBConversion.NumberBytesToLong(DBConversion.java:2990)
at oracle.jdbc.driver.OracleStatement.getLongValue(OracleStatement.java:4556)
at oracle.jdbc.driver.OracleResultSetImpl.getLong(OracleResultSetImpl.java:555)
at oracle.jdbc.driver.OracleResultSet.getLong(OracleResultSet.java:1601)
at net.sf.hibernate.type.LongType.get(LongType.java:18)
at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:62)
at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:53)
at net.sf.hibernate.loader.Loader.getKeyFromResultSet(Loader.java:427)
at net.sf.hibernate.loader.Loader.getRowFromResultSet(Loader.java:200)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:281)
at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:133)
at net.sf.hibernate.loader.Loader.doList(Loader.java:1033)
at net.sf.hibernate.loader.Loader.list(Loader.java:1024)
at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:854)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1544)
at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:39)
at org.springframework.orm.hibernate.HibernateTemplate$24.doInHibernate(HibernateTemplate.java:440)
at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:176)
at org.springframework.orm.hibernate.HibernateTemplate.executeFind(HibernateTemplate.java:196)
at org.springframework.orm.hibernate.HibernateTemplate.find(HibernateTemplate.java:434)
at com.sikraft.welkin.search.SearchDAO.findPersistantCapables(Unknown Source)
at com.sikraft.welkin.service.BaseJaxRPCService.findPersistantCapableDTOs(Unknown Source)
at com.sikraft.ihis.wardadministration.physicianreply.JaxRpcWPReplyService.findWPReplys(Unknown Source)
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.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:402)
at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:309)
at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:333)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:481)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:323)
at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:854)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:339)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:534)


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 02, 2005 5:00 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
what is the datatype for the seqence and id column ? its oracle that is generating this, not hibernate.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: Datatype of id field
PostPosted: Sun Jan 02, 2005 7:31 am 
Newbie

Joined: Fri Dec 31, 2004 11:53 pm
Posts: 6
Data type for Id field is Long... I think so.... But today I tested the thing with pure JDBC(With spring support).... Seems the problem is gone... But I dont wanna bypass Hibernate in these two components for this silly reason......Otherwise these two components will miss all lucrative facilities provided by Hibernate and I dont wanna lose consistency. Please suggest.....


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 02, 2005 8:02 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
did you reproduce this with hibernate ?

is there such a value in the column when querying with e.g. sqlplus etc ?

i dont see a hibernate error here - i see a oracle sequence or database driver problem - hibernate is reading directly from the jdbc and havent touched the values yet so its in the underlying mechanisms there is an error.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: Reply for your question
PostPosted: Sun Jan 02, 2005 8:37 am 
Newbie

Joined: Fri Dec 31, 2004 11:53 pm
Posts: 6
Yes , I reproduce the same scenario with Hibernate consistently......

Yes, quering with SQLPlus I am seeing these wiered values.......


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 02, 2005 8:42 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
ok - and it is oracle that is inserting those id values, correct ?

its done via oracle sequences which inserts them directly - not hibernate.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: Thanks for your prompt reply
PostPosted: Sun Jan 02, 2005 8:51 am 
Newbie

Joined: Fri Dec 31, 2004 11:53 pm
Posts: 6
Dear Max,

Thanks for your cooperation.... I also think its Oracle (Not even the driver) RDBMS which is doing this thing....

Regards,

Murad


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 10 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.