Bugs and Features

This section describes the bugs and features found on the GlassFish / TopLink / Oracle configuration, when comparing to the JBoss configuration as used in the book.

  1. Select statement in EJB-QL needed

  2. Enum over IIOP
    Exception [TOPLINK-115] (Oracle TopLink Essentials - 2006.8 (Build 060830)): oracle.toplink.essentials.exceptions.DescriptorException

Exception Description: No conversion value provided for the attribute [BIG_SPENDAH].

Mapping: oracle.toplink.essentials.mappings.DirectToFieldMapping[customerType-->CUSTOMER_TABLE.CUSTOMERTYPE]

Descriptor: RelationalDescriptor

  1. Not possible to automatically store Serializable object at BLOB

    Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.8 (Build 060830)): oracle.toplink.essentials.exceptions.DatabaseException

Internal Exception: java.sql.SQLException: Ongeldig kolomtype.Error Code: 17004

Call:INSERT INTO CUSTOMER_TABLE (CUST_ID, CUSTOMERTYPE, TIMECREATED, FIRSTNAME, PICTURE, LASTNAME) VALUES (?, ?, ?, ?, ?, ?)

bind => [1, BIG_SPENDAH, 21:33:23, Bill, com.titan.domain.JPEG@de299f, Burke]

Query:InsertObjectQuery(com.titan.domain.Customer@d51b41)

  1. @AttributeOverrides does not work on @EmbeddedId (It does work on @Embedded)
    Exception [TOPLINK-46] (Oracle TopLink Essentials - 2006.8 (Build 060830)): oracle.toplink.essentials.exceptions.DescriptorException

Exception Description: There should be one non-read-only mapping defined for the primary key field [CUSTOMER.CUSTOMER_LAST_NAME].

Descriptor: RelationalDescriptor

  1. Temporal type requires @Temporal annotation
    [java] Exception in thread "main" Local Exception Stack:

[java] Exception [TOPLINK-7214] (Oracle TopLink Essentials - 2006.8 (Build 060830)): oracle.toplink.essentials.exceptions.ValidationException

[java] Exception Description: The attribute [expirationDate] from the entity class [class com.titan.domain.CreditCard] does not specify a temporal type. A temporal type must be specified for persistent fields or properties of type java.util.Date and java.util.Calendar.

[java] at oracle.toplink.essentials.exceptions.ValidationException.noTemporalTypeSpecified(ValidationException.java:1164)

  1. One to many should not have @JoinColumn specified
    [java] Exception [TOPLINK-7160] (Oracle TopLink Essentials - 2006.8 (Build 060830)): oracle.toplink.essentials.exceptions.ValidationException

[java] Exception Description: @OneToMany for attribute name [phoneNumbers] in entity class [class com.titan.domain.Customer] should not have @JoinColumn(s) specified. In the case where the @OneToMany is not mapped by another entity (that is, it is the owning side and is uni-directional), it should specify (optional through defaulting) a @JoinTable.

[java] at oracle.toplink.essentials.exceptions.ValidationException.uniDirectionalOneToManyHasJoinColumnAnnotations(ValidationException.java:1172)

  1. Number and Date default column names but Reserved keywords
    [java] Internal Exception: java.sql.SQLException: ORA-00904: : invalid identifier

[java] Error Code: 904

