I went ahead and added spring-jpa-2.0.1.jar and spring-jdbc-2.0.1.jar
persistence-api-1.0.jar into my servicemix lib directory to get past the
problems I mentioned before (I'm still surprised I'd have to do this
myself). Now I'm getting new problems with the hibernate jars not being
accessible to the classloader. does this now mean that my hibernate jars
shouldn't be in my service unit and should instead all be added to the
servicemix lib directory? This doesn't seem right to me.....
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'entityManagerFactory' defined in
class path resource [flare-hibernate-spring.xml]: Invocation of init method
failed; nested exception is java.lang.Illegal
ArgumentException: interface
org.hibernate.ejb.HibernateEntityManagerFactoryis not visible from
class loader
Caused by:
java.lang.IllegalArgumentException: interface
org.hibernate.ejb.HibernateEntityManagerFactory is not visible from class l
oader
at java.lang.reflect.Proxy.getProxyClass(Proxy.java:353)
at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:581)
at
org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.createEntityManagerFactoryProxy
(AbstractEntityMan
agerFactoryBean.java:270)
at
org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet
(AbstractEntityManagerFactoryBe
an.java:251)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods
(AbstractAutowir
eCapableBeanFactory.java:1057)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean
(AbstractAutowireCa
pableBeanFactory.java:1024)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean
(AbstractAutowireCapabl
eBeanFactory.java:421)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(
AbstractBeanFactory.java:245)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton
(DefaultSingletonBeanRegist
ry.java:140)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(
AbstractBeanFactory.java:242)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(
AbstractBeanFactory.java:156)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons
(DefaultListableB
eanFactory.java:270)
at
org.springframework.context.support.AbstractApplicationContext.refresh(
AbstractApplicationContext.java:346)
at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(
ClassPathXmlApplicationContext.java:
92)
On 8/1/07, Ryan Moquin <[EMAIL PROTECTED]> wrote:
>
> I'm having a hard time figureing out how to setup a datasource in
> servicemix. I'm getting the error:
>
> Loading Apache ServiceMix from servicemix.xml on the CLASSPATH
> Caught: org.springframework.beans.factory.BeanDefinitionStoreException :
> Failed to load type: org.springframework.jdbc.dat
> asource.DriverManagerDataSource. Reason: java.lang.ClassNotFoundException:
> org.springframework.jdbc.datasource.DriverMana
> gerDataSource; nested exception is java.lang.ClassNotFoundException :
> org.springframework.jdbc.datasource.DriverManagerDat
> aSource
> org.springframework.beans.factory.BeanDefinitionStoreException: Failed to
> load type: org.springframework.jdbc.datasource.
> DriverManagerDataSource. Reason: java.lang.ClassNotFoundException:
> org.springframework.jdbc.datasource.DriverManagerDataS
> ource; nested exception is java.lang.ClassNotFoundException:
> org.springframework.jdbc.datasource.DriverManagerDataSource
> Caused by: java.lang.ClassNotFoundException:
> org.springframework.jdbc.datasource.DriverManagerDataSource
> at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
> at java.security.AccessController.doPrivileged(Native Method)
>
> There are a bunch of spring jars in the lib directory, but I don't see
> this class. Do I have a broken servicemix version or am I supposed to be
> adding this myself?
>