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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:20:58+00:00 2026-05-23T04:20:58+00:00

In my application I have several entity POJOs annotated with JPA annotations. Also hbm2ddl

  • 0

In my application I have several entity POJOs annotated with JPA annotations. Also hbm2ddl is configured to generate tables for these entities. When application starts first time, all tables are generated successfully except one.
Here’s entity source code:

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "REQUESTS")
public class InterpreterRequest implements java.io.Serializable {

    private static final long serialVersionUID = -1017432073323298138L;

    @Id
    @GeneratedValue
    private long id;
    @Column(name = "quantity")
    private int quantity;
    @Column(name = "from")
    private String from;
    @Column(name = "to")
    private String to;
    @Column(name = "spec")
    private String spec;
    @ManyToOne(targetEntity = Event.class)
    private Event event;

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public int getQuantity() {
        return quantity;
    }

    public void setQuantity(int quantity) {
        this.quantity = quantity;
    }

    public String getFrom() {
        return from;
    }

    public void setFrom(String from) {
        this.from = from;
    }

    public String getTo() {
        return to;
    }

    public void setTo(String to) {
        this.to = to;
    }

    public String getSpec() {
        return spec;
    }

    public void setSpec(String spec) {
        this.spec = spec;
    }

    public Event getEvent() {
        return event;
    }

    public void setEvent(Event event) {
        this.event = event;
    }

}

And here’s hibernate session factory configuration:

    <bean id="sessionFactory"
            class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
            <property name="dataSource" ref="dataSource" />
            <property name="hibernateProperties">
                <props>
                    <prop key="hibernate.hbm2ddl.auto">update</prop>
                    <prop key="hibernate.dialect">org.hibernate.dialect.H2Dialect</prop>
                    <prop key="hibernate.connection.pool_size">5</prop>
                    <prop key="hibernate.show_sql">true</prop>
                    <prop key="hibernate.cglib.use_reflection_optimizer">true</prop>
                    <!-- <prop key="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider</prop> 
                        <prop key="hibernate.hibernate.cache.use_query_cache">true</prop> -->
                </props>
            </property>
            <property name="annotatedClasses">
                <list>
                    <value>com.ceonline.inter.shared.model.User</value>
                    ...
<value>com.ceonline.inter.shared.model.InterpreterRequest</value>
                </list>
            </property>
        </bean>

What can be a reason for hbm2ddl to omit InterpreterRequest class when generating tables?

  • 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-23T04:20:59+00:00Added an answer on May 23, 2026 at 4:20 am

    You didn’t say which database you are using, but the problem is likely to be that one of your column names, or the table name, is a reserved word. The from columns is definitely a reserved word in all database flavors.

    To fix:

    You need to escape the names that are reserved words. Here’s the solution for mysql, which uses back ticks to make keywords into literals):

     @Column(name = "`from`")
     private String from;
    

    A simple test to find out if something is a reserved word is to try to create the table manually – the SQL parser will quickly tell you where the problem is.
    Check other column names and the table name

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

Sidebar

Related Questions

In my application I'm using Entity Framework 4.0 Model First. I have several tables
I have a small SQL CE 4.0 database with several tables, mapped using Entity
In my application I have several DataContexts that connects to different databases with different
In my application I have several activities, the main screen has 4 buttons that
I have an application that uses AJAX liberally. I have several places where a
So, you're writing a web application and you have several areas of the site
I have several web application projects in one solution. When I start debugging one
I have several dialogs in the application. I want to pop up help related
I have several tabs in my application, and each tab loads a different sub-page
I have several RequiredFieldValidators in an ASP.NET 1.1 web application that are firing on

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.