[java] Call:CREATE TABLE PHONE (ID NUMBER(10) NOT NULL, TYPE NUMBER(3) NULL, NUMBER VARCHAR2(255) NULL, PRIMARY KEY (ID))

  1. find need not go to the database.
    manager.refresh(Entity) does go to the database when used inside an transaction.

    setHint("toplink.refresh", "true"). Doesnt seem to help


  2. Table per class is not supported
    [#|2007-07-30T15:13:36.578+0200|SEVERE|sun-appserver-pe9.0|javax.enterprise.system.tools.deployment|_ThreadID=11;_ThreadName=Timer-3;_RequestID=0fcd193f-d335-44d9-ae83-e58eb7650310;|Exception occured in J2EEC Phase

com.sun.enterprise.deployment.backend.IASDeploymentException: Deployment Error --

Exception Description: Table per class inheritance is not supported. Entity class [class com.titan.domain.Person].

at oracle.toplink.essentials.exceptions.ValidationException.tablePerClassInheritanceNotSupported(ValidationException.java:1399)

  1. When using the EJB QL, DISTINCT is always inserted. (* seems to work with new toplink version)

  2. No query can be done on entity object as parameter of query (the entity object can be the result of some part inside the query), but then not always (scary!) (* seems to work with new toplink version)

  3. Order of FROM statements must match order of WHERE clauses with parameters, else the parameter does not match (toplink bug!) (* seems to work with new toplink version)

  4. The NOT MEMBER OF delivers the same results (and same SQL QUERY) as the MEMBER OF query. (* with the new toplink version this yields a NPE)

  5. Long / Double results from aggregate results that are directly put in a report object must be present on the constructor as wrapper types, not primitive types. This seems to not be defined in the spec.

  6. HAVING must apply to the grouping item
    [java] Caused by: Exception [TOPLINK-8017] (Oracle TopLink Essentials - 2006.8 (Build 060830)): oracle.toplink.essentials.exceptions.EJBQLException

[java] Exception Description: Invalid HAVING expression [COUNT(res) > 1] for query with grouping [GROUP BY cr.name]. The HAVING clause must specify search conditions over the grouping items or aggregate functions that apply to grouping items.

[java] at oracle.toplink.essentials.exceptions.EJBQLException.invalidHavingExpression(EJBQLException.java:266)

[java] at oracle.toplink.essentials.internal.parsing.HavingNode.validate(HavingNode.java:51)

  1. The primary key is claimed to be null during execution of a @NamedNativeQuery ( In the example below it is actually 8. This is because of a mismatch in casing in the column declaration in the java code and the actual value of the column name in the result. Changing to all upper case (as returned by the SQL query helps)

    [java] Exception [TOPLINK-6044] (Oracle TopLink Essentials - 2006.8 (Build 060830)): oracle.toplink.essentials.exceptions.QueryException

[java] Exception Description: The primary key read from the row [DatabaseRecord(

[java] => 8

[java] => 978-555-5555

[java] PHONE.TYPE => 1)] during the execution of the query was detected to be null. Primary keys must not contain null.

[java] Query: ReadAllQuery(com.titan.domain.Phone)

[java] at oracle.toplink.essentials.exceptions.QueryException.nullPrimaryKeyInBuildingObject(QueryException.java:807)

[java] at oracle.toplink.essentials.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:351)

  1. The primary key is claimed to be null during a result set mapping, the actual query executed on the database does not return null, yet it seems as if null were returned. (Column casing problem, same is issue 16)
    [java] Exception [TOPLINK-6044] (Oracle TopLink Essentials - 2006.8 (Build 060830)): oracle.toplink.essentials.exceptions.QueryException

[java] Exception Description: The primary key read from the row [DatabaseRecord(

[java] CRUISE.ID => null

[java] CRUISE.NAME => null

[java] CRUISE.SHIP_ID => null)] during the execution of the query was detected to be null. Primary keys must not contain null.

[java] Query: ResultSetMappingQuery(com.titan.domain.Cruise)

  1. FetchType = Lazy causes depoyment error on Glassfish
    Known issue https://glassfish.dev.java.net/issues/show_bug.cgi?id=3295
    [#|2007-08-02T21:26:49.359+0200|INFO|sun-appserver-pe9.0|javax.enterprise.system.stream.out|_ThreadID=11;_ThreadName=Timer-3;|[TopLink Severe]: 2007.08.02 09:26:49.359--ServerSession(31221138)--Local Exception Stack:

Exception [TOPLINK-0] (Oracle TopLink Essentials - 2006.8 (Build 060830)): oracle.toplink.essentials.exceptions.IntegrityException

Descriptor Exceptions:

---------------------------------------------------------


Exception [TOPLINK-60] (Oracle TopLink Essentials - 2006.8 (Build 060830)): oracle.toplink.essentials.exceptions.DescriptorException

Exception Description: The method [_toplink_setcreditCard_vh] or [_toplink_getcreditCard_vh] is not defined in the object [com.titan.domain.Customer].

Internal Exception: java.lang.NoSuchMethodException: com.titan.domain.Customer._toplink_getcreditCard_vh()

Mapping: oracle.toplink.essentials.mappings.OneToOneMapping[creditCard]

Descriptor: RelationalDescriptor(com.titan.domain.Customer --> [DatabaseTable(CUSTOMER)])


Exception [TOPLINK-60] (Oracle TopLink Essentials - 2006.8 (Build 060830)): oracle.toplink.essentials.exceptions.DescriptorException

Exception Description: The method [_toplink_setaddress_vh] or [_toplink_getaddress_vh] is not defined in the object [com.titan.domain.Customer].

Internal Exception: java.lang.NoSuchMethodException: com.titan.domain.Customer._toplink_getaddress_vh()

Mapping: oracle.toplink.essentials.mappings.OneToOneMapping[address]

Descriptor: RelationalDescriptor(com.titan.domain.Customer --> [DatabaseTable(CUSTOMER)])

  1. Sun Application Server cannot handle Annotationless Stateless Session Bean (11.3)

  2. The number of connections handled by Oracle XE need to be increased. I used:
    alter system set sessions=225 scope=spfile;
    alter system set processes=200 scope=spfile;
    Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: Listener refused the connection with the following error:

ORA-12516, TNS:listener could not find available handler with matching protocol stack

The Connection descriptor used by the client was:

  1. The message sending bean hangs on close() this probably has to do with bug:
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6514413

  2. It is apparently not allowed to bind an object when there is no transaction yet. I get the following exception:
    Exception [TOPLINK-23005] (Oracle TopLink Essentials - 2006.8 (Build 060830)): oracle.toplink.essentials.exceptions.TransactionException

Exception Description: Error binding to externally managed transaction

Internal Exception: java.lang.IllegalStateException: Operation not allowed


Back to the index Remarks on the book.


UUIDs and information about UUIDs
If you have improvements, contact information on the homepage of this host.
The uptime of this host


Search for more information :
Google
`