IBM Support

Using the static SQL option for Java Persistence API (JPA) with DB2 for z/OS

Troubleshooting


Problem

Applications that implement the Java™ Persistence API (JPA) and are configured to run static Structured Query Language (SQL) can experience various exceptions. These exceptions might occur with the wsdb2gen command, which you can use to prepare the application, or when the application is running and calls a JPA method.

Symptom

You might receive any of the following exceptions:

  • SQLException sqlcode -516 reported from PureQuery run time for SQLs run statically for IBM i (formerly i5/OS and iSeries)

  • SQLException sqlcode -270 occurs when using the RowChangeTimestamp version strategy and a DB2 z/OS database.

  • DataRuntimeException or ClassCastException occurs when running SQL.
[{"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":"DB Connections\/Connection Pooling","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.0","Edition":"Base;Network Deployment","Line of Business":{"code":"LOB77","label":"Automation Platform"}}]

Log InLog in to view more of this document

This document has the abstract of a technical article that is available to authorized users once you have logged on. Please use Log in button above to access the full document. After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.

Document Information

More support for:
WebSphere Application Server

Software version:
7.0

Operating system(s):
IBM i

Document number:
358443

Modified date:
03 March 2025

UID

swg21317999

Manage My Notification Subscriptions