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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T04:48:46+00:00 2026-06-05T04:48:46+00:00

I have web project in which I am using OpenJAP for database connectivity. I

  • 0

I have web project in which I am using OpenJAP for database connectivity. I have configured the persistence.xml and I am able to connect to the database and retrieve the data. But in the console output I am seeing this entry

1953  OpenJPA  TRACE  [main] openjpa.jdbc.SQL - <t 31156635, conn 6888942> executing prepstmnt 9690924 

UPDATE student 
    SET scourse = ?, sname = ?, sroll = ? 
    WHERE id = ? 
[params=?, ?, ?, ?]

In my whole project till now I have not added any prepared statement or any update statement. I want to know why is OpenJPA executing this statement and what would be performance implication when I am fetching big data in the range of millions?

  • 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-05T04:48:47+00:00Added an answer on June 5, 2026 at 4:48 am

    I have added following code to my build.xml file

    <!-- ***************************************************************************************************************** -->
    <!-- DO NOT DELETE FOLLOWING CODE. THIS IS ADDED FOR ENCHANCING THE CLASSES AT COMPILE TIME. IT IS REQUIRED BY OPENJPA -->
    <!-- Define the classpath to include the necessary files. -->
    <!-- ex. openjpa jars, persistence.xml, orm.xml, and target classes  -->
    <path id="jpa.enhancement.classpath">
        <!-- Assuming persistence.xml/orm.xml are in WebContent/WEB-INF/classes/META-INF -->
        <pathelement location="WebContent/WEB-INF/classes" />
    
        <!-- Location of the .class files -->
        <pathelement location="build/classes" />
    
        <!-- Add the openjpa jars -->
        <fileset dir=".">
            <include name="**/lib/*.jar" />
        </fileset>
    </path>
    <!-- define the openjpac task; this can be done at the top of the -->
    <!-- build.xml file, so it will be available for all targets -->
    <taskdef name="openjpac" classname="org.apache.openjpa.ant.PCEnhancerTask" classpathref="jpa.enhancement.classpath" />
    
    <!-- invoke enhancer on all .class files below the model directory -->
    <openjpac>
        <classpath refid="jpa.enhancement.classpath" />
        <fileset dir=".">
            <include name="**/model/*.class" />
        </fileset>
    </openjpac>
    <echo message="Enhancement complete" />
    <!-- ***************************************************************************************************************** -->
    

    On adding this and setting the eclipse to use this build.xml file to create the WAR file. The objects are getting enhanced and I am not getting the “Executing the prepared statement” Trace in my log also it is not executing the extra “Update” statement.

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

Sidebar

Related Questions

I'm working on a Web project using Asp.Net MVC, which I'll have to deploy
I have an ASP.NET web application project which references another project called ModusCore (or
I have built a web setup project in VS2008 which installs my ASP.NET/Silverlight app
I have an ASP.NET project which has already some custom fields in it's web.config
I'm working on a web project, which have to process so many client requests.
I have a large project in Vb.net which drives a web browser control around.
I have a web application project that works with a quite large database (over
i have legacy j2ee project which is using struts 2 with spring. Now when
I have a web application Maven project, and I want to customize the web.xml
I have a web project using jsf2 implementing a gaming web site on tomcat7.

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.