Search code examples
jpaucanaccess

java.lang.StackOverflowError in context with UCanAccess and JPA


When I try to perform a JPA-Query, the UCanAccess Driver quits with a java.lang.StackOverflowError.

This used call is as simple as can be. With another Table this db request works fine.

final Tbltitel entity = (Tbltitel) entityManager.createNamedQuery("Tbltitel.findById")
   .setParameter("id", new Integer(14199)).getSingleResult();

The call with plain JDBC and the call via Jackcess against this table works also fine, so I guess, something went wrong with the UCanAccess Driver in Context with JPA.

A complete Eclipse Project with the Database and the JUnit Tests can be downloaded at "https://app.box.com/s/mun1se9y7gji24kg6xrx"

My set up: Windows 7 Professional 64 bit Microsoft Office 2013 NetBeans IDE 8.0 Java 1.8 UCanAccess-2.0.7-bin


Solution

  • As I said this issue seems to be related to EclipseLink and not to UCanAccess. Setting the annotation @Cacheable(false) on the class Tbllistofvalues, which is autoreferential, should solve the issue.