Re: Arithmetic overflow
Vladimir Puskas <[email protected]>
| Newsgroups | gmane.comp.java.enhydra.shark |
|---|---|
| Message-ID | <[email protected]> |
Hello Aaron Kernel uses on several places Long.MAX_VALUE/2 (4611686018427387903), and it should be acceptable for each db vendor. It seems that NUMERIC isn't big enough. Are there other types Sybase supports that could accept long values? regards -- Vlada you wrote: > Hi > > Now I am stuck on this error: > > Caused by: com.sybase.jdbc2.jdbc.SybSQLException: Arithmetic overflow > during implicit conversion of NUMERIC value '4611686018427387903' to a > NUMERIC field . > > at com.sybase.jdbc2.tds.Tds.processEed(Tds.java:2636) > at com.sybase.jdbc2.tds.Tds.nextResult(Tds.java:1996) > at > com.sybase.jdbc2.jdbc.ResultGetter.nextResult(ResultGetter.java:69) > at > com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:204) > at > com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:187) > at > com.sybase.jdbc2.jdbc.SybStatement.updateLoop(SybStatement.java:1615) > at > com.sybase.jdbc2.jdbc.SybStatement.executeUpdate(SybStatement.java:1598) > at > com.sybase.jdbc2.jdbc.SybPreparedStatement.executeUpdate(SybPreparedStatement.java:89) > at > com.lutris.appserver.server.sql.standard.StandardDBConnection.executeUpdate(StandardDBConnection.java:467) > at > com.lutris.appserver.server.sql.CoreDO.executeInsert(CoreDO.java:345) > at > com.lutris.dods.builder.generator.dataobject.GenericDO.executeInsert(GenericDO.java:352) > at > org.enhydra.shark.instancepersistence.data.ProcessDO.executeInsert(ProcessDO.java:2269) > at > com.lutris.appserver.server.sql.standard.StandardDBTransaction.write(StandardDBTransaction.java:654) > at > com.lutris.appserver.server.sql.standard.StandardDBTransaction.commit(StandardDBTransaction.java:296) > at > org.enhydra.shark.transaction.SharkDODSTransaction.commit(SharkDODSTransaction.java:59) > ... 27 more > > Any clue what wrong with the field names? Doing an sp_help on Processes > table I have the following: > > 1> sp_help Processes > 2> go > Name Owner > Object_type ------------------------------ > ------------------------------ > -------------------------------- > Processes dbo user > table > (1 row affected) > Data_located_on_segment When_created > ------------------------------ -------------------------- > default Jul 15 2005 3:44PM > Column_name Type > Length Prec > Scale Nulls Default_name > Rule_name Access_Rule_name Identity > ------------------------------ ------------------------------ > ----------- ---- > ----- ----- ------------------------------ > ------------------------------ ------------------------------ > -------- > Id varchar > 100 NULL > NULL 0 NULL > NULL NULL 0 > ProcessDefinition decimal > 9 19 > 0 0 NULL > NULL NULL 0 > PDefName varchar > 200 NULL > NULL 0 NULL > NULL NULL 0 > ActivityRequesterId varchar > 100 NULL > NULL 1 NULL > NULL NULL 0 > ActivityRequesterProcessId varchar > 100 NULL > NULL 1 NULL > NULL NULL 0 > ResourceRequesterId varchar > 100 NULL > NULL 0 NULL > NULL NULL 0 > ExternalRequesterClassName varchar > 254 NULL > NULL 0 NULL > NULL NULL 0 > State decimal > 9 19 > 0 0 NULL > NULL NULL 0 > Priority int > 4 NULL > NULL 0 NULL > NULL NULL 0 > Name varchar > 254 NULL > NULL 0 NULL > NULL NULL 0 > Created numeric > 9 18 > 0 0 NULL > NULL NULL 0 > Started numeric > 9 18 > 0 0 NULL > NULL NULL 0 > LastStateTime numeric > 9 18 > 0 0 NULL > NULL NULL 0 > LimitTime numeric > 9 18 > 0 0 NULL > NULL NULL 0 > Description varchar > 254 NULL > NULL 0 NULL > NULL NULL 0 > oid decimal > 9 19 > 0 0 NULL > NULL NULL 0 > version numeric > 9 18 > 0 0 NULL > NULL NULL 0 > index_name > index_description > index_keys > What could be the mismatch??? > > > Regards > Aaron > Aaron Galea wrote: > >> Hi >> >> In fact a NUMERIC had to be used. For me to solve this I had to >> execute the following sql commands: >> >> alter table XPDLS modify XPDLClassVersion NUMERIC >> alter table ProcessDefinitions modify ProcessDefinitionCreated NUMERIC >> NOT NULL >> >> I did not generate the sql scripts using dods. What I have done is >> went to directory input/sql/sybase/sql/ and modified the script files >> in there before doing "make && make install" for Shark. >> >> Regards >> Aaron >> >> Vladimir Puskas wrote: >> >>> Hello Aaron >>> >>> XPDLClassVersion is actually a long in Java, so defining it as >>> INTEGER is likely to be wrong. >>> >>> Apropos, how did you generated/fixed sql scripts for Sybase? >>> >>> regards >>>
message-footer.txt
(text/plain, 271 B)
-- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws