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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:44:09+00:00 2026-05-25T11:44:09+00:00

My problem is this exception: Caused by: <openjpa-2.1.1-r422266:1148538 nonfatal user error> org.apache.openjpa.persistence.ArgumentException: This configuration

  • 0

My problem is this exception:

Caused by: <openjpa-2.1.1-r422266:1148538 nonfatal user error> org.apache.openjpa.persistence.ArgumentException: This configuration disallows runtime optimization, but the following listed types were not enhanced at build time or at class load time with a javaagent: "

I’m trying to get an very simple java application with jsf and jpa running, but there seems to be a problem with the enhancement of my entities. As far as I know, tries OpenJPA to enhance my entities at runtime, which are listet in the persistence.xml, however there is no agent to do this. The keyword for this is: Enhancing at Runtime, right?

I thought the enhancement will automatically done by the application server at deployment? How can I configure this?

My exactly environment:

  • Glassfish 3.1.1
  • Derby, which is integrated in Glassfish
  • OpenJPA 2.1.1
  • Mojarra JSF 2.1.3

Update #1:

After some comments I’ve added the following lines to my persistence.xml:

<property name="openjpa.DynamicEnhancementAgent" value="false"/>
<property name="openjpa.RuntimeUnenhancedClasses" value="supported" />

It works now, but OpenJPA throw this warning:

SEVERE: 52  myApp  WARN   [http-thread-pool-8080(5)] openjpa.Enhance - Creating subclass for "[class myApp.model.entities.AbstractEntity, class myApp.model.entities.Post]". 
This means that your application will be less efficient and will consume more memory than it would if you ran the OpenJPA enhancer. Additionally, lazy loading will not be available for one-to-one and many-to-one persistent attributes in types using field access; they will be loaded eagerly instead.

I think this can’t be the solution.

Update #2:

Refer to fvu’s answer, I’ve tried to define the -javaagent jvm parameter in the domain.xml and over the web admin console. After a restart appeared the problem again.

Update #3:

Refer to update #2, I’ve played a bit around. There must be thrown an error, when the -javaagent parameter is used, but the file is missing, right?. Yes, there it is:

Waiting for domain1 to start .Command start-domain failed.
Error starting domain domain1.
The server exited prematurely with exit code 1.
Before it died, it produced the following output:

Error occurred during initialization of VM
agent library failed to init: instrument
Error opening zip file or JAR manifest missing : /tmp/openjpa.jar

If I copying the agent to this location, this error doesn’t appear, but openjpa could still not enhance my entities!

  • 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-25T11:44:10+00:00Added an answer on May 25, 2026 at 11:44 am

    If you’re still having issues… I’d highly recommend biting the bullet and setting up build time enhancement. You’ll be much happier in the long run if you get that going.

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

Sidebar

Related Questions

I'm new to Ruby, so I'm having some trouble understanding this weird exception problem
I need to check if an exception is caused by some database problem. I
**How to solve this ERROR/AndroidRuntime(328): Caused by: java.lang.IndexOutOfBoundsException: Invalid index 10, size is 10
I'm constantly getting the following exception which is caused by a user initiating a
I just discovered this problem today, and I had no idea what caused this
This problem drives me nuts, because the max_execution_time in the php.ini and in the
Problem This question actually came up at work today. We are planning an experiment
Problem : This is a probably a very basic question, but how do I
I'm running in to the same problem this individual has . Specifically, I'm trying
I have this pattern written ^.*\.(?!jpg$|png$).+$ However there is a problem - this pattern

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.