Error During the Import of Database Tables

Problem

Entity import of database tables cannot be started.

When opening the wizard with Create JPA entities from tables, an error message appears:

Error reading metadata.

Reason:
Unable to create requested service [org.hibernate.cache.spi.RegionFactory]


No tables can be selected and the "Finish" button where you can start the import is disabled.

Solution

Occurs in Rapid Clipse 2.3.x for projects that were already updated to version 3.0.0 RapidClipse Frameworks.


This error is due to a project configuration that no longer matches the new framework version.

The RapidClipse Framework Versions 1.3.0 and early versions of 3.0.0-SNAPSHOT work with EhCache 2, the project configuration is adapted to that, including entries in the persistence.xml.

However, Framework-Version 3.0.0 works with EhCache 3

So, since some classes of EhCache 2 (e.g. the EhCacheRegionFactory class) cannot be found, some functions now no longer work.



  • The simple solution:

Update the RapidClipse IDE to the current version.

Die RapidClipse 3.0.1 - IDE passt Projekte automatisch an, so dass Projekt-Konfiguration wieder zu den Versionen der Dependencies, den eingebundenen Jars passt.


  • If it is not possible to change the RapidClipse version, you can manually adjust the project:

Editing the persistence.xml:

Edit the entry "hibernate.cache.region.factory_class":

However, RapidClipse 2.3.x with RC Framework 3.0.0 is generally not recommended, because under certain circumstances further problems may occur!