-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 15 posts ] 
Author Message
 Post subject: Unexpected row count: 0 expected: 1
PostPosted: Wed Apr 06, 2005 2:49 pm 
Beginner
Beginner

Joined: Sat Jan 01, 2005 12:18 pm
Posts: 23
Hibernate version: 3

Hibernate gives me following error message:

Code:

[java] Hibernate: update primer set name=?, seq=?,  temp=?,  content=?,  where id=?
[java] org.hibernate.HibernateException: Unexpected row count: 0 expected: 1
     [java] at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:32)


At this point there should be an insert not an update!. Whats wrong here?

Code:
<class
    name="example.Prim"
    table="primer"
>

    <id
        name="id"
        type="java.lang.String"
        column="id"
    >
        <generator class="assigned" />
    </id>

    <property
        name="name"
        type="java.lang.String"
        column="name"
        length="100"
    />
    <property
        name="seq"
        type="java.lang.String"
        column="seq"
        not-null="true"
        length="100"
    />
    <property
        name="temp"
        type="float"
        column="temp"
        length="4"
    />
    <property
        name="content"
        type="float"
        column="content"
        length="4"
    />

    <!-- Associations -->
 
    <!-- bi-directional one-to-many association to VectorHasPrimer -->
    <set
        name="HasPrim"
        lazy="true"
        inverse="true"
      cascade="none"
    >
        <key>
            <column name="id" />
        </key>
        <one-to-many
            class="example.HasPrimer"
        />
    </set>

</class>
</hibernate-mapping>



I use saveOrUpdate() to make the data persistent


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 07, 2005 4:22 am 
Beginner
Beginner

Joined: Sat Jan 01, 2005 12:18 pm
Posts: 23
no one is interested that Hibernate is performing an updated on an empty database instead of an insert???

I would say that it is a critical feature which should work bullet proof... or is somthing wrong with the mapping??


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 07, 2005 7:45 am 
Newbie

Joined: Tue Apr 05, 2005 4:34 am
Posts: 6
I beleive this is because you are using the 'assigned' generator.

When using saveOrUpdate() Hibernate uses the existence of the id to determine whether to do an insert or update. If you use an assigned id then you need to explicitly call save() or update() depending on whether you want to insert/update.

If you can't infer this yourself I wonder if you could get around this by mimicing an 'upsert', i.e. try an update and if zero rows were updated then perform an insert. This, however, has a knock on impact, since I believe Hibernate uses this mechanism to perform its concurrent update check if you're using a 'version' property.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 07, 2005 10:19 am 
Beginner
Beginner

Joined: Sat Jan 01, 2005 12:18 pm
Posts: 23
According to Hibernate 3 documentation now it is possible to use saveOrUpdate. At least there is a diff beween Assigned Keys in Hibernate 2 documentation and Hibernate 3 documentation.

saveOrUpdate works for me on other task sometimes as I found out - with assigned keys!!!!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 08, 2005 3:35 am 
Expert
Expert

Joined: Fri Nov 07, 2003 4:24 am
Posts: 315
Location: Cape Town, South Africa
If you are still having problems, disable batch updates, run again and check the logs.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 08, 2005 8:23 am 
Beginner
Beginner

Joined: Sat Jan 01, 2005 12:18 pm
Posts: 23
I turned on full debugging and set <property name="hibernate.jdbc.batch_size">0</property>

Now a huge output comes and I tried to cut out the relevant pieces:

