PQ80975: WHEN USING DYNAMIC QUERY WITHIN WEBSPHERE APPLICATION SERVER 5.0ENTERPRISE TO CREATE CMP ENTITY BEAN, CSIEXCEPTION IS THROWN

APAR status
Closed as program error.

Error description
Using WebSphere Application Server 5.0.x Enterprise Edition
Dynamic Query feature to create a CMP entity bean causes the
following exception to be thrown:
com.ibm.websphere.ejbquery.QueryException: CSIException while
creating remote object
at
com.ibm.websphere.eexquery.EEXConfig.makeObjectFromData(EEXConfi
g.java:724)

at
com.ibm.ObjectQuery.eval.FunctionScalarMakeBO.evaluateWildcard(F
unctionScalarMakeBO.java:153)
...
A trace reveals that the root cause of this is a problem with
casting a BigDecimal field type to double.  A ClassCastException
is thrown:
java.lang.ClassCastException: java.math.BigDecimal
 at
com.ibm.ws.ejbpersistence.dataaccess.RawBeanData.getDouble(Unkno
wn Source)
...
Local fix
Work-arounds include:
1.    change the ejb cmp field type to BigDecimal instead of
double.
2.    change the table column type to double instead of decimal.
In both #1 and #2 the mapping does not involve any type
conversion and this should eliminate the problem.
3.    do the mapping with a converter function.  An explicit
transformation function such as
com.ibm.vap.converters.VapBigDecimalToDoubleConverter should
eliminate the problem.
Problem summary
****************************************************************
* USERS AFFECTED: User of WebSphere Applicaction Server PME    *
*                 edition 5.0, 5.0.1 and 5.0.2 who have a      *
*                 Business Object containing a type double     *
*                 and have mapped it to a DECIMAL column in    *
*                 their Relational Data Base using the         *
*                 meet-in-the-middle mapping.                  *
****************************************************************
* PROBLEM DESCRIPTION: A CSIexception is thrown when the user  *
*                      attepts a query of a business object    *
*                      which has a mapping of a type double    *
*                      to the DECIMAL column, where the        *
*                      mapping was set up using                *
*                      meet-in-the-middle.                     *
****************************************************************
* RECOMMENDATION:                                              *
****************************************************************
A CSIexception is thrown when the user attepts a query of a
business object which has a mapping of a type double to the
DECIMAL column, where the mapping was set up using
meet-in-the-middle.

This error will not occur if a top-down mapping is used.
Or if the user supplies their own converter function.
Problem conclusion
A fix has been provided to map the double type correctly to the
DECIMAL field.   This is as a efix and will be corrected in the
next release.
Temporary fix Comments
APAR information
APAR number PQ80975
Reported component name WAS ENTERPRISE
Reported component ID 5630A3700
Reported release 00W
Status CLOSED PER
PE NoPE
HIPER NoHIPER
Special Attention NoSpecatt
Submitted date 2003-11-14
Closed date 2004-01-26
Last modified date 2004-01-26

APAR is sysrouted FROM one or more of the following:

APAR is sysrouted TO one or more of the following:

Modules/Macros

Publications Referenced

Fix information

Applicable component levels
R003 PSY    UP
R00A PSY    UP
R00H PSY    UP
R00I PSY    UP
R00S PSY    UP
R00W PSY    UP


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > Enterprise Edition (EE)
Operating system(s):
Software version: 00W
Software edition:
Reference #: PQ80975
IBM Group: Software Group
Modified date: Jan 26, 2004