Sun Java System Application Server Platform Edition 9 Release Notes

An UPDATE or DELETE query using a subquery in the WHERE clause results in a NullPointerException during query compilation.

See https://glassfish.dev.java.net/issues/show_bug.cgi?id=572 for more information.

Solution

Do not use this type of query.