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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T02:20:34+00:00 2026-05-30T02:20:34+00:00

Has anyone seen this message before? There is some discussions on Hibernate forums with

  • 0

Has anyone seen this message before?

There is some discussions on Hibernate forums with not much clarity as to what the issue might be.

We are running Hibernate 3.6.9 with JPA and Spring 3.0.5. This exception just popped up between two builds (as it worked a day ago and today is causing problems on deployment). Is this likely related to some incorrectly configured orm file? We have orm.xml files for our models as well as ones for our Named Queries.

Caused by: java.lang.NullPointerException
    at org.hibernate.cfg.Configuration.processFkSecondPassInOrder(Configuration.java:1481)
    at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1419)
    at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1375)
    at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1519)
    at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:193)
    at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:1100)
    at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:689)
    at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73)
    at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:225)
    at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:308)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
  • 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-30T02:20:36+00:00Added an answer on May 30, 2026 at 2:20 am

    So we found the problem. It is just unfortunate that the there isn’t some standard Configuration Exception that is thrown when Hibernate is unable to find the FK like “Hey dummy, I can’t find the FK that you have defined in the orm file.”

    We have two objects under the same schema/db:

    class Person {
      Long id;
      String name;
      Address address;
      ...
    }
    

    So the Address object is a one to one that exists as part of a composite key:

    <?xml version="1.0" encoding="UTF-8"?>
    <entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm
      http://java.sun.com/xml/ns/persistence/orm_2_0.xsd"
      version="2.0">
         <description>com.foo.Person Entity Mapping</description>
         <package>com.foo</package>
         <schema>COMMON</schema>
         <access>FIELD</access>
         <entity class="com.foo.Person" access="FIELD" metadata-complete="true">
            <table name="PERSON"/>
                <attributes>
                    <embedded-id name="id"/>
                    <basic name="name">
                            <column name="NAME"/>
                    </basic>
                </attributes>
         </entity>
         <embeddable class="com.foo.Person$Id" access="FIELD">
            <attributes>
            ...
            <one-to-one name="address" fetch="LAZY" target-entity="com.foo.Address" >
                <join-column name="ADDR_CD" insertable="false" updatable="false"/>
                <cascade>
                    <cascade-all/>
                </cascade>
            </one-to-one>
            </attributes>
         </embeddable> 
    </entity-mappings>
    

    The problem was that we moved the Address object to another schema on another db and left the relationship in the orm file (so Address was still a one-to-one in the composite key).

    To fix it, we disconnected the relationship and made Address transient so that we retrieve it a different way and that removed the exception from happening.

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

Sidebar

Related Questions

I don't know if anyone has seen this issue before but I'm just stumped.
Has anyone seen this before - and can anything be done about it? This
I'm getting this error in IE8. Has anyone seen this before? Webpage error details:
Has anyone seen this error before? It comes whenever I try to execute a
Has anyone seen this type of IE display problem? Example http://xs133.xs.to/xs133/08465/ie_problem910.jpg.xs.jpg Note that it
Has anyone seen this error when trying to call an external C function from
Has anyone seen this error when working with a PHP application out of dynamic
Has anyone seen this: ?? No jgem command works at all?? Though jruby -S
Has anyone else seen people do this: private string _name; public string Name{ get{
Has anyone ever seen this and does anyone know how to fix it ...

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.