at beginning:
Code:
     [java] 65634 [main] DEBUG org.hibernate.engine.PersistenceContext  - initializing non-lazy collections
     [java] 65634 [main] DEBUG example.hibernateutils.HibernateUtilImport  - Opening new Session for this thread.
     [java] 65634 [main] DEBUG org.hibernate.impl.SessionImpl  - opened session at timestamp: 4558690471817216
     [java] 65634 [main] DEBUG example.hibernateutils.HibernateUtilImport  - Starting new database transaction in this thread.
     [java] 65634 [main] DEBUG org.hibernate.transaction.JDBCTransaction  - begin
     [java] 65635 [main] DEBUG org.hibernate.jdbc.AbstractBatcher  - opening JDBC connection
     [java] 65635 [main] DEBUG org.hibernate.connection.DriverManagerConnectionProvider  - total checked-out connections: 0
     [java] 65635 [main] DEBUG org.hibernate.connection.DriverManagerConnectionProvider  - using pooled JDBC connection, pool size: 0
     [java] 65635 [main] DEBUG org.hibernate.transaction.JDBCTransaction  - current autocommit status: false
     [java] 65635 [main] DEBUG org.hibernate.engine.Cascades  - id unsaved-value strategy NULL
     [java] 65635 [main] DEBUG org.hibernate.event.def.AbstractSaveEventListener  - detached instance of: example.Prim
     [java] 65635 [main] DEBUG org.hibernate.event.def.DefaultSaveOrUpdateEventListener  - updating detached instance
     [java] 65635 [main] DEBUG org.hibernate.event.def.DefaultSaveOrUpdateEventListener  - updating [example.Prim#1aA1]
     [java] 65635 [main] DEBUG org.hibernate.event.def.ReattachVisitor  - collection dereferenced while transient [example.Prim.HasPrim#1aA1]


Code:
     [java] 76247 [main] DEBUG org.hibernate.event.def.DefaultSaveOrUpdateEventListener  - updating [example.Prim#32bD7]
     [java] 76247 [main] DEBUG example.hibernateutils.HibernateUtilImport  - Committing database transaction of this thread.
     [java] 76247 [main] DEBUG org.hibernate.transaction.JDBCTransaction  - commit
     [java] 76247 [main] DEBUG org.hibernate.impl.SessionImpl  - automatically flushing session
     [java] 76247 [main] DEBUG org.hibernate.event.def.AbstractFlushingEventListener  - flushing session
     [java] 76247 [main] DEBUG org.hibernate.event.def.AbstractFlushingEventListener  - processing flush-time cascades
     [java] 76280 [main] DEBUG org.hibernate.event.def.AbstractFlushingEventListener  - dirty checking collections
     [java] 76280 [main] DEBUG org.hibernate.event.def.AbstractFlushingEventListener  - Flushing entities and processing referenced collections
     [java] 76288 [main] DEBUG org.hibernate.event.def.DefaultFlushEntityEventListener  - Updating entity: [example.Prim#1aA1]
     [java] 76288 [main] DEBUG org.hibernate.event.def.DefaultFlushEntityEventListener  - Updating entity: [example.Prim#1aA10]
     [java] 76288 [main] DEBUG org.hibernate.event.def.DefaultFlushEntityEventListener  - Updating entity: [example.Prim#1aA11]
     [java] 76288 [main] DEBUG org.hibernate.event.def.DefaultFlushEntityEventListener  - Updating entity: [example.Prim#1aA12]

     [java] 78260 [main] DEBUG org.hibernate.event.def.AbstractFlushingEventListener  - Processing unreferenced collections
     [java] 78260 [main] DEBUG org.hibernate.event.def.AbstractFlushingEventListener  - Scheduling collection removes/(re)creates/updates
     [java] 78260 [main] DEBUG org.hibernate.event.def.AbstractFlushingEventListener  - Flushed: 0 insertions, 6231 updates, 0 deletions to 6231 objects
     [java] 78260 [main] DEBUG org.hibernate.event.def.AbstractFlushingEventListener  - Flushed: 0 (re)creations, 0 updates, 6231 removals to 0 collections
       [java] 78261 [main] DEBUG org.hibernate.pretty.Printer  - example.Prim{name=null, id=10aE12, content=52.0, HasPrim=null, seq=xxxxx, temp=64.6}
     [java] 78261 [main] DEBUG org.hibernate.pretty.Printer  - example.Prim{name=null, id=3aH6, content=58.3, HasPrim=null, seq=xxxxx, temp=66.1}



at the end:
Code:
     
     [java] 78266 [main] DEBUG org.hibernate.pretty.Printer  - more......
     [java] 78266 [main] DEBUG org.hibernate.event.def.AbstractFlushingEventListener  - executing flush
     [java] 78278 [main] DEBUG org.hibernate.persister.entity.BasicEntityPersister  - Updating entity: [example.Prim#1aA1]
     [java] 78278 [main] DEBUG org.hibernate.jdbc.AbstractBatcher  - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
     [java] 78278 [main] DEBUG org.hibernate.SQL  - update primer set name=?, seq=?, temp=?, content=? where id=?
     [java] Hibernate: update primer set name=?, seq=?, temp=?, content=? where id=?
     [java] 78278 [main] DEBUG org.hibernate.jdbc.AbstractBatcher  - preparing statement
     [java] 78278 [main] DEBUG org.hibernate.persister.entity.BasicEntityPersister  - Dehydrating entity: [example.Prim#1aA1]
     [java] 78279 [main] DEBUG org.hibernate.type.StringType  - binding null to parameter: 1
     [java] 78279 [main] DEBUG org.hibernate.type.StringType  - binding 'xxxx' to parameter: 2
     [java] 78279 [main] DEBUG org.hibernate.type.FloatType  - binding '61.3' to parameter: 3
     [java] 78279 [main] DEBUG org.hibernate.type.FloatType  - binding '44.0' to parameter: 4
     [java] 78279 [main] DEBUG org.hibernate.type.StringType  - binding '1aA1' to parameter: 5
     [java] 78310 [main] ERROR org.hibernate.event.def.AbstractFlushingEventListener  - Could not synchronize database state with session
     [java] org.hibernate.HibernateException: Unexpected row count: 0 expected: 1
     [java]     at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:32)
     [java]     at org.hibernate.persister.entity.BasicEntityPersister.update(BasicEntityPersister.java:1995)
     [java]     at org.hibernate.persister.entity.BasicEntityPersister.updateOrInsert(BasicEntityPersister.java:1923)
     [java]     at org.hibernate.persister.entity.BasicEntityPersister.update(BasicEntityPersister.java:2163)
     [java]     at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:75)
     [java]     at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:239)
     [java]     at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:223)
     [java]     at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:137)
     [java]     at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:274)
     [java]     at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
     [java]     at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:675)
     [java]     at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:293)
     [java]     at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:86)
     [java]     at example.hibernateutils.HibernateUtilImport.commitTransaction(HibernateUtilImport.java:187)
     [java]     at example.dao.GenericServiceDAOImport.commit(GenericServiceDAOImport.java:46)
     [java]     at example.transformer.CloneTransformer.makePrimer(CloneTransformer.java:161)
     [java]     at example.Loader.<init>(Loader.java:29)
     [java]     at example.Main.main(Main.java:9)
     [java] 78330 [main] DEBUG example.hibernateutils.HibernateUtilImport  - Tyring to rollback database transaction of this thread.
     [java] 78330 [main] DEBUG org.hibernate.transaction.JDBCTransaction  - rollback
     [java] 78330 [main] DEBUG org.hibernate.jdbc.JDBCContext  - before transaction completion
     [java] 78330 [main] DEBUG org.hibernate.impl.SessionImpl  - before transaction completion
     [java] 78338 [main] DEBUG org.hibernate.transaction.JDBCTransaction  - rolled back JDBC Connection
     [java] 78339 [main] DEBUG org.hibernate.jdbc.JDBCContext  - after transaction completion
     [java] 78339 [main] DEBUG org.hibernate.impl.SessionImpl  - after transaction completion
     [java] 78350 [main] DEBUG example.hibernateutils.HibernateUtilImport  - Closing Session of this thread.
     [java] 78350 [main] DEBUG org.hibernate.impl.SessionImpl  - closing session
     [java] 78350 [main] DEBUG org.hibernate.jdbc.AbstractBatcher  - closing JDBC connection (open PreparedStatements: 1, globally: 1) (open ResultSets: 0, globally: 0)
     [java] 78350 [main] DEBUG org.hibernate.connection.DriverManagerConnectionProvider  - returning connection to pool, pool size: 1
     [java] 78350 [main] DEBUG org.hibernate.jdbc.JDBCContext  - after transaction completion
     [java] 78350 [main] DEBUG org.hibernate.impl.SessionImpl  - after transaction completion
     [java] org.hibernate.HibernateException: Unexpected row count: 0 expected: 1
     [java]     at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:32)
     [java]     at org.hibernate.persister.entity.BasicEntityPersister.update(BasicEntityPersister.java:1995)
     [java]     at org.hibernate.persister.entity.BasicEntityPersister.updateOrInsert(BasicEntityPersister.java:1923)
     [java]     at org.hibernate.persister.entity.BasicEntityPersister.update(BasicEntityPersister.java:2163)
     [java]     at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:75)
     [java]     at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:239)
     [java]     at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:223)
     [java]     at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:137)
     [java]     at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:274)
     [java]     at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
     [java]     at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:675)
     [java]     at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:293)
     [java]     at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:86)
     [java]     at example.hibernateutils.HibernateUtilImport.commitTransaction(HibernateUtilImport.java:187)
     [java]     at example.dao.GenericServiceDAOImport.commit(GenericServiceDAOImport.java:46)
     [java]     at example.transformer.CloneTransformer.makePrimer(CloneTransformer.java:161)
     [java]     at example.Loader.<init>(Loader.java:29)
     [java]     at example.Main.main(Main.java:9)
     [java] Exception in thread "main" example.exceptions.InfrastructureException
     [java]     at example.hibernateutils.HibernateUtilImport.commitTransaction(HibernateUtilImport.java:192)
     [java]     at example.dao.GenericServiceDAOImport.commit(GenericServiceDAOImport.java:46)
     [java]     at example.transformer.CloneTransformer.makePrimer(CloneTransformer.java:161)
     [java]     at example.Loader.<init>(Loader.java:29)
     [java]     at example.Main.main(Main.java:9)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 08, 2005 8:32 am 
