Sun Java System Application Server Platform Edition 9.0 Update 1 Release Notes

Java Persistence API

This section lists known issues and associated solutions related to the Java Persistence API.

The query compiler does not check all the rules as defined in the Java Persistence Language specification.

The query compiler does not check all the rules as defined in the Java Persistence Language chapter of the specification. In particular, it does not check:

An invalid query may compile but may cause a SQLException at runtime. Or it might happen that the underlying database is less restrictive and supports the generated SQL, but executing the same query on a different database fails with a SQLException.

Solution

Verify the above conditions manually.

In some cases, the query compiler throws a misleading error message, because it mentions the wrong token in the error message. (Glassfish ID 550)

For more information, see https://glassfish.dev.java.net/issues/show_bug.cgi?id=550.

Solution

Manually verify what is wrong in the query.

Two persistence units containing the same class cannot currently be deployed in the same EAR file.

Solution

Use different class names.

You cannot list MappedSuperclass explicitly using class element in persistence.xml. (Glassfish ID 558)

For more information, see https://glassfish.dev.java.net/issues/show_bug.cgi?id=558.

Solution

Do not list MappedSuperclass explicitly.

Unable to map null database values to primitives.

Solution

Use Java wrapper types for mapping to nullable database columns.