Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9235409
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T07:01:28+00:00 2026-06-18T07:01:28+00:00

EclipseLink 2.3.0 – same issue on 2.3.2 but stack trace from 2.3.0 Running into

  • 0

EclipseLink 2.3.0 – same issue on 2.3.2 but stack trace from 2.3.0

Running into an issue where batch fetch and fetch join are not playing nicely with each other. I have a query like

select obj from Parent
   left join fetch obj.elementCollection

with hints eclipselink.batch = obj.oneToMany and eclipselink.batch.type = IN.

in the Parent object, there is an @ElementCollection and a @OneToMany, where the @OneToMany is batch-fetched and the @ElementCollection is joined (batch fetch on it instead seemed to have no effect).

It breaks with the below error; changing the batch type from IN to EXISTS makes it work.

java.lang.NullPointerException
   at org.eclipse.persistence.mappings.OneToOneMapping.extractBatchKeyFromRow(OneToOneMapping.java:624)
   at org.eclipse.persistence.mappings.ForeignReferenceMapping.extractResultFromBatchQuery(ForeignReferenceMapping.java:524)
   at org.eclipse.persistence.internal.indirection.NoIndirectionPolicy.valueFromBatchQuery(NoIndirectionPolicy.java:294)
   at org.eclipse.persistence.mappings.ForeignReferenceMapping.batchedValueFromRow(ForeignReferenceMapping.java:215)

Any ideas – am I doing something wrong or is this a bug?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T07:01:30+00:00Added an answer on June 18, 2026 at 7:01 am

    Please try the 2.4 release, and log a bug if the error still occurs.

    You should be able to batch fetch the element collection as well. If you cannot, please log a bug with a test case.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have run into a EclipseLink issue with multiple queries running against the DB
I ran into a strange issue while using JPA (with EclipseLink 4.2.1). The relevant
I have entities which are created from eclipseLink.I am trying to use the same
Using the EclipseLink JPA2 implementation (not sure if it's the same with the Hibernate
I'm trying to setup Eclipselink on TomEE but i ran into the problem that
I'm having real difficulty getting the eclipselink.join-fetch hint to work in glassfish. I have
I have a problem with JPA (EclipseLink). I am not able to delete a
We are using Eclipselink for ORM, but we have a need for some more
I want to use JPA (eclipselink) to get data from my database. The database
I am using EclipseLink as a JPA provider. I am facing issue with version

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.