title: Joda type def loading fails during hibernate init
body: <p>Joda time in pair with hibernate support is used. Configuration is as follows:</p>
  
  <p>There's typedefs in <strong><em>org.joda.time.package-info.java</em></strong>:</p>
  
  <pre><code>@org.hibernate.annotations.TypeDefs({
   @org.hibernate.annotations.TypeDef(
                          name="localDate",
                          typeClass =
  org.joda.time.contrib.hibernate.PersistentLocalDate.class
          )
  })
  package org.joda.time;
  </code></pre>
  
  <p>There's a spring context with session factory config:</p>
  
  <pre><code>&lt;bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"&gt;
          &lt;property name="packagesToScan"&gt;
              &lt;list&gt;
                  &lt;value&gt;org.joda.time&lt;/value&gt;
              &lt;/list&gt;
          &lt;/property&gt;
          &lt;property name="annotatedClasses"&gt;
              &lt;list&gt;
                  &lt;value&gt;...&lt;/value&gt;
  ...
              &lt;/list&gt;
          &lt;/property&gt;
          &lt;property name="hibernateProperties"&gt;
              &lt;props&gt;
                  &lt;prop key="hibernate.dialect"&gt;org.hibernate.dialect.Oracle10gDialect&lt;/prop&gt;
                  &lt;prop key="hibernate.query.substitutions"&gt;true 1, false 0, yes 'Y', no 'N'&lt;/prop&gt;
                  &lt;prop key="hibernate.show_sql"&gt;false&lt;/prop&gt;
                  &lt;prop key="hibernate.format_sql"&gt;true&lt;/prop&gt;
              &lt;/props&gt;
          &lt;/property&gt;
          &lt;property name="dataSource" ref="dataSource"/&gt;
      &lt;/bean&gt;
  </code></pre>
  
  <p>Then there's test case:</p>
  
  <pre><code>@RunWith(SpringJUnit4ClassRunner.class)
  @ContextConfiguration({"classpath:spring-test.xml"})
  @Transactional
  public class OperatorDaoTest extends AbstractTransactionalJUnit4SpringContextTests {
  //autowired dao field defined
  ...
  @Test
  public void testMethod(){
  //calls DAO method
  }
  }
  </code></pre>
  
  <p>Problem is in next exception:</p>
  
  <pre><code>Caused by: org.hibernate.MappingException: Could not determine type for: localDate, at table: TABLE_NAME, for columns: [org.hibernate.mapping.Column(DATE_COLUMN)]
  </code></pre>