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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T15:24:13+00:00 2026-06-06T15:24:13+00:00

a friend and I develop a web application for conferences management that uses hibernate

  • 0

a friend and I develop a web application for conferences management that uses hibernate (school project).
When I start the application the db (mysql) tables are created with some data.
Until recently everything worked well, but yesterday my friend entered functionality to assign participant to conference, and whenever I try to use it I get the following (cleared the console just before this action):

Hibernate: 
    select
        conference0_.conferenceId as conferen1_2_,
        conference0_.active as active2_,
        conference0_.description as descript3_2_,
        conference0_.endDate as endDate2_,
        conference0_.location_name as location7_2_,
        conference0_.name as name2_,
        conference0_.startDate as startDate2_ 
    from
        test.CONFERENCES conference0_ 
    where
        conference0_.name=?
Hibernate: 
    select
        location0_.name as name5_0_,
        location0_.active as active5_0_,
        location0_.address as address5_0_,
        location0_.contactName as contactN4_5_0_,
        location0_.locationId as locationId5_0_,
        location0_.maxCapacity as maxCapac6_5_0_,
        location0_.phone1 as phone7_5_0_,
        location0_.phone2 as phone8_5_0_ 
    from
        test.LOCATION location0_ 
    where
        location0_.name=?
Hibernate: 
    select
        user0_.userId as userId1_,
        user0_.active as active1_,
        user0_.admin as admin1_,
        user0_.company_companyID as company13_1_,
        user0_.email as email1_,
        user0_.lastLogin as lastLogin1_,
        user0_.name as name1_,
        user0_.pasportID as pasportID1_,
        user0_.password as password1_,
        user0_.phone1 as phone9_1_,
        user0_.phone2 as phone10_1_,
        user0_.salt as salt1_,
        user0_.userName as userName1_ 
    from
        test.Users user0_ 
    where
        user0_.userName=?
Hibernate: 
    select
        company0_.companyID as companyID0_0_,
        company0_.active as active0_0_,
        company0_.companyType as companyT3_0_0_,
        company0_.name as name0_0_ 
    from
        test.Company company0_ 
    where
        company0_.companyID=?
Hibernate: 
    alter table test.CONFERENCES 
        drop 
        foreign key FKC0DCF2B7133695CF
04/06/2012 22:42:32 org.hibernate.tool.hbm2ddl.SchemaExport execute
INFO: HHH000227: Running hbm2ddl schema export
Hibernate: 
    alter table test.Conferences_Participants 
        drop 
        foreign key FK5D9C90484DAAAE9B
Hibernate: 
    alter table test.Conferences_Participants 
        drop 
        foreign key FK5D9C9048751CA8AA
Hibernate: 
    alter table test.Conferences_Users 
        drop 
        foreign key FK7EAAE2604DAAAE9B
Hibernate: 
    alter table test.Conferences_Users 
        drop 
        foreign key FK7EAAE260751CA8AA
Hibernate: 
    alter table test.Users 
        drop 
        foreign key FK4E39DE8B5D743AE
Hibernate: 
    drop table if exists test.CONFERENCES
Hibernate: 
    drop table if exists test.Company
Hibernate: 
    drop table if exists test.Conferences_Participants
Hibernate: 
    drop table if exists test.Conferences_Users
