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

  • SEARCH
  • Home
  • 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 4026448
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T10:58:18+00:00 2026-05-20T10:58:18+00:00

In a Spring 3 app a controller is calling a JpaCollectorManager with calls a

  • 0

In a Spring 3 app a controller is calling a JpaCollectorManager with calls a JpaCollectorInfoDao to get a list which is defined by a nativequery. The query calls 2 seperate tables which uses sql and jpql because I need to use a postgresql feature not implemented in jpql. When the controller tries to file the list I get the following error message:

Exception [EclipseLink-6007] (Eclipse Persistence Services – 2.1.2.v20101206-r8635): org.eclipse.persistence.exceptions.QueryException
Exception Description: Missing descriptor for [CollectorInfo].
Query: ReadAllQuery(referenceClass=CollectorInfo sql=”select distinct ON ( col.collector_id,pst.process_source_type ) col.*,pst.process_source_timestamp,pst.process_source_type from perform_schema.collector col join perform_schema.process_set pst on pst.collector_id = col.collector_id order by col.collector_id, pst.process_source_type,pst.process_source_timestamp desc “)

The controller Java has the following call:

List<CollectorInfo> ps = this.collectorInfoManager.getLatestCollectorInfo();

The JpaCollectorInfoManager.java has this:

public List<CollectorInfo> getLatestCollectorInfo()
{
  return collectorInfoDao.getLatestCollectorInfo();
}

The JpaCollectorInfoDao.java:

  @Override
  @Transactional
  public List<CollectorInfo> getLatestCollectorInfo() {
    Query query = entityManager.createNativeQuery( ( "select     distinct ON ( col.collector_id," +
    "pst.process_source_type ) " + 
    "col.*," +
    "pst.process_source_timestamp," + 
    "pst.process_source_type " + 
    "from      perform_schema.collector col " +
    "join      perform_schema.process_set pst " +
     "on       pst.collector_id = col.collector_id " +
    "order by  col.collector_id, " +
    "pst.process_source_type," +
    "pst.process_source_timestamp desc " ),
     CollectorInfo.class );
    return ( (List<CollectorInfo>) query.getResultList() );
  }

The CollectorInfo class does not have an @Entity defined. If I set the @Entity defined then it tells me that the Table cannot be resolved (which is correct since the there is no actual table). I have tried all sorts of permutations and cannot seem to make this needle thread.

  • 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-05-20T10:58:19+00:00Added an answer on May 20, 2026 at 10:58 am

    Not sure what you are trying to do exactly?

    You need to map the class as an Entity in order to be able to select instances of it.

    Either, do not include the class, the native SQL query will an Object[] of the data, which you can map in your own code to your class.

    Or map it as an Entity excepting the data that you are returning. The @Table will not be relevant as you are mapping the object to the query results. This should not cause any errors though, unless you are auto creating table or using integrity checker.

    Or map the objects to the table correctly. Then use a fetch join, or batch fetch to optimize your retrieval if required.

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

Sidebar

Related Questions

My Spring MVC app is not allowing any logins and I can't figure out
In the Spring web app I am working on, there is a service layer
Let's say you've got a Spring web app with a structure like this: com/
I'm working through Peter Mularien's Spring Security 3, and am having a problem setting
Im trying to write a Filter for my web-app. I read [the documentation][1], and
I've got the following exception while trying to open the URL http://localhost:8080/app/clientes/agregar : javax.servlet.ServletException:
I was wondering if someone has already solved this. I have a SpringMVC app
I am using the MVC app as a service, so i have deleted the
I'm trying to save a selected image to a directory. My code is as
I haven't really done much on this side of project development so please forgive

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.