EJB mapping error on MSSQL TEXT datatype columns (WebSphere)
I used bottom-up mapping from existing tables to CMPs and everything
appeared to be fine until I tried to add Finder methods against tables
that contain SQL Server Text datatype columns -- the EJB deployment
descriptor saved okay, but when I tried to generate the Deploy and RMIS
code, I got this error message:
WQRY0115E: internal metadata mapping error. View mytablenameBean has a
type mismatch for field 10.
The 10th column listed in the mapping for this table is of datatype
Text, mapped to java.lang.String.I can run this bean, the method getter and setter of TEXT field can access database correctly.
This same error appears for another table that has 2 Text columns (type
mismatch for fields 25 and 31, which are Text datatype columns) when I
try to define Finder methods on that table.
On another table that does not have any Text datatypes, I can define
Finder methods with no problems.
I'm using WSAD 5.0 and generating EJB 1.1 / 2.0 beans with MS SQL 2k
I found that in ejbModule/websphere_deploy/MSSQLSERVER_V7_1/ directory
Bean_AdaptorBinding.java file,
TEXT field is mapping to
com.ibm.ObjectQuery.engine.OSQLSymbols._LVARCHAR
other field is mapping to
com.ibm.ObjectQuery.engine.OSQLSymbols._VARCHAR
BeanFunctionSet.java file, TEXT fiels is mapping to
java.sql.Types.LONGVARCHAR
other field is mapping to java.sql.Types.VARCHAR
Any suggestions? Thanks,