04/06/2012 22:42:33 org.hibernate.tool.hbm2ddl.SchemaExport execute
INFO: HHH000230: Schema export complete
04/06/2012 22:42:33 org.hibernate.cfg.Configuration configure
INFO: HHH000043: Configuring from resource: /hibernate.cfg.xml
04/06/2012 22:42:33 org.hibernate.cfg.Configuration getConfigurationInputStream
INFO: HHH000040: Configuration resource: /hibernate.cfg.xml
04/06/2012 22:42:33 org.hibernate.cfg.Configuration doConfigure
INFO: HHH000041: Configured SessionFactory: null
04/06/2012 22:42:33 org.hibernate.mapping.RootClass checkCompositeIdentifier
WARN: HHH000038: Composite-id class does not override equals(): model.ConferencesParticipants
04/06/2012 22:42:33 org.hibernate.mapping.RootClass checkCompositeIdentifier
WARN: HHH000039: Composite-id class does not override hashCode(): model.ConferencesParticipants
04/06/2012 22:42:33 org.hibernate.mapping.RootClass checkCompositeIdentifier
WARN: HHH000038: Composite-id class does not override equals(): model.ConferencesUsers
04/06/2012 22:42:33 org.hibernate.mapping.RootClass checkCompositeIdentifier
WARN: HHH000039: Composite-id class does not override hashCode(): model.ConferencesUsers
04/06/2012 22:42:33 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
INFO: HHH000402: Using Hibernate built-in connection pool (not for production use!)
04/06/2012 22:42:33 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
INFO: HHH000115: Hibernate connection pool size: 1
04/06/2012 22:42:33 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
INFO: HHH000006: Autocommit mode: false
04/06/2012 22:42:33 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
INFO: HHH000401: using driver [com.mysql.jdbc.Driver] at URL [jdbc:mysql://localhost:3306/test]
04/06/2012 22:42:33 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
INFO: HHH000046: Connection properties: {user=root, password=****}
Hibernate: 
    drop table if exists test.LOCATION
Hibernate: 
    drop table if exists test.Users
04/06/2012 22:42:34 org.hibernate.dialect.Dialect <init>
INFO: HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect
04/06/2012 22:42:34 org.hibernate.engine.transaction.internal.TransactionFactoryInitiator initiateService
INFO: HHH000399: Using default transaction strategy (direct JDBC transactions)
04/06/2012 22:42:34 org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory <init>
INFO: HHH000397: Using ASTQueryTranslatorFactory
04/06/2012 22:42:34 org.hibernate.tool.hbm2ddl.SchemaExport execute
INFO: HHH000227: Running hbm2ddl schema export
Hibernate: 
    alter table test.CONFERENCES 
        drop 
        foreign key FKC0DCF2B7133695CF
04/06/2012 22:42:34 org.hibernate.tool.hbm2ddl.SchemaExport perform
ERROR: HHH000389: Unsuccessful: alter table test.CONFERENCES drop foreign key FKC0DCF2B7133695CF
04/06/2012 22:42:34 org.hibernate.tool.hbm2ddl.SchemaExport perform
ERROR: Table 'test.conferences' doesn't exist
04/06/2012 22:42:34 org.hibernate.tool.hbm2ddl.SchemaExport perform
ERROR: HHH000389: Unsuccessful: alter table test.Conferences_Participants drop foreign key FK5D9C90484DAAAE9B
04/06/2012 22:42:34 org.hibernate.tool.hbm2ddl.SchemaExport perform
ERROR: Table 'test.conferences_participants' doesn't exist
Hibernate: 
    alter table test.Conferences_Participants 
        drop 
        foreign key FK5D9C90484DAAAE9B
Hibernate: 
    alter table test.Conferences_Participants 
        drop 
        foreign key FK5D9C9048751CA8AA
04/06/2012 22:42:34 org.hibernate.tool.hbm2ddl.SchemaExport perform
ERROR: HHH000389: Unsuccessful: alter table test.Conferences_Participants drop foreign key FK5D9C9048751CA8AA
04/06/2012 22:42:34 org.hibernate.tool.hbm2ddl.SchemaExport perform
ERROR: Table 'test.conferences_participants' doesn't exist
04/06/2012 22:42:34 org.hibernate.tool.hbm2ddl.SchemaExport perform
ERROR: HHH000389: Unsuccessful: alter table test.Conferences_Users drop foreign key FK7EAAE2604DAAAE9B
04/06/2012 22:42:34 org.hibernate.tool.hbm2ddl.SchemaExport perform
ERROR: Table 'test.conferences_users' doesn't exist
04/06/2012 22:42:34 org.hibernate.tool.hbm2ddl.SchemaExport perform
ERROR: HHH000389: Unsuccessful: alter table test.Conferences_Users drop foreign key FK7EAAE260751CA8AA
04/06/2012 22:42:34 org.hibernate.tool.hbm2ddl.SchemaExport perform
ERROR: Table 'test.conferences_users' doesn't exist
04/06/2012 22:42:34 org.hibernate.tool.hbm2ddl.SchemaExport perform
ERROR: HHH000389: Unsuccessful: alter table test.Users drop foreign key FK4E39DE8B5D743AE
04/06/2012 22:42:34 org.hibernate.tool.hbm2ddl.SchemaExport perform
ERROR: Table 'test.users' doesn't exist
Hibernate: 
    alter table test.Conferences_Users 
        drop 
        foreign key FK7EAAE2604DAAAE9B
Hibernate: 
    alter table test.Conferences_Users 
        drop 
        foreign key FK7EAAE260751CA8AA
Hibernate: 
    alter table test.Users 
        drop 
        foreign key FK4E39DE8B5D743AE
Hibernate: 
    drop table if exists test.CONFERENCES
Hibernate: 
    drop table if exists test.Company
Hibernate: 
    drop table if exists test.Conferences_Participants
Hibernate: 
    drop table if exists test.Conferences_Users
Hibernate: 
    drop table if exists test.LOCATION
Hibernate: 
    drop table if exists test.Users
Hibernate: 
    create table test.CONFERENCES (
        conferenceId bigint not null,
        active boolean not null,
        description varchar(255),
        endDate datetime,
        name varchar(255),
        startDate datetime,
        location_name varchar(255),
        primary key (conferenceId)
    )
Hibernate: 
    create table test.Company (
        companyID bigint not null,
        active boolean not null,
        companyType varchar(255),
        name varchar(255),
        primary key (companyID)
    )
Hibernate: 
    create table test.Conferences_Participants (
        date datetime not null,
        user_userId bigint not null,
        conference_conferenceId bigint not null,
        primary key (user_userId, date, conference_conferenceId),
        unique (user_userId),
        unique (conference_conferenceId)
    )
Hibernate: 
    create table test.Conferences_Users (
        attendanceStatus integer,
        notifiedByMail boolean not null,
        userRole integer not null,
        user_userId bigint not null,
        conference_conferenceId bigint not null,
        primary key (user_userId, conference_conferenceId),
        unique (user_userId),
        unique (conference_conferenceId)
    )
Hibernate: 
    create table test.LOCATION (
        name varchar(255) not null,
        active boolean not null,
        address varchar(255),
        contactName varchar(255),
        locationId bigint not null,
        maxCapacity integer not null,
        phone1 varchar(255),
        phone2 varchar(255),
        primary key (name)
    )
Hibernate: 
    create table test.Users (
        userId bigint not null,
        active boolean not null,
        admin boolean not null,
        email varchar(255),
        lastLogin datetime,
        name varchar(255),
        pasportID varchar(255),
        password varchar(255),
        phone1 varchar(255),
        phone2 varchar(255),
        salt varchar(255),
        userName varchar(255),
        company_companyID bigint,
        primary key (userId)
    )
Hibernate: 
    alter table test.CONFERENCES 
        add index FKC0DCF2B7133695CF (location_name), 
        add constraint FKC0DCF2B7133695CF 
        foreign key (location_name) 
        references test.LOCATION (name)
Hibernate: 
    alter table test.Conferences_Participants 
        add index FK5D9C90484DAAAE9B (conference_conferenceId), 
        add constraint FK5D9C90484DAAAE9B 
        foreign key (conference_conferenceId) 
        references test.CONFERENCES (conferenceId)
Hibernate: 
    alter table test.Conferences_Participants 
        add index FK5D9C9048751CA8AA (user_userId), 
        add constraint FK5D9C9048751CA8AA 
        foreign key (user_userId) 
        references test.Users (userId)
Hibernate: 
    alter table test.Conferences_Users 
        add index FK7EAAE2604DAAAE9B (conference_conferenceId), 
        add constraint FK7EAAE2604DAAAE9B 
        foreign key (conference_conferenceId) 
        references test.CONFERENCES (conferenceId)
Hibernate: 
    alter table test.Conferences_Users 
        add index FK7EAAE260751CA8AA (user_userId), 
        add constraint FK7EAAE260751CA8AA 
        foreign key (user_userId) 
        references test.Users (userId)
Hibernate: 
    alter table test.Users 
        add index FK4E39DE8B5D743AE (company_companyID), 
        add constraint FK4E39DE8B5D743AE 
        foreign key (company_companyID) 
        references test.Company (companyID)
Hibernate: 
    select
        conference0_.user_userId as user4_16_0_,
        conference0_.conference_conferenceId as conference5_16_0_,
        conference0_.attendanceStatus as attendan1_16_0_,
        conference0_.notifiedByMail as notified2_16_0_,
        conference0_.userRole as userRole16_0_ 
    from
        test.Conferences_Users conference0_ 
    where
        conference0_.user_userId=? 
        and conference0_.conference_conferenceId=?
04/06/2012 22:42:36 org.hibernate.tool.hbm2ddl.SchemaExport execute
INFO: HHH000230: Schema export complete
Hibernate: 
    insert 
    into
        test.Conferences_Users
        (attendanceStatus, notifiedByMail, userRole, user_userId, conference_conferenceId) 
    values
        (?, ?, ?, ?, ?)
04/06/2012 22:42:36 org.hibernate.engine.jdbc.spi.SqlExceptionHelper logExceptions
WARN: SQL Error: 1048, SQLState: 23000
04/06/2012 22:42:36 org.hibernate.engine.jdbc.spi.SqlExceptionHelper logExceptions
ERROR: Column 'user_userId' cannot be null
04/06/2012 22:42:37 org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [ConferenceServlet] in context with path [/conf4u] threw exception
org.hibernate.TransactionException: nested transactions not supported
    at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.begin(AbstractTransactionImpl.java:152)
    at org.hibernate.internal.SessionImpl.beginTransaction(SessionImpl.java:1396)
    at sun.reflect.GeneratedMethodAccessor39.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.hibernate.context.internal.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:352)
    at $Proxy14.beginTransaction(Unknown Source)
    at daos.ConferenceDao.isConferenceNameExists(ConferenceDao.java:129)
    at servlets.ConferenceServlet.assignUser(ConferenceServlet.java:282)
    at servlets.ConferenceServlet.processRequest(ConferenceServlet.java:76)
    at servlets.ConferenceServlet.doPost(ConferenceServlet.java:432)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

