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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T03:28:32+00:00 2026-06-05T03:28:32+00:00

I’m currently trying to get hibernate to send my Java EE Entities in my

  • 0

I’m currently trying to get hibernate to send my Java EE Entities in my postgresql database using an EJB. My entity code (for testing, I use the simplest one) is :


import java.io.Serializable;

@Entity

public class Coup implements Serializable {

    private static final long serialVersionUID = 1L;

    @Column(unique=true, nullable=false)
    @Id
    private String name;

    @Column(nullable=false)
    private String jeu;

    public Coup() {
    }

    public Coup(String name, String jeu) {
        this.name = name;
        this.jeu = jeu;
    }

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getJeu() {
        return this.jeu;
    }

    public void setJeu(String jeu) {
        this.jeu = jeu;
    }

}

and my hibernate.xml file is

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
  <persistence-unit name="PostgresDSjeeux" transaction-type="JTA">
    <provider>org.hibernate.ejb.HibernatePersistence</provider>
    <jta-data-source>java:/PostgresDSjeeux</jta-data-source>
    <class>Equipe</class>
    <class>Joueur</class>
    <class>Salon</class>
    <class>Partie</class>
    <class>HautFait</class>
    <class>Coup</class>
    <properties>

    <!-- <property name="hibernate.connection.driver_class" value="org.postgresql.Driver"/>  -->  
      <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
      <property name="hibernate.show_sql" value="true" />
    <!-- <property name="transaction.factory_class" value="org.hibernate.transaction.JDBCTransactionFactory" /> --> 

    </properties>
  </persistence-unit>
</persistence>

However, after I execute this

            Coup c = new Coup();
            c.setJeu("superjeu");
            c.setName("supername");
                em.persist(c);

code, the generated query that I see in the JBOSS6 log is :

14:57:59,364 INFO  [STDOUT] Hibernate: insert into Coup (jeu, name) values (?, ?)

Thanks for any answer you might provide.

  • 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-05T03:28:33+00:00Added an answer on June 5, 2026 at 3:28 am

    I think that’s just a logging message from the PreparedStatement to show the bound parameters.

    Did you look in the database to see what was INSERTed? That’s the only thing that matters, not the log.

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

Sidebar

Related Questions

I have this code to decode numeric html entities to the UTF8 equivalent character.
I have thousands of HTML files to process using Groovy/Java and I need to
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 am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I want use html5's new tag to play a wav file (currently only supported
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and

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.