-->
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.  [ 1 post ] 
Author Message
 Post subject: Hibernate returning zero for the ID of a persistent object
PostPosted: Wed Jan 17, 2007 1:31 pm 
Newbie

Joined: Tue Nov 16, 2004 1:10 pm
Posts: 5
I've isolated what appears to me to be a fairly straightforward bug. Instead of repeating the description and file attachments here, I went ahead and filed a bug in JIRA. Of course if it turns out I was just doing something stupid then I'll update the JIRA issue. However it seems like a pretty clear cut problem (and we've been using Hibernate widely for two years).

The problem is described in http://opensource.atlassian.com/project ... e/HHH-2363 but I'll repeat the description here.

I have two classes, Patient and Room, where Patient has a FK many-to-one reference to Room, representing a room assignment.

Both classes use a Java long field named "id" as their identifier.

When I create a Session and find a Patient with a room assignment, the Patient's identifier is correct but the Room's identifier, when accessed via patient.getAssignedRoom().getId(), is ZERO. However, in the database the value is one and session.getIdentifier(patient.getAssignedRoom()) also returns one, in contradiction.

Hibernate version: 3.2.1

MySQL Database setup:

Code:
DROP DATABASE IF EXISTS `bugdb`;
CREATE DATABASE `bugdb`;
USE bugdb;

CREATE TABLE `Patient` (
  `id` bigint(20) NOT NULL auto_increment,
  `assignedRoom` bigint(20) default NULL,
  `medicalRecordNumber` varchar(64) default NULL,
  `name` varchar(64) NOT NULL default '',
  PRIMARY KEY  (`id`),
  UNIQUE KEY `assignedRoom` (`assignedRoom`),
  UNIQUE KEY `medicalRecordNumber` (`medicalRecordNumber`),
  KEY `FK340C82E592A36BC9` (`assignedRoom`)
);

CREATE TABLE `Room` (
  `id` bigint(20) NOT NULL auto_increment,
  `name` varchar(64) NOT NULL default '',
  PRIMARY KEY  (`id`),
  UNIQUE KEY `name` (`name`)
);

ALTER TABLE `Patient`
  ADD CONSTRAINT `FK340C82E592A36BC9` FOREIGN KEY (`assignedRoom`) REFERENCES `Room` (`id`);

INSERT INTO `Room` ( `id`, `name` ) VALUES ( 1, 'Room 101' );
INSERT INTO `Patient` ( `name`, `medicalRecordNumber`, `assignedRoom` ) VALUES ( 'Fred Example', '12345678', 1 );


Mapping documents:

Patient.hbm.xml:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
  <class name="Patient">
    <id name="id" column="id" unsaved-value="0">
      <generator class="native"/>
    </id>
    <many-to-one name="assignedRoom" column="assignedRoom" unique="true" cascade="none"/>
    <property name="name" column="name" length="64" not-null="true"/>
    <property name="medicalRecordNumber" column="medicalRecordNumber" length="64" not-null="true"/>
  </class>
</hibernate-mapping>

Room.hbm.xml:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
  <class name="Room">
    <id name="id" column="id" unsaved-value="0">
      <generator class="native"/>
    </id>
    <property name="name" column="name" length="64" not-null="true" unique="true"/>
  </class>
</hibernate-mapping>


Hibernate configuration:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

<hibernate-configuration>

        <!-- a SessionFactory instance listed as /jndi/name -->
        <session-factory>

                <!-- properties -->
                        <property name="dialect">org.hibernate.dialect.MySQLDialect</property>
                        <property name="show_sql">true</property>
                        <property name="use_outer_join">false</property>
                        <property name="connection.username">@DATABASE_USERNAME@</property>
                        <property name="connection.password">@DATABASE_PASSWORD@</property>
                        <property name="connection.driver_class">com.mysql.jdbc.Driver</property>
                        <property name="connection.url">jdbc:mysql://localhost/bugdb?autoReconnect=true&amp;dumpQueriesOnException=true</property>
                        <property name="connection.pool_size">1</property>

                        <property name="query.substitutions">true 1, false 0</property>
                        <property name="cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
                        <property name="cache.use_query_cache">true</property>
                        <property name="jdbc.batch_size">0</property>
                        <property name="jdbc.use_streams_for_binary">true</property>
                        <property name="max_fetch_depth">1</property>
                        <property name="c3p0.acquire_increment">2</property>
                        <property name="c3p0.idle_test_period">300</property>
                        <property name="c3p0.max_size">50</property>
                        <property name="c3p0.max_statements">0</property>
                        <property name="c3p0.min_size">10</property>
                        <property name="c3p0.timeout">2</property>
                        <property name="c3p0.connectionTesterClassName">com.mysql.jdbc.integration.c3p0.MysqlConnectionTester</property>
                        <property name="connection.isolation">4</property>

                <!-- mapping files -->
                        <mapping resource="Patient.hbm.xml"/>
                        <mapping resource="Room.hbm.xml"/>
        </session-factory>
</hibernate-configuration>


Code between sessionFactory.openSession() and session.close():

Here is the entire test program:

Code:
import org.apache.log4j.BasicConfigurator;
import org.apache.log4j.ConsoleAppender;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
import org.apache.log4j.PatternLayout;
import org.hibernate.Criteria;
import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;
import org.hibernate.criterion.Expression;

public final class Main {

    private Main() {
    }

    public static void main(String[] args) throws Exception {

        // Configure log4j
        Level logLevel = Level.DEBUG;
        ConsoleAppender consoleAppender = new ConsoleAppender(
          new PatternLayout(PatternLayout.TTCC_CONVERSION_PATTERN),
          ConsoleAppender.SYSTEM_ERR);
        consoleAppender.setThreshold(logLevel);
        BasicConfigurator.configure(consoleAppender);
        final Logger log = Logger.getLogger(Main.class);

        // Configure Hibernate
        SessionFactory sessionFactory = new Configuration()
          .configure("hibernate.cfg.xml").buildSessionFactory();

        // Execute query
        Session session = sessionFactory.openSession();
        final String patientMRN = "12345678";
        Criteria criteria = session.createCriteria(Patient.class);
        criteria.add(Expression.eq("medicalRecordNumber", patientMRN));
        Patient p = (Patient)criteria.uniqueResult();
        log.info("patient=" + p + " patient.assignedRoom=" + p.getAssignedRoom());
        log.info("patient.id=" + p.getId());
        if (p.getAssignedRoom() != null) {
            log.info("patient.assignedRoom.id=" + p.getAssignedRoom().getId());
            if (p.getAssignedRoom().getId() == 0)
                log.error("WTF? ID OF ROOM IS ZERO!");
            log.info("patient.assignedRoom.id=" + session.getIdentifier(p.getAssignedRoom()));
        }
    }
}


Test program output:

Code:
2189 [main] INFO Main  - patient=Patient[Fred Example] patient.assignedRoom=Room[Room 101]
2189 [main] INFO Main  - patient.id=1
2189 [main] INFO Main  - patient.assignedRoom.id=0
2189 [main] ERROR Main  - WTF? ID OF ROOM IS ZERO!
2189 [main] INFO Main  - patient.assignedRoom.id=1


Name and version of the database you are using:

mysql-4.0.18-32.28

The generated SQL (show_sql=true):

Code:
select this_.id as id0_0_, this_.assignedRoom as assigned2_0_0_, this_.name as name0_0_, this_.medicalRecordNumber as medicalR4_0_0_ from Patient this_ where this_.medicalRecordNumber=?
Hibernate: select room0_.id as id1_0_, room0_.name as name1_0_ from Room room0_ where room0_.id=?


Debug level Hibernate log excerpt:

Code:
1948 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister  - Static SQL for entity: Room
1948 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister  -  Version select: select id from Room where id =?
1948 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister  -  Snapshot select: select room_.id, room_.name as name1_ from Room room_ where room_.id=?
1948 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister  -  Insert 0: insert into Room (name, id) values (?, ?)
1949 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister  -  Update 0: update Room set name=? where id=?
1949 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister  -  Delete 0: delete from Room where id=?
1949 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister  -  Identity insert: insert into Room (name) values (?)
1968 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister  - Static SQL for entity: Patient
1968 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister  -  Version select: select id from Patient where id =?
1968 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister  -  Snapshot select: select patient_.id, patient_.assignedRoom as assigned2_0_, patient_.name as name0_, patient_.medicalRecordNumber as medicalR4_0_ from Patient patient_ where patient_.id=?
1969 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister  -  Insert 0: insert into Patient (assignedRoom, name, medicalRecordNumber, id) values (?, ?, ?, ?)
1969 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister  -  Update 0: update Patient set assignedRoom=?, name=?, medicalRecordNumber=? where id=?
1969 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister  -  Delete 0: delete from Patient where id=?
1969 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister  -  Identity insert: insert into Patient (assignedRoom, name, medicalRecordNumber) values (?, ?, ?)
2001 [main] DEBUG org.hibernate.loader.entity.EntityLoader  - Static select for entity Room: select room0_.id as id1_0_, room0_.name as name1_0_ from Room room0_ where room0_.id=?
2001 [main] DEBUG org.hibernate.loader.entity.EntityLoader  - Static select for entity Room: select room0_.id as id1_0_, room0_.name as name1_0_ from Room room0_ where room0_.id=?
2001 [main] DEBUG org.hibernate.loader.entity.EntityLoader  - Static select for entity Room: select room0_.id as id1_0_, room0_.name as name1_0_ from Room room0_ where room0_.id=? for update
2002 [main] DEBUG org.hibernate.loader.entity.EntityLoader  - Static select for entity Room: select room0_.id as id1_0_, room0_.name as name1_0_ from Room room0_ where room0_.id=? for update
2002 [main] DEBUG org.hibernate.loader.entity.EntityLoader  - Static select for entity Room: select room0_.id as id1_0_, room0_.name as name1_0_ from Room room0_ where room0_.id=? for update
2012 [main] DEBUG org.hibernate.loader.entity.EntityLoader  - Static select for action ACTION_MERGE on entity Room: select room0_.id as id1_0_, room0_.name as name1_0_ from Room room0_ where room0_.id=?
2013 [main] DEBUG org.hibernate.loader.entity.EntityLoader  - Static select for action ACTION_REFRESH on entity Room: select room0_.id as id1_0_, room0_.name as name1_0_ from Room room0_ where room0_.id=?
2013 [main] DEBUG org.hibernate.loader.entity.EntityLoader  - Static select for entity Patient: select patient0_.id as id0_0_, patient0_.assignedRoom as assigned2_0_0_, patient0_.name as name0_0_, patient0_.medicalRecordNumber as medicalR4_0_0_ from Patient patient0_ where patient0_.id=?
2013 [main] DEBUG org.hibernate.loader.entity.EntityLoader  - Static select for entity Patient: select patient0_.id as id0_0_, patient0_.assignedRoom as assigned2_0_0_, patient0_.name as name0_0_, patient0_.medicalRecordNumber as medicalR4_0_0_ from Patient patient0_ where patient0_.id=?
2014 [main] DEBUG org.hibernate.loader.entity.EntityLoader  - Static select for entity Patient: select patient0_.id as id0_0_, patient0_.assignedRoom as assigned2_0_0_, patient0_.name as name0_0_, patient0_.medicalRecordNumber as medicalR4_0_0_ from Patient patient0_ where patient0_.id=? for update
2014 [main] DEBUG org.hibernate.loader.entity.EntityLoader  - Static select for entity Patient: select patient0_.id as id0_0_, patient0_.assignedRoom as assigned2_0_0_, patient0_.name as name0_0_, patient0_.medicalRecordNumber as medicalR4_0_0_ from Patient patient0_ where patient0_.id=? for update
2014 [main] DEBUG org.hibernate.loader.entity.EntityLoader  - Static select for entity Patient: select patient0_.id as id0_0_, patient0_.assignedRoom as assigned2_0_0_, patient0_.name as name0_0_, patient0_.medicalRecordNumber as medicalR4_0_0_ from Patient patient0_ where patient0_.id=? for update
2014 [main] DEBUG org.hibernate.loader.entity.EntityLoader  - Static select for action ACTION_MERGE on entity Patient: select patient0_.id as id0_0_, patient0_.assignedRoom as assigned2_0_0_, patient0_.name as name0_0_, patient0_.medicalRecordNumber as medicalR4_0_0_ from Patient patient0_ where patient0_.id=?
2015 [main] DEBUG org.hibernate.loader.entity.EntityLoader  - Static select for action ACTION_REFRESH on entity Patient: select patient0_.id as id0_0_, patient0_.assignedRoom as assigned2_0_0_, patient0_.name as name0_0_, patient0_.medicalRecordNumber as medicalR4_0_0_ from Patient patient0_ where patient0_.id=?
2018 [main] DEBUG org.hibernate.impl.SessionFactoryObjectFactory  - initializing class SessionFactoryObjectFactory
2023 [main] DEBUG org.hibernate.impl.SessionFactoryObjectFactory  - registered: 8a83828b10310fe90110310feb1d0000 (unnamed)
2023 [main] INFO org.hibernate.impl.SessionFactoryObjectFactory  - Not binding factory to JNDI, no JNDI name configured
2023 [main] DEBUG org.hibernate.impl.SessionFactoryImpl  - instantiated session factory
2025 [main] INFO org.hibernate.cache.UpdateTimestampsCache  - starting update timestamps cache at region: org.hibernate.cache.UpdateTimestampsCache
2028 [main] INFO org.hibernate.cache.StandardQueryCache  - starting query cache at region: org.hibernate.cache.StandardQueryCache
2028 [main] DEBUG org.hibernate.impl.SessionFactoryImpl  - Checking 0 named HQL queries
2028 [main] DEBUG org.hibernate.impl.SessionFactoryImpl  - Checking 0 named SQL queries
2082 [main] DEBUG org.hibernate.impl.SessionImpl  - opened session at timestamp: 4788446131568640
2109 [main] DEBUG org.hibernate.jdbc.AbstractBatcher  - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
2109 [main] DEBUG org.hibernate.jdbc.ConnectionManager  - opening JDBC connection
2110 [main] DEBUG com.mchange.v2.resourcepool.BasicResourcePool  - resource age is okay: com.mchange.v2.c3p0.impl.NewPooledConnection@77a7f9 ---> age: 647   max: 2000 [com.mchange.v2.resourcepool.BasicResourcePool@482923]
2110 [main] DEBUG com.mchange.v2.resourcepool.BasicResourcePool  - trace com.mchange.v2.resourcepool.BasicResourcePool@482923 [managed: 10, unused: 9, excluded: 0] (e.g. com.mchange.v2.c3p0.impl.NewPooledConnection@97a560)
2111 [main] DEBUG org.hibernate.SQL  - select this_.id as id0_0_, this_.assignedRoom as assigned2_0_0_, this_.name as name0_0_, this_.medicalRecordNumber as medicalR4_0_0_ from Patient this_ where this_.medicalRecordNumber=?
Hibernate: select this_.id as id0_0_, this_.assignedRoom as assigned2_0_0_, this_.name as name0_0_, this_.medicalRecordNumber as medicalR4_0_0_ from Patient this_ where this_.medicalRecordNumber=?
2111 [main] DEBUG org.hibernate.jdbc.AbstractBatcher  - preparing statement
2125 [main] DEBUG org.hibernate.type.StringType  - binding '12345678' to parameter: 1
2141 [main] DEBUG org.hibernate.jdbc.AbstractBatcher  - about to open ResultSet (open ResultSets: 0, globally: 0)
2143 [main] DEBUG org.hibernate.loader.Loader  - processing result set
2143 [main] DEBUG org.hibernate.loader.Loader  - result set row: 0
2144 [main] DEBUG org.hibernate.type.LongType  - returning '1' as column: id0_0_
2146 [main] DEBUG org.hibernate.loader.Loader  - result row: EntityKey[Patient#1]
2147 [main] DEBUG org.hibernate.loader.Loader  - Initializing object from ResultSet: [Patient#1]
2154 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister  - Hydrating entity: [Patient#1]
2155 [main] DEBUG org.hibernate.type.LongType  - returning '1' as column: assigned2_0_0_
2155 [main] DEBUG org.hibernate.type.StringType  - returning 'Fred Example' as column: name0_0_
2155 [main] DEBUG org.hibernate.type.StringType  - returning '12345678' as column: medicalR4_0_0_
2157 [main] DEBUG org.hibernate.loader.Loader  - done processing result set (1 rows)
2157 [main] DEBUG org.hibernate.jdbc.AbstractBatcher  - about to close ResultSet (open ResultSets: 1, globally: 1)
2157 [main] DEBUG org.hibernate.jdbc.AbstractBatcher  - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
2158 [main] DEBUG org.hibernate.jdbc.AbstractBatcher  - closing statement
2161 [main] DEBUG org.hibernate.loader.Loader  - total objects hydrated: 1
2161 [main] DEBUG org.hibernate.engine.TwoPhaseLoad  - resolving associations for [Patient#1]
2167 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener  - loading entity: [Room#1]
2168 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener  - creating new proxy for entity
2172 [main] DEBUG org.hibernate.engine.TwoPhaseLoad  - done materializing entity [Patient#1]
2172 [main] DEBUG org.hibernate.engine.StatefulPersistenceContext  - initializing non-lazy collections
2172 [main] DEBUG org.hibernate.jdbc.JDBCContext  - after autocommit
2172 [main] DEBUG org.hibernate.jdbc.ConnectionManager  - aggressively releasing JDBC connection
2173 [main] DEBUG org.hibernate.jdbc.ConnectionManager  - releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
2175 [main] DEBUG com.mchange.v2.resourcepool.BasicResourcePool  - trace com.mchange.v2.resourcepool.BasicResourcePool@482923 [managed: 10, unused: 9, excluded: 0] (e.g. com.mchange.v2.c3p0.impl.NewPooledConnection@97a560)
2179 [main] DEBUG org.hibernate.impl.SessionImpl  - initializing proxy: [Room#1]
2179 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener  - attempting to resolve: [Room#1]
2179 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener  - object not resolved in any cache: [Room#1]
2180 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister  - Fetching entity: [Room#1]
2180 [main] DEBUG org.hibernate.loader.Loader  - loading entity: [Room#1]
2180 [main] DEBUG org.hibernate.jdbc.AbstractBatcher  - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
2180 [main] DEBUG org.hibernate.jdbc.ConnectionManager  - opening JDBC connection
2180 [main] DEBUG com.mchange.v2.resourcepool.BasicResourcePool  - resource age is okay: com.mchange.v2.c3p0.impl.NewPooledConnection@406199 ---> age: 706   max: 2000 [com.mchange.v2.resourcepool.BasicResourcePool@482923]
2181 [main] DEBUG com.mchange.v2.resourcepool.BasicResourcePool  - trace com.mchange.v2.resourcepool.BasicResourcePool@482923 [managed: 10, unused: 9, excluded: 0] (e.g. com.mchange.v2.c3p0.impl.NewPooledConnection@97a560)
2181 [main] DEBUG org.hibernate.SQL  - select room0_.id as id1_0_, room0_.name as name1_0_ from Room room0_ where room0_.id=?
Hibernate: select room0_.id as id1_0_, room0_.name as name1_0_ from Room room0_ where room0_.id=?
2185 [main] DEBUG org.hibernate.jdbc.AbstractBatcher  - preparing statement
2185 [main] DEBUG org.hibernate.type.LongType  - binding '1' to parameter: 1
2186 [main] DEBUG org.hibernate.jdbc.AbstractBatcher  - about to open ResultSet (open ResultSets: 0, globally: 0)
2186 [main] DEBUG org.hibernate.loader.Loader  - processing result set
2186 [main] DEBUG org.hibernate.loader.Loader  - result set row: 0
2186 [main] DEBUG org.hibernate.loader.Loader  - result row: EntityKey[Room#1]
2187 [main] DEBUG org.hibernate.loader.Loader  - Initializing object from ResultSet: [Room#1]
2187 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister  - Hydrating entity: [Room#1]
2187 [main] DEBUG org.hibernate.type.StringType  - returning 'Room 101' as column: name1_0_
2187 [main] DEBUG org.hibernate.loader.Loader  - done processing result set (1 rows)
2187 [main] DEBUG org.hibernate.jdbc.AbstractBatcher  - about to close ResultSet (open ResultSets: 1, globally: 1)
2187 [main] DEBUG org.hibernate.jdbc.AbstractBatcher  - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
2187 [main] DEBUG org.hibernate.jdbc.AbstractBatcher  - closing statement
2187 [main] DEBUG org.hibernate.loader.Loader  - total objects hydrated: 1
2188 [main] DEBUG org.hibernate.engine.TwoPhaseLoad  - resolving associations for [Room#1]
2188 [main] DEBUG org.hibernate.engine.TwoPhaseLoad  - done materializing entity [Room#1]
2188 [main] DEBUG org.hibernate.engine.StatefulPersistenceContext  - initializing non-lazy collections
2188 [main] DEBUG org.hibernate.loader.Loader  - done entity load
2188 [main] INFO Main  - patient=Patient[Fred Example] patient.assignedRoom=Room[Room 101]
2188 [main] INFO Main  - patient.id=1
2188 [main] INFO Main  - patient.assignedRoom.id=0
2188 [main] ERROR Main  - WTF? ID OF ROOM IS ZERO!
2188 [main] INFO Main  - patient.assignedRoom.id=1


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

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.