Bug 799273 - Failing SerializableInstanceDbTest jBPM test.
Failing SerializableInstanceDbTest jBPM test.
Status: VERIFIED
Product: JBoss Enterprise SOA Platform 5
Classification: JBoss
Component: JBPM - within SOA (Show other bugs)
5.3.0 GA
Unspecified Unspecified
medium Severity medium
: ER2
: 5.3.0 GA
Assigned To: Shelly McGowan
Marek Baluch
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-02 05:50 EST by Marek Baluch
Modified: 2016-09-20 01:08 EDT (History)
7 users (show)

See Also:
Fixed In Version: 5.3.0 GA
Doc Type: Bug Fix
Doc Text:
When using SerializableInstanceDbTest, an exception is thrown when an attempt is made to cast the retrieved ID (from the JBPM_BYTEARRAY table) to BigInteger.
Story Points: ---
Clone Of:
Environment:
MSSQL and Oracle databases.
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker JBPM-3654 Major Resolved Failing SerializableInstanceDbTest jBPM test. 2013-03-21 19:49:41 EDT

  None (edit)
Description Marek Baluch 2012-03-02 05:50:28 EST
Description of problem:

Test:
org.jbpm.context.exe.variableinstance.SerializableInstanceDbTest.testSerializableVariableKeepsId

is failing with message:

java.lang.ClassCastException: java.math.BigDecimal cannot be cast to java.math.BigInteger
    at  org.jbpm.context.exe.variableinstance.SerializableInstanceDbTest.getLatestDbId(SerializableInstanceDbTest.java:138)
    at org.jbpm.context.exe.variableinstance.SerializableInstanceDbTest.testSerializableVariableKeepsId(SerializableInstanceDbTest.java:69)
    at org.jbpm.db.AbstractDbTestCase.runTest(AbstractDbTestCase.java:73)

The exception is thrown when an attempt is made to cast the retrieved ID (from the JBPM_BYTEARRAY table) to BigInteger.

Additional info:

Looks like this is caused by Hibernate mapping the NUMERIC and NUMBER data type to BigDecimal when not specified otherwise.
Comment 1 Marco Rietveld 2012-03-12 07:22:57 EDT
Hi Marek,

Sorry, I thought I posted a comment to this before I went on PTO, but it's not showing up here. 

In any case, which DB did you see this with?
Comment 2 Marek Baluch 2012-03-12 07:42:54 EDT
Hi Marco! Welcome back!

NP - I know you where enjoying the snow;).

Which databases? All which declare the ID column on JBPM_BYTEARRAY as 'number' or 'numeric'. If I remember correctly then this includes mssql, sybase and oracle.
Comment 3 Rick Wagner 2012-03-19 17:39:23 EDT
GSS considers this medium priority.  jBPM gets plenty of attention, anything we can do to make it smoother is appreciated.
Comment 5 Marek Baluch 2012-06-07 10:28:18 EDT
On Len's request appending comment:

I don't think this is a regression. I was not able to found any bug fixes which would cause this error.
Comment 6 Suz 2012-06-12 02:04:56 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
When using SerializableInstanceDbTest, an exception is thrown when an attempt is made to cast the retrieved ID (from the JBPM_BYTEARRAY table) to BigInteger.
Comment 8 Marek Baluch 2012-06-22 04:30:18 EDT
Verified on SOA 5.3 ER4.
Comment 9 JBoss JIRA Server 2012-07-09 07:13:15 EDT
Marco Rietveld <marco.rietveld@redhat.com> updated the status of jira JBPM-3654 to Resolved

Note You need to log in before you can comment on or make changes to this bug.