SQL0134N error when running Enterprise JavaBeans (EJB) application against DB2 on zSeries
 Technote (troubleshooting)
 
Problem(Abstract)
EJB application receives SQL0134N:Improper use of a string column, host variable, constant, or function "". SQLSTATE=42907 when connecting to DB2® on OS/390®.
 
Cause
There is a bug in the WebSphere® Application Server V5.0.2 ejbdeploy code that generates CAST( ?  AS VARCHAR(32672))even if you specify that the target database is DB2 on OS/390 when you deploy your enterprise beans.

32672 is the maximum length of VARCHAR for the distributed platform.

255 is the maximum length of VARCHAR for version 6/version 7 DB2/390 .

This error is encountered during runtime if the enterprise beans are using JDBC for data access.

If you use SQLJ in your enterprise beans (for example, you use ejbdeploy with the -sqlj option to deploy your EAR), the error is caught during profile customization prior to run time.

 
Resolving the problem
This problem is fixed in cumulative fixes for 5.0.2.1 and greater, which are available for download from the WebSphere Application Server Support site.
If you cannot upgrade at this time, contact IBM® WebSphere Application Server support (1 800-IBM SERV) to obtain the EJB Deploy cumulative fix for version 5.0.2.

The fix pack or the cumulative fix must be applied to all servers with WebSphere Application Server Base and Network Deployment installations. After installing the fix, redeploy the application with the EJB code regeneration option.
 
 
Cross Reference information
Segment Product Component Platform Version Edition
Data & Information Management DB2 for OS/390
Application Servers Runtimes for Java Technology Java SDK
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > DB Connections/Connection Pooling
Operating system(s): Windows
Software version: 5.0.2
Software edition:
Reference #: 1155779
IBM Group: Software Group
Modified date: Oct 20, 2005