LocalSessionFactoryBean & multiple EAR in WebSphere
Good Day,
I have two EARs deployed to WebSphere 5.1. The one EAR has an ejb that uses the services of another ejb deployed in the second EAR.
I get the following error
java.lang.reflect.InvocationTargetException: org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'hibernateApplicationDAO' defined in class path resource [context-application.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyAccessExceptions Exception: PropertyAccessExceptionsException (1 errors); nested propertyAccessExceptions are: [org.springframework.beans.TypeMismatchException: Failed to convert property value of type [com.hsbc.spring.LocalSessionFactoryBean] to required type [net.sf.hibernate.SessionFactory] for property 'sessionFactory']
PropertyAccessExceptionsException (1 errors)
org.springframework.beans.TypeMismatchException: Failed to convert property value of type [com.hsbc.spring.LocalSessionFactoryBean] to required type [net.sf.hibernate.SessionFactory] for property 'sessionFactory'
at org.springframework.beans.BeanWrapperImpl.doTypeCo nversionIfNecessary(BeanWrapperImpl.java:905)
at org.springframework.beans.BeanWrapperImpl.setPrope rtyValue(BeanWrapperImpl.java:673)
at org.springframework.beans.BeanWrapperImpl.setPrope rtyValue(BeanWrapperImpl.java:588)
at org.springframework.beans.BeanWrapperImpl.setPrope rtyValue(BeanWrapperImpl.java:720)
at org.springframework.beans.BeanWrapperImpl.setPrope rtyValues(BeanWrapperImpl.java:747)
at org.springframework.beans.BeanWrapperImpl.setPrope rtyValues(BeanWrapperImpl.java:736)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.applyPropertyValues(Abs tractAutowireCapableBeanFactory.java:840)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.populateBean(AbstractAu towireCapableBeanFactory.java:662)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:270)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:205)
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:204)
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:136)
at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:236)
at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:284)
at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:80)
at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:65)
at org.springframework.context.access.ContextJndiBean FactoryLocator.createBeanFactory(ContextJndiBeanFa ctoryLocator.java:40)
at org.springframework.beans.factory.access.JndiBeanF actoryLocator.useBeanFactory(JndiBeanFactoryLocato r.java:69)
at org.springframework.ejb.support.AbstractEnterprise Bean.loadBeanFactory(AbstractEnterpriseBean.java:1 15)
at org.springframework.ejb.support.AbstractStatelessS essionBean.ejbCreate(AbstractStatelessSessionBean. java:63)
at java.lang.reflect.Method.invoke(Native Method)