Thought inc.

The Dynamic O/R Mapping Company
     

CocoBase Technical Support Forums
For access to developer site with software download and doc's, please request CocoBase download and password
will be emailed to you. Response to posts will appear when answered by THOUGHT Support team.
NOTE:You must register separately with forum in order to post your questions, please click on register icon below.
Home   Frequently Asked Questions   Search   Edit your profile   Registration is free!  
Email This Page to Someone!
Show a Printable Version
CocoBase Enterprise O/R Forums > CocoBase Questions
CocoBase 4.5 with Oracle 10g and WebSphere 6, incompatible?
< Previous Thread     Next Thread >
Author
Thread    Post New Thread     Post A Reply
CristianRubio
Member

Registered: Jun 2007
Posts: 9

Hello,

I think I'm using CocoBase 4.5 (not sure how to check the version).
I'm trying to migrate an application from Oracle 8i to 10g and from WebSphere 4 to 6. Do you know if the following problem is because of any incompatibility between cocobase and one of Wepsphere 6 or Oracle 10g ?
Any ideas will be welcome.

2007-06-18 11:57:27,731 [P=393711:O=0:CT] loadSAllObjects failed, no objects have been loaded: Cannot load all objects object; session invalid
error code: INVALIDSTATE_ERROR detail message: thought.CocoBase.CocoBaseException: CBMessage=Select failed due to a low level exception.CoreMessage=Negative scale CocoBaseErrorCode=DBSELECT_FAILURE

Many thyanks
Cristian

06-18-2007 08:29 AM
Click Here to See the Profile for CristianRubio    Find more posts by CristianRubio        Edit/Delete Message    Reply w/Quote    IP: Logged
admin
Administrator

Registered: Apr 2001
Posts: 19

To confirm your version of CocoBase:

You can check which version of CocoBase you're using, either by instantiating an instance of thought.CocoBase.CocoPowder, and printing the string cocopowderinstance.getVersion(), and/or you can check the version.txt file in your %coco_home%\version.txt file.

To resolve your issue with the NegativeScale, most likely this is resulting from bad jdbc result set meta data. By default, the CocoBase runtime in recent releases sets the cocoprop property of "use.resultscale" to true. What this property does is uses the Result Set Metadata to determine the scale of bigdecimal numbers (resultSetMetadata.getScale(fieldposition) is the specific facility. Sometimes jdbc drivers return invalid (negative) result scale values - and then when that jdbc value is used, then the resulting jdbc resultSet.getBigDecimal(fieldposition,scale) fails to read the value properly.

Have you enabled debug to confirm what's actually happening with the SQL to see if this is the problem?

THOUGHT Support

06-18-2007 10:56 AM
Click Here to See the Profile for admin    Find more posts by admin        Edit/Delete Message    Reply w/Quote    IP: Logged
CristianRubio
Member

Registered: Jun 2007
Posts: 9

Hi,

Many thnaks for your help and quick replay of this issue.

I have set the debugLevel to 5 and seems yolu are right, the problem is with the scale (See log dump below).

To fix it, is it as easy as set the cocoprop property of "use.resultscale" to false?

many thanks
Cristian

CocoPowder:: OP=<open_stmt> 2) Skipping where condition= TRADE_TYPE_CD
CocoPowder:: OP=<open_stmt> Getting next result set record any left.
CocoPowder:: OP=<open_stmt> Expecting 37 columns.
CocoPowder:: OP=<open_stmt> Added element = true
CocoPowder:: OP=<open_stmt> Added element = true
CocoPowder:: OP=<open_stmt> Added element = true
CocoPowder:: OP=<open_stmt> Added element = true
CocoPowder:: OP=<open_stmt> Added element = true
CocoPowderPlugin20:: OP=<open_stmt> Retrieved scale = -127 from result set meta data
CocoPowder:: Exception occurred for operation=select mapname=null passedObject = null secondParam=nullException = java.lang.ArithmeticException: Negative sale
CocoPowder:: Exception occurred for operation=select mapname=null passedObject = null secondParam=nullException = thought.CocoBase.CocoBaseException: CBMesage=Select failed due to a low level exception.CoreMessage=Negative scale CocoBaseErrorCode=DBSELECT_FAILURE
CocoPowder:: Exception occurred for operation=select mapname=com.db.espear.dal.lcm.VOpenTrade passedObject = CocoProxyM:toString: Wrappered Class= espearTrdeNo=null tradeVersionNo=null dersetstatStatusCd=null contrmatchStatusCd=null agentmatchStatusCd=null totalPendingQty=null totalPendingAmt=null totalAmt=null totalQty=null toleranceAmt=null settlementDate=null legalEntityId=5060 productTypeCd=null tradeTypeCd=null tradeTypeClass=null firmBookNo=null firmAccountType=null contraNo=null contraTypeCd=null contraAccountType=null buySellInd=null recDelInd=null price=null qtyNominal=null secNo=null secIdType=null secCcyCd=null pymtCcyCd=null exchangeCd=null netConsiderPymtCcyAmt=null valueDate=null tradeDate=null vestedTstp=null contraBrokerIdvalue=null tradeAltId=null settl transparent foreign keys={V_A_L_U_E__D_A_T_E=CBFieldInfo:criteria=6 value=2007-06-20 00:00:00.0} secondParam=selectException = thought.CocoBase.CocoBaseExeption: CBMessage=Select failed due to a low level exception.CoreMessage=Negative scale CocoBaseErrorCode=DBSELECT_FAILURE

06-19-2007 02:19 AM
Click Here to See the Profile for CristianRubio    Find more posts by CristianRubio        Edit/Delete Message    Reply w/Quote    IP: Logged
admin
Administrator

Registered: Apr 2001
Posts: 19

The cocoprop property "use.resultscale=false" tells the runtime to not try to use result set metadata to determine the correct scale and use a fixed scale instead (default is 10). Yes, please give this a try and see if that resolves the issue.

Let us know how that goes.
Thanks!
THOUGHT Support

06-20-2007 11:11 AM
Click Here to See the Profile for admin    Find more posts by admin        Edit/Delete Message    Reply w/Quote    IP: Logged
CristianRubio
Member

Registered: Jun 2007
Posts: 9

Hi,

I tried to set that flag and the problem was fixed

many thanks for your help

Cristian

06-25-2007 06:39 AM
Click Here to See the Profile for CristianRubio    Find more posts by CristianRubio        Edit/Delete Message    Reply w/Quote    IP: Logged
All times are PST (US)    Post New Thread     Post A Reply
Forum Jump:
< Previous Thread     Next Thread >

Forum Rules:
Who Can Read The Forum? Any registered user or guest.
Who Can Post New Topics? Any registered user.
Who Can Post Replies? Any registered user.
Changes: Messages can be edited by their author. Messages can be deleted by their author.
Posts: HTML code is OFF. Smilies are OFF. vB code is OFF. [IMG] code is OFF.

Admin Options:
Open / Close Thread
Move Thread
Delete Thread
Edit Thread

< Contact Us - THOUGHT Inc. >

Copyright © Jelsoft Enterprises Limited 2000.
Copyright 2001 All Rights Reserved, THOUGHT Inc.