Hi all,

          I'm getting a class cast exception when I try to instantiate a
LocalEntityManagerFactoryBean. Here is the spring xml declaration:

    <bean id="entityManagerFactoryBean"
class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean">
        <property name="persistenceUnitName" value="model"/>
    </bean>

         And here's my persistence.xml:

    <persistence-unit name="model" transaction-type="RESOURCE_LOCAL">
        <class>de.edigrid.util.servicemix.model.EmailLog</class>
        <class>de.edigrid.util.servicemix.model.TransactionLog</class>
        <properties>
            <property name="hibernate.dialect"
value="org.hibernate.dialect.HSQLDialect" />
            <property name="hibernate.connection.driver_class"
value="org.hsqldb.jdbcDriver" />
            <property name="hibernate.connection.url"
value="jdbc:hsqldb:file:data/db/logging" />
            <property name="hibernate.connection.username" value="sa" />
            <property name="hibernate.connection.password" value="" />
            <property name="hibernate.hbm2ddl.auto" value="create" />
            <property name="hibernate.show_sql" value="false" />
            <property name="hibernate.format_sql" value="false" />
        </properties>
    </persistence-unit>

         I'm running SMX 4.3.0 and I have jpa-hibernate installed.

Any ideas ? Also I noticed on various web pages mentioned an example called
"examples-jpa-osgi", anybody know where I can find the source code for it ?

Sorin.

Reply via email to