[Java programming language only]

Troubleshooting the JPA cache plug-in

Use this information to troubleshoot issues with your JPA cache plug-in configuration. These problems can occur in both Hibernate and OpenJPA configurations.

Procedure

  • Problem: The following exception displays: CacheException: Failed to get ObjectGrid server.

    With either an EMBEDDED or EMBEDDED_PARTITION ObjectGridType attribute value, the eXtreme Scale cache tries to obtain a server instance from the run time. In a Java™ Platform, Standard Edition environment, an eXtreme Scale server with embedded catalog service is started. The embedded catalog service tries to listen to port 2809. If that port is being used by another process, the error occurs.

    Solution: If external catalog service endpoints are specified, for example, with the objectGridServer.properties file, this error occurs if the host name or port is specified incorrectly. Correct the port conflict.

  • Problem: The following exception displays: CacheException: Failed to get REMOTE ObjectGrid for configured REMOTE ObjectGrid. objectGridName = [ObjectGridName], PU name = [persistenceUnitName]

    This error occurs because the cache cannot get the ObjectGrid instance from the provided catalog service end points.

    Solution: This problem typically occurs because of an incorrect host name or port.

  • Problem: The following exception displays: CacheException: Cannot have two PUs [persistenceUnitName_1, persistenceUnitName_2] configured with same ObjectGridName [ObjectGridName] of EMBEDDED ObjectGridType

    This exception results if you have many persistence units configured and the eXtreme Scale caches of these units are configured with the same ObjectGrid name and EMBEDDED ObjectGridType attribute value. These persistence unit configurations could be in the same or different persistence.xml files.

    Solution: You must verify that the ObjectGrid name is unique for each persistence unit when the ObjectGridType attribute value is EMBEDDED.

  • Problem: The following exception displays: CacheException: REMOTE ObjectGrid [ObjectGridName] does not include required BackingMaps [mapName_1, mapName_2,...]

    With a REMOTE ObjectGrid type, if the obtained client-side ObjectGrid does not have complete entity backing maps to support the persistence unit cache, this exception occurs. For example, five entity classes are listed in the persistence unit configuration, but the obtained ObjectGrid only has two BackingMaps. Even though the obtained ObjectGrid might have 10 BackingMaps, if any one of the five required entity BackingMaps are not found in the 10 backing maps, this exception still occurs.

    Solution: Make sure that your backing map configuration supports the persistence unit cache.