camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guillaume Nodet" <gno...@gmail.com>
Subject Re: Using JPA in ServiceMix + Camel
Date Thu, 15 Nov 2007 23:50:42 GMT
There is no automatic discovery of persistent units so you'd have to create
it yourself using spring jpa support afaik.

On Nov 15, 2007 8:21 PM, Hamlet84 <donatello.santoro@gmail.com> wrote:

>
> i've just try it, but i have got the same problem :-((
>
> Chris Custine-2 wrote:
> >
> > Try moving your persistence.xml to META-INF.
> >
> > Chris
> >
> > On Nov 15, 2007 3:25 AM, Hamlet84 <donatello.santoro@gmail.com> wrote:
> >
> >>
> >> Hi..
> >> I have an application with ServiceMix 3.2 and Camel component.
> >> Well, I want to use the JPA Component in camel to store Exchange in a
> >> persistent database. But i have a problem when I install the
> application
> >> in
> >> ServiceMix.
> >>
> >> in Camel-context.xml
> >> [..]
> >>  <bean id="transactionTemplate"
> >> class="org.springframework.transaction.support.TransactionTemplate">
> >>    <property name="transactionManager">
> >>      <bean class="org.springframework.orm.jpa.JpaTransactionManager">
> >>        <property name="entityManagerFactory"
> ref="entityManagerFactory"/>
> >>      </bean>
> >>    </property>
> >>  </bean>
> >>
> >>  <bean id="jpaTemplate" class="org.springframework.orm.jpa.JpaTemplate
> ">
> >>    <property name="entityManagerFactory" ref="entityManagerFactory"/>
> >>  </bean>
> >>
> >>  <bean id="entityManagerFactory"
> >> class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean">
> >>    <property name="persistenceUnitName" value="camel"/>
> >>  </bean>
> >>
> >> my Persistence.xml
> >>
> >> <persistence xmlns=".." xmlns:xsi=".." version="1.0">
> >>
> >>  <persistence-unit name="camel" transaction-type="RESOURCE_LOCAL">
> >>
> >>    <properties>
> >>      <property name="hibernate.dialect"
> >> value="org.hibernate.dialect.HSQLDialect"/>
> >>      <property name="hibernate.connection.driver_class"
> >> value="org.hsqldb.jdbcDriver"/>
> >>      <property name="hibernate.connection.username" value="sa"/>
> >>      <property name="hibernate.connection.password" value=""/>
> >>      <property name="hibernate.connection.url"
> >> value="jdbc:hsqldb:mem:camel_etl"/>
> >>      <property name="hibernate.hbm2ddl.auto" value="create"/>
> >>    </properties>
> >>
> >>  </persistence-unit>
> >> </persistence>
> >>
> >> the error is "Invocation of init method failed; nested exception is
> >> javax.persistence.PersistenceException: No Persistence provider for
> >> EntityManager named camel"
> >>
> >> I think that it is a problem of the position of file persistence.xml.
> My
> >> service activator has the follow structure
> >>
> >> test-su.zip
> >> |--test-camel-su.zip
> >>   |---camel-context.xml
> >>   |---persistence.xml
> >>   |---META-INF
> >>       |--jbi.xml
> >> |--META-INF
> >>   |--- jbi.xml
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Using-JPA-in-ServiceMix-%2B-Camel-tf4811001s22882.html#a13765083
> >> Sent from the Camel - Users mailing list archive at Nabble.com.
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Using-JPA-in-ServiceMix-%2B-Camel-tf4811001s22882.html#a13779788
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message