4 Replies Latest reply on Nov 11, 2014 4:52 AM by Claus Ibsen

    Unable to Load Entities in Jboss Fuse ESB

    Bharath Ravi Newbie

      Hi,

       

          My META-INF/Persistence xml is as follows

       

      <persistence-unit name="jpapoc" transaction-type="RESOURCE_LOCAL">

              <class>com.xxx.jpa.PersonEntity</class>

              <provider>org.hibernate.ejb.HibernatePersistence</provider>

              <properties>

                  <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect" />

                  <property name="hibernate.hbm2ddl.auto" value="create" />

               </properties>

         </persistence-unit>

       

      My META-INF/spring/beans.xml as follows

       

      <cxf:cxfEndpoint address="/services/sm" id="sm"

              serviceClass="com.xxx.jpa.MyWebService">

              <cxf:properties>

                  <entry key="dataFormat" value="POJO" />

                  <entry key="setDefaultBus" value="true" />

              </cxf:properties>

          </cxf:cxfEndpoint>

      <bean id="myProcessor" class="com.xxx.jpa.PersonProcessor">

               <property name="entityManagerFactory" ref="entityManagerFactory"/>

      </bean>

      <bean id="entityManagerFactory"

              class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">

              <property name="persistenceUnitName" value="jpapoc" />

              <property name="jpaVendorAdapter">

                  <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">

                      <property name="databasePlatform" value="org.hibernate.dialect.Oracle10gDialect" />

                  </bean>

              </property>

              <property name="dataSource" ref="dataSource" />

          </bean>

          <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"

              destroy-method="close">

              <property name="driverClass" value="oracle.jdbc.driver.OracleDriver" />

              <property name="jdbcUrl" value="jdbc:oracle:thin:@localhost:1523:xx" />

              <property name="user" value="test" />

              <property name="password" value="test" />

          </bean>

          <camel:camelContext>

              <camel:route>

                  <camel:from uri="cxf:bean:sm?synchronous=true" />

                  <camel:process ref="myProcessor" />

              </camel:route>

          </camel:camelContext>

       

      When i try to deploy this application in Jboss Fuse ESB I am getting Caused by: java.lang.ClassNotFoundException: com.xxx.jpa.PersonEntity not found by org.hibernate.entitymanager

      I have used @Entity in Person Entity classes and also gave dymanic import in pom.xml but still it is not working