Hi,
I can only find the one from my target

org.eclipse.persistence.internal.sessions.factories -
org.eclipse.persistence.core_1.1.0.r3634.jar - C:\development\targets

Regards,
Leen

On Fri, May 29, 2009 at 2:56 PM, Willem Jiang <[email protected]>wrote:

> Hi,
>
> Can you check if there is another version of
> org.eclipse.persistence.mappings.converters.Converter that your
> Converter implements in the ClassPath ?
>
> Willem
>
> Leen Toelen wrote:
> > Hi,
> > I am trying to get my JPA entity classes to work with camel, but ran into
> a
> > problem. One one the fields is a compressed string, and I use
> > a org.eclipse.persistence.mappings.converters.Converter on my entity to
> > automatically convert it like this:
> >
> > @Basic
> > @Column(name = "XML_Data")
> > @Converter(converterClass = CompressedStringConverter.class, name =
> > "CompressedStringConverter")
> > @Convert("CompressedStringConverter")
> > private String xmlData;
> >
> >
> > The conversion works OK in my other unit tests. But when I use it inside
> a
> > camelcontext using either a bean or jpa component, the entity manager
> throws
> > this error at me.
> >
> > [EL Severe]: 2009-05-29
> >
> 14:03:30.51--ServerSession(23860455)--javax.persistence.PersistenceException:
> > Exception [EclipseLink-28019] (Eclipse Persistence Services -
> 1.1.0.r3634):
> > org.eclipse.persistence.exceptions.EntityManagerSetupException
> > Exception Description: Deployment of PersistenceUnit [defaultunit]
> failed.
> > Internal Exception: Exception [EclipseLink-7198] (Eclipse Persistence
> > Services - 1.1.0.r3634):
> > org.eclipse.persistence.exceptions.ValidationException
> > Exception Description: Class:
> [com.company.xml2.CompressedStringConverter]
> > was not found while converting from class names to classes.
> > Internal Exception: java.lang.ClassCastException:
> > com.company.xml2.CompressedStringConverter cannot be cast to
> > org.eclipse.persistence.mappings.converters.Converter
> >  at
> >
> org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:236)
> > at
> >
> org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:111)
> >  at
> >
> org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:163)
> > at
> >
> org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:150)
> >  at
> >
> org.springframework.orm.jpa.JpaTransactionManager.createEntityManagerForTransaction(JpaTransactionManager.java:392)
> > at
> >
> org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:320)
> >  at
> >
> org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:374)
> > at
> >
> org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:125)
> >  at
> >
> org.apache.camel.component.jpa.JpaTemplateTransactionStrategy.execute(JpaTemplateTransactionStrategy.java:65)
> > at org.apache.camel.component.jpa.JpaConsumer.poll(JpaConsumer.java:56)
> >  at
> >
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:66)
> > at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
> >  at
> >
> java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
> > at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
> >  at
> >
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
> > at
> >
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
> >  at
> >
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
> > at
> >
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> >  at
> >
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> > at java.lang.Thread.run(Thread.java:619)
> > Caused by: Exception [EclipseLink-28019] (Eclipse Persistence Services -
> > 1.1.0.r3634):
> org.eclipse.persistence.exceptions.EntityManagerSetupException
> > Exception Description: Deployment of PersistenceUnit [defaultunit]
> failed.
> > Internal Exception: Exception [EclipseLink-7198] (Eclipse Persistence
> > Services - 1.1.0.r3634):
> > org.eclipse.persistence.exceptions.ValidationException
> > *Exception Description: Class:
> [com.company.xml2.CompressedStringConverter]
> > was not found while converting from class names to classes.*
> > Internal Exception: java.lang.ClassCastException:
> > com.company.xml2.CompressedStringConverter cannot be cast to
> > org.eclipse.persistence.mappings.converters.Converter
> > at
> >
> org.eclipse.persistence.exceptions.EntityManagerSetupException.deployFailed(EntityManagerSetupException.java:218)
> >
> > This looks like a classloader problem to me, because
> > the CompressedStringConverter really does
> > implement org.eclipse.persistence.mappings.converters.Converter.
> >
> > Has anyone noticed something similar with camel?
> >
> > Regards,
> > Leen Toelen
> >
>
>

Reply via email to