Announcement Announcement Module
No announcement yet.
Problem with oc4j and hibernate mapping Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem with oc4j and hibernate mapping

    I've been having some issues depoying in oracle oc4j. I am using maven, and I have seperated my project into project-core and project-web modules. The core module has the hibernate mapping files under src/main/resources/hibernate/hbm folder. The web module depends on the core module and includes the core's jar file. It works fine under jetty and tomcat, but under oc4j, it doesn't see the hibernate mapping files within the jar file and it throws and exception. I physically copied the hibernate/hbm folder under classes and it works. My session factory bean looks like this.

    <bean id="sessionFactory"
    class="org.springframework.orm.hibernate3.LocalSes sionFactoryBean">
    <property name="mappingLocations">
    <property name="dataSource" ref="dataSource" />
    <property name="hibernateProperties">
    <prop key="hibernate.dialect">

    I am getting a hibernate mapping exception
    org.springframework.orm.hibernate3.HibernateSystem Exception: Unknown entity: com.project.Dummy; nested exception is org.hibernate.MappingException: Unknown entity: com.project.Dummy
    Caused by: org.hibernate.MappingException: Unknown entity:

    Does anyone have any idea why?


  • #2
    I would presume this is related to the classpath*: prefix, there is a note about this in the reference manual that might be relevent.
    Last edited by karldmoore; Aug 29th, 2007, 12:25 PM.


    • #3

      I was already using classpath*: previously

      I ended up finding a solution. It might not be the best way to do it and I dont know why it works, but it does. I used mappingJarLocations and mapping Locations at the same time.

      <property name="mappingJarLocations">
      <property name="mappingLocations">