Jakarta Persistence OneToOne Lazy Loading Exception in JBoss EAP 8

Solution Unverified - Updated -

Issue

  • Encountering 'org.hibernate.LazyInitializationException' during OneToOne relationship fetching
  • Error occurs when fetching Application via getter method in ApplicationGroup
  • Error message:
org.hibernate.LazyInitializationException: could not initialize proxy [org.ececd.Application#1] - no Session
2025-06-17 14:42:52,233 ERROR [stderr] (default task-1)     at org.hibernate@6.2.31.Final-redhat-00002//org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:165)
2025-06-17 14:42:52,233 ERROR [stderr] (default task-1)     at org.hibernate@6.2.31.Final-redhat-00002//org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:314)
2025-06-17 14:42:52,233 ERROR [stderr] (default task-1)     at org.hibernate@6.2.31.Final-redhat-00002//org.hibernate.proxy.pojo.bytebuddy.ByteBuddyInterceptor.intercept(ByteBuddyInterceptor.java:44)

Environment

  • Red Hat JBoss Enterprise Application Platform
    • 8.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content