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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T15:43:00+00:00 2026-05-20T15:43:00+00:00

Currently We are facing a lot of problem in migrating our Application from Hibernate

  • 0

Currently We are facing a lot of problem in migrating our Application from Hibernate 3.2.5 to 3.6.1.

The first error that We are facing is :

SEVERE: Invalid column name ‘btn_name’. Although btn_name is mapped no where. The actual mapping is btnName.

Here is my mapping file

<hibernate-mapping>
    <class abstract="true" name="com.sampleproject.client.beansdm.metadata.Component"
        table="component_master">
        <id column="metadata_id" name="id" type="long">
            <generator class="native" />
        </id>
        <property column="metadata_type" name="type" type="string" />
        <property name="createdDateTime" column="created_date" type="date"
            update="false"></property>
        <property name="version" type="string" column="version_id"></property>
        <property name="currentDate" type="date" column="curr_date"></property>
        <property name="currentIP" type="string" column="current_ip"></property>
        <many-to-one name="currentUser"
            class="com.sampleproject.client.beansdm.domain.common.User" cascade="refresh"
            column="current_user_id"></many-to-one>
        <property name="latestDate" type="date" column="latest_date"></property>
        <property name="latestIP" type="string" column="latest_ip"></property>
        <many-to-one name="latestUser"
            class="com.sampleproject.client.beansdm.domain.common.User" cascade="refresh"
            column="latest_user"></many-to-one>
        <property name="recordStatus" type="boolean" column="record_status"></property>
        <property name="portal" type="string" column="portal"></property>
        <many-to-one cascade="refresh,save-update,delete"
            class="com.sampleproject.client.beansdm.metadata.Component" column="md_id"
            name="metadata" not-null="false" />

        <joined-subclass
            name="com.sampleproject.client.beansdm.metadata.uicontrols.UIControl"
            table="ui_control_master">
            <key column="ui_control_id" />
            <property column="display_name" name="displayText" />
            <property column="help_text" name="helpText" />
            <property column="info_text" name="informativeText" />
            <property column="rows" name="rows" type="integer" />
            <property column="cols" name="cols" type="integer" />
            <property column="btnName" name="btnName" type="string" />
            <property name="version" type="string" column="version_id"></property>
            <property name="currentDate" type="date" column="curr_date"></property>
            <property name="currentIP" type="string" column="current_ip"></property>
            <many-to-one name="currentUser"
                class="com.sampleproject.client.beansdm.domain.common.User" cascade="refresh"
                column="current_user_id"></many-to-one>
            <property name="latestDate" type="date" column="latest_date"></property>
            <property name="latestIP" type="string" column="latest_ip"></property>
            <many-to-one name="latestUser"
                class="com.sampleproject.client.beansdm.domain.common.User" cascade="refresh"
                column="latest_user"></many-to-one>
            <property name="recordStatus" type="boolean" column="record_status"></property>
            <property name="portal" type="string" column="portal"></property>
            <property name="readOnly" type="boolean" column="read_only"/>

            <joined-subclass
                name="com.sampleproject.client.beansdm.metadata.uicontrols.InputControl"
                table="input_control_master" lazy="true">
                <key column="input_control_id" />
                <property column="default_value" name="defaultValue"
                    not-null="false" />
                <property column="is_fk" name="fk" />
                <property column="validatable" name="validatable" />
                <property column="violatable" name="violatable" />
                <property name="isRequired" column="is_required"></property>
                <property name="ruleType"
                    type="com.sampleproject.facadeimplementation.util1.UserEnumRuleType"
                    column="rule_type"></property>
                <property name="fileType" column="file_type"></property>
                <property name="maxFileSize" column="max_file_size" type="integer"></property>
                <property name="precision" column="input_precision" type="integer"></property>
                <property name="maxLength" column="maxlength" type="integer"></property>
                <property name="minLength" column="minlength" type="integer"></property>
                <property name="dateFormatType" column="dateformat"
                    type="com.sampleproject.facadeimplementation.util1.UserEnumDateFormatType"></property>
                <property name="specialCharAllow" column="isspecialcharallow"></property>
                <property name="specialChars" column="specialchars" type="string"></property>
                <property name="dateType"
                    type="com.sampleproject.facadeimplementation.util1.UserEnumDateType"
                    column="date_type"></property>
                <property name="minDate" column="mindate" type="string"></property>
                <property name="maxDate" column="maxdate" type="string"></property>
                <property name="inspection" column="inspection" type="boolean"></property>
                <property name="values" column="default_values" type="string"></property>
                <property name="targetNames" column="target_names" type="string"></property>
                <!--
                    <many-to-one cascade="save-update, delete"
                    class="com.sampleproject.client.beansdm.metadata.Column"
                    column="target_column_id" name="targetColumn" />
                -->
                <property name="targetColumn" column="target_column" type="string"></property>
                <property name="templateName" column="template_name" type="string"></property>
                <!--
                    <bag name="targetColumnNames" cascade="save-update"
                    table="input_possible_columns_map"> <key
                    column="input_control_id"></key> <element column="column_name"
                    not-null="true" type="string" /> </bag>
                -->
                <!--<bag name="possibleValues" cascade="save-update" table="input_possible_values_map">
                    <key column="input_control_id" />
                    <many-to-many
                        class="com.sampleproject.client.beansdm.metadata.uicontrols.PossibleValue"
                        column="value" />
                </bag>
                --><property name="seperator" column="seperator" type="string" />
                <many-to-one name="refTable" cascade="refresh"
                    class="com.sampleproject.client.beansdm.metadata.Table" column="ref_table_id" lazy="false">
                </many-to-one>
                <many-to-one name="targetTable" cascade="refresh"
                    class="com.sampleproject.client.beansdm.metadata.Table" column="target_table_id" />
                <property name="version" type="string" column="version_id"></property>
                <property name="currentDate" type="date" column="curr_date"></property>
                <property name="currentIP" type="string" column="current_ip"></property>
                <many-to-one name="currentUser"
                    class="com.sampleproject.client.beansdm.domain.common.User" cascade="refresh"
                    column="current_user_id"></many-to-one>
                <property name="latestDate" type="date" column="latest_date"></property>
                <property name="latestIP" type="string" column="latest_ip"></property>
                <many-to-one name="latestUser"
                    class="com.sampleproject.client.beansdm.domain.common.User" cascade="refresh"
                    column="latest_user"></many-to-one>
                <property name="recordStatus" type="boolean" column="record_status"></property>
                <property name="portal" type="string" column="portal"></property>
                <many-to-one name="linkedColumn" cascade="refresh"
                    class="com.sampleproject.client.beansdm.metadata.Column" column="linked_column_name">
                </many-to-one>
                <many-to-one name="linkedMasterColumn" cascade="refresh"
                    class="com.sampleproject.client.beansdm.metadata.Column" column="linked_master_column">
                </many-to-one>
                <many-to-one name="linkedTable" cascade="refresh"
                    class="com.sampleproject.client.beansdm.metadata.Table" column="linked_master_id">
                </many-to-one>
            </joined-subclass>
        </joined-subclass>
    </class>
</hibernate-mapping>

Focus on com.sampleproject.client.beansdm.metadata.uicontrols.InputControl joined-subclass mapping there is a field named btnName. Its working fine with 3.2.5 version but when i changed it to newer hibernate version it stops responding.

Is there any possible jar conflicts ?

Please help.

Thanking You,
Regards,

  • 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-20T15:43:01+00:00Added an answer on May 20, 2026 at 3:43 pm

    The Hibernate Version Comparison guide states when moving from 3.5 to 3.6 that:

    However, for users still using hbm.xml
    you should be aware that we chose to
    use the
    org.hibernate.cfg.EJB3NamingStrategy
    used in AnnotationConfigration instead
    of the older
    org.hibernate.cfg.DefaultNamingStrategy
    historically used on Configuration.
    This may cause naming mismatches; one
    known place where this is an issue is
    if you rely on the naming strategy to
    default the name of a association

    (many-to-many and collections of
    elements) table. If you find yourself
    in this situation, you can tell
    Hibernate to use the the legacy
    org.hibernate.cfg.DefaultNamingStrategy
    by calling
    Configuration#setNamingStrategy and
    passing it
    org.hibernate.cfg.DefaultNamingStrategy#INSTANCE

    The NamingStrategy interface defines several methods like String foreignKeyColumnName(String propertyName, String propertyEntityName, String propertyTableName, String referencedColumnName)used to determine the names of columns and associations which are implemented by the EJB3NamingStrategy. I suggest you look at the implementation of these methods in the EJB3NamingStrategy class and see how it is transforming property names to column names.

    It looks like hibernate is now adding the underscores to what it expects the column name to be in the DB via one these transformations, and is upset when it can’t find the resultant column name ‘btn_name’ in your database.

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

Sidebar

Related Questions

Im currently facing the problem that when i try to set focus on some
I'm currently facing a weird problem while executing a command from my bash script.
I'm developing android application with phonegap . Currently I'm facing one problem with inputbox
I'm currently facing the problem that I want to serve static content via a
We currently facing some stability issues with our develop web application product. This product
I'm currently working a lot with DDD, and I'm facing a problem when loading/operating
I am currently facing a problem that is concerning the google search, curl and
I'm currently facing an interesting problem in my OSGi application. I'm implementing a configuration
I'm currently facing a problem in my Cherrypy application. Im my own custom session
I'm currently facing a more mathematical problem. I'm developing an application which is interested

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.