from some reason it seems like it’s running hbm2ddl schema export again, which I assume causes the problem?

The thing is the it doesn’t happen to him, and we’re checked out with the same version.

I have no idea what might be the problem.

the hibernate configuration:

<hibernate-configuration>
    <session-factory>
        <property name="connection.url">jdbc:mysql://localhost:3306/test</property>
        <property name="connection.username">root</property>
        <property name="connection.password">root</property>
        <property name="connection.driver_class">com.mysql.jdbc.Driver</property>
        <property name="hibernate.default_schema">test</property>
        <property name="dialect">org.hibernate.dialect.MySQL5Dialect</property>

        <property name="show_sql">true</property>

        <property name="format_sql">true</property>
        <property name="hbm2ddl.auto">create-drop</property>

        <!-- JDBC connection pool (use the built-in) -->
        <property name="connection.pool_size">1</property>
        <property name="current_session_context_class">thread</property>

        <!-- Mapping files will go here.... -->

        <mapping class="model.Company" />
        <mapping class="model.User" />
        <mapping class="model.Conference" />
        <mapping class="model.ConferencesParticipants" />
        <mapping class="model.ConferencesUsers" />
        <mapping class="model.Location" />


    </session-factory>
</hibernate-configuration>

The function that is being run for the assign action:

public void assignUserToConference(ConferencesUsers cu){

    Session session = HibernateUtil.getSessionFactory().getCurrentSession();

    try {
        session.beginTransaction(); 
        session.save(cu);
        session.getTransaction().commit();
    }
    catch (RuntimeException e) {
        session.getTransaction().rollback();
        throw e;
    }   
}

HibernateUtil :

public class HibernateUtil {

private static SessionFactory sessionFactory = configureSessionFactory();
private static ServiceRegistry serviceRegistry;

private static SessionFactory configureSessionFactory() throws HibernateException {
    Configuration configuration = new Configuration();
    configuration.configure();
    serviceRegistry = new ServiceRegistryBuilder().applySettings(configuration.getProperties()).buildServiceRegistry();        
    sessionFactory = configuration.buildSessionFactory(serviceRegistry);
    return sessionFactory;
}

/**
 * get a session to the database
 * @return
 */
public static SessionFactory getSessionFactory() {
    if(sessionFactory== null){
        sessionFactory = configureSessionFactory();
    }
    return sessionFactory;
}

/**
 * close the current session to the database
 */
public static void closeSession(){
    sessionFactory.close();
}



}

I’d appreciate your help with this.
Thanks!

  • 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-06T15:24:15+00:00Added an answer on June 6, 2026 at 3:24 pm

    Turn out the problem wan’t in hibernate.
    from some reason, no matter what I tried in Eclipse, the code just wasn’t in sync with the compiled code.
    I solved the problem by creating a new workspace.

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

Sidebar

Related Questions

I help develop a relatively high traffic web application that uses ASP.NET WebForms. Although
I have a program develop for web application(java). I need to send my project
My friend uses Visual Studio to develop websites in ASP.NET. She only uses the
I plan to develop a web application for which I need to decide the
My friend and I want to develop a big web2.0 project. We decided to
The background I'm building a fair-sized web application with a friend in my own
I want to develop a java application to capture video from a usb web
I want to develop a simple java based application that can connect to facebook
I am trying to develop an Android application that can be used to find
I develop code using .net, and sometimes using ruby. My friend wants me to

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.