开发者

H2 (embedded) Database in Java - StackOverflowError

开发者 https://www.devze.com 2023-01-29 05:28 出处:网络
I use embedded H2 Database in Java SE project (jdbc:h开发者_如何学JAVA2:file:...) with JPA 2.0 (EclipseLink 2.1.1). I set also set MODE=Derby in jdbc url connection. Everything worked perfect till I a

I use embedded H2 Database in Java SE project (jdbc:h开发者_如何学JAVA2:file:...) with JPA 2.0 (EclipseLink 2.1.1). I set also set MODE=Derby in jdbc url connection. Everything worked perfect till I added some new entities and tried to persist them. I'm getting StackOverflowError :( I guess it's connected with h2 database file optimization/compacting/??? process, because file size is growing huge (should be ~1MB but it's 60MB and 40MB temp file). The question is - what is going on and how can I turn it off? db file is corrupted due to StackOverflowError :]

Thanks for any help!


Infinite recursion is the cause. You'll have to find it. AOP can be used to intercept and log every method invocation. When recursion starts you'll be able to notice a pattern of repeated method invocations which will luckily lead you to the one calling itself.

0

精彩评论

暂无评论...
验证码 换一张
取 消