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 6629437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T22:15:38+00:00 2026-05-25T22:15:38+00:00

I’m currently using Eclipse Indigo and I’d like to have my meta-model classes to

  • 0

I’m currently using Eclipse Indigo and I’d like to have my meta-model classes to be automatically generated in a sub-package instead of having them in the same package of my entities.

I’ve followed the instructions in the JPA User Guide for Canonical Model Generator on Eclipse Galileo, but it’s not working at all with Indigo. 🙁

Does anybody use the static meta-model classes in a sub-package? Is there any way to configure it on Eclipse Indigo?

  • 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-25T22:15:38+00:00Added an answer on May 25, 2026 at 10:15 pm

    Maybe you should not change package
    I would suggest against it, because having those in sub package (or any other) violates current JPA 2 specification:

    • For each managed class X in package p, a metamodel class X_ in
    package p is created.[67]
    …
    [67] We expect that the option of
    different packages will be provided in a future release of this
    specification.
    …
    Implementations of this specification are not
    required to support the use of non-canonical metamodel classes.
    Applications that use non-canonical metamodel classes will not be
    portable.

    Other way to organize is common JUnit practice: same package in different source directory.

    But if you have to, this is how it is done

    Following works at least with Eclipse version: Indigo Service Release 1 20110916-0149 and EclipseLink: eclipselink-2.3.0.v20110604-r9504. Names of the JARs can slightly vary from version to another.

    If enabled, disable generating to the same package where entities are:

    1. Go to Project Properties – JPA and check that value of Source Folder
      is <None>

    Adjusting generating to the other package:

    1. Properties – Annotation Processing
      [x] Enable project specific settings
      [x] Enable annotation processing
      [x] Enable processing in editor
      Generated source directory: src (or wherever sources live)
    2. New processor option:
      key=eclipselink.canonicalmodel.subpackage
      value=sub | (desired package name)
    3. Go one level deeper to the Annotation Processing | Factory Path and select Add External JARs and add following jars:
      eclipselink/jlib/jpajavax.persistence_2.0.3.v201010191057.jar
      eclipselink/jlib/jpaeclipselink-jpa-modelgen_2.3.0.v20110604-r9504.jar
      eclipselink/jlib/eclipselink.jar
    4. Let Eclipse rebuild project.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have thousands of HTML files to process using Groovy/Java and I need to
I have some data like this: 1 2 3 4 5 9 2 6
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a jquery bug and I've been looking for hours now, I can't
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
this is what i have right now Drawing an RSS feed into the php,

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.