Expert
Expert

Joined: Fri Nov 07, 2003 4:24 am
Posts: 315
Location: Cape Town, South Africa
The output:
Code:
DEBUG org.hibernate.SQL  - update primer set name=?, seq=?, temp=?, content=? where id=?
...
DEBUG org.hibernate.type.StringType  - binding '1aA1' to parameter: 5

is telling me that hibernate is updating the entity with primary key: 1aA1, but is failing because the update count is 0. i.e. a row with this identifier does not exist.

Are you changing the column that is mapped to the identifier?[/code]


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 08, 2005 8:55 am 
Beginner
Beginner

Joined: Sat Jan 01, 2005 12:18 pm
Posts: 23
not at all!

My code looks like this here:

Code:
        GenericServiceDAOExport genExport = new GenericServiceDAOExport();
        GenericServiceDAOImport genImport = new GenericServiceDAOImport();
             
        List list  = genExport.getAllObjects(new Prims());
        if (list.size() > 0) {
            if (MappingConfig.dryRun == false)
                genImport.begin();
           
           for (Iterator iter = list.iterator(); iter.hasNext(); ) {
               Prims primers = (Prims) iter.next();
         
               // create new Prim model
               Prim primerImp = new Prim();
              
               // Id
               primerImp.setId(primers.getId());
              
               // Name
               primerImp.setPrimname(null); // TODO: was not available
              
               // Seq
               try {
                   primerImp.setSeq(primers.getSeq());
               } catch (NullPointerException e) {
                  throw new BusinessException();
               }
              
               // Temp
               if (primers.getTemp() != null)
                   primerImp.setTemp(new Float(primers.getTemp().floatValue()));
               else
                   primerImp.setTemp(null);
              
               // Content
               if (primers.getGcContent() != null)
                   primerImp.setContent(new Float(primers.getContent().floatValue()));
               else
                   primerImp.setContent(null);
                          
               genImport.saveOrUpdate(primerImp);
               primerImp = null;
           }
          
           genImport.commit();
        }
   


HibernateUtilImport is the HibernateUtil taken from Hibernate in Action

genImport looks like this:
Code:
   
    public void begin() {
        session = HibernateUtilImport.getSession();
        HibernateUtilImport.beginTransaction();
    }
   
    public void commit() {
        HibernateUtilImport.commitTransaction();
        HibernateUtilImport.closeSession();
        session = null;
    }
   
    public void saveOrUpdate(Object obj) {
        Session session = HibernateUtilImport.getSession();

        try {
         session.saveOrUpdate(obj);
        } catch (HibernateException ex) {
            throw new InfrastructureException(ex);
        }
    }


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 08, 2005 10:01 am 
Beginner
Beginner

Joined: Sat Jan 01, 2005 12:18 pm
Posts: 23
it seems that I have solved the problem now ... Im not the only one with this issue on the net
;-)

Thanks for yout support!

I added
Code:
<timestamp name="lastUpdatedDatetime" column="last_updated" unsaved-value="null"/>



Can anyone explain me why I need an extra timestamp?? I really want to understand it!!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 08, 2005 10:03 am 
Expert
Expert

Joined: Fri Nov 07, 2003 4:24 am
Posts: 315
Location: Cape Town, South Africa
I see that you are calling saveOrUpdate on an entity with an assigned identifier. This will explain your predicament (From the 2.1.8 manual):

Quote:
5.1.4.5. Assigned Identifiers
If you want the application to assign identifiers (as opposed to having Hibernate generate them), you may use
the assigned generator. This special generator will use the identifier value already assigned to the object's identifier
property. Be very careful when using this feature to assign keys with business meaning (almost always a
terrible design decision).
Due to its inherent nature, entities that use this generator cannot be saved via the Session's saveOrUpdate()
method.
Instead you have to explicitly specify to Hibernate if the object should be saved or updated by calling
either the save() or update() method of the Session.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 08, 2005 10:04 am 
Beginner
Beginner

Joined: Sat Jan 01, 2005 12:18 pm
Posts: 23
not in Hibernate 3 anymore!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 08, 2005 10:11 am 
Beginner
Beginner

Joined: Thu Mar 24, 2005 5:21 pm
Posts: 21
elLord wrote:
Can anyone explain me why I need an extra timestamp?? I really want to understand it!!

Unless you use a version or timestamp property with an unsaved-value, there is no way for Hibernate to differentiate between transient and detached instances when you assign the primary key yourself.
HTH
Satish


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 08, 2005 10:52 am 
Beginner
Beginner

Joined: Sat Jan 01, 2005 12:18 pm
Posts: 23
Satish Srinivasan wrote:
Unless you use a version or timestamp property with an unsaved-value, there is no way for Hibernate to differentiate between transient and detached instances when you assign the primary key yourself.
HTH
Satish


ok .. I see your point.

But "Hibernate in Action" says:

For an instance to transition from transient to persistent state requires either a save() call to the persistence manager or the creation of reference from an already persistent instance

Moreover it says:
Hibernate can detect exactly which attributes have been modified, so it's possible to include only the columns that need updating in the SQL UPDATE statement.

Hibernate should be able to check the state of an object:
- check if there is an opened session
- Check if object has been saved in session then it is persistent
- if not in session then: object is transient
- if there is an object which has been saved then it is detached

Furthermore:
- Compare the objects id with the row in the database
- if something has changed make an update otherwise insert a new row

I really don't get the point what is so difficult with this issue;



Besides: I take back my previouse post - I have not solved the problem!! With timestamping Hibernate can insert new data but can't update them anymore.

I receive following error message:

Code:
  [java] 55953 [main] WARN org.hibernate.util.JDBCExceptionReporter  - SQL Error: 0, SQLState: 23505
   [java] 55953 [main] ERROR org.hibernate.util.JDBCExceptionReporter  - ERROR: duplicate key violates unique constraint "pk_primer"

     [java] 55958 [main] ERROR org.hibernate.event.def.AbstractFlushingEventListener  - Could not synchronize database state with session
     [java] org.hibernate.exception.ConstraintViolationException: could not insert: [example.Prim]



[/list][/i]


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 08, 2005 11:14 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
Quote:
I really don't get the point what is so difficult with this issue

Thats because you are over-simplifying the problem ;)

Quote:
Hibernate should be able to check the state of an object:
- check if there is an opened session

No idea what you mean. You are attempting to saveOrUpdate something through a session reference; there is explicitly a session. What is there to check for here? I hope you aren't suggesting that Hibernate keep track of all open sessions...

Quote:
- Check if object has been saved in session then it is persistent
- if not in session then: object is transient
- if there is an object which has been saved then it is detached

Again, over-simpification.

Quote:
Furthermore:
- Compare the objects id with the row in the database

Ahh, now your getting to the point. Hibernate2 did not have the capability to do this particular step. This can be acheived in Hibernate3 by using 'undefined' as the unsaved-value for you <id/> mapping. This forces Hibernate to resort to a database lookup to determine whether a row already exists with the given id, and if so to consider the entity as transient (thus forcing the update/re-attach behaviour).

Quote:
Besides: I take back my previouse post - I have not solved the problem!! With timestamping Hibernate can insert new data but can't update them anymore.

Ok, I think its time for you to sit down and seriously read the manual or the book.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 18, 2006 5:17 am 
Regular
Regular

Joined: Fri Sep 30, 2005 6:15 am
Posts: 50
Hi,

I got exactly the same problem... :o(

I created two objects and called session.save and HIbernate tried to do an update on the second object that doesn't exist in the db! So it should do an insert instead!

Here is my code


Code:
Category category = new Category("Emt200616_1","16",2006,);
Item item = new Item("CntEmt200616_1","16",2006);
item.setCategory(category);
category.getItems().add(item);

save.update();


I use assigned generator for both classes.

I have tried to add a version tag in item.hbm.xml like below with no result

Code:
<version name="version"
   column="VERSION"
   unsaved-value="null"/>


What am I doing wrong?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 15 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.