Beginner |
|
Joined: Thu Apr 15, 2004 2:01 pm Posts: 25
|
Hello
I am trying to use Spring Framework and getting an error:
DEBUG (AbstractBeanFactory.java:135) (org.springframework.beans.factory.support.DefaultListableBeanFactory) - Returning cached instance of singleton bean 'sessionFactory'
DEBUG (AbstractBeanFactory.java:455) (org.springframework.beans.factory.support.DefaultListableBeanFactory) - Bean with name 'sessionFactory' is a factory bean
DEBUG (BeanWrapperImpl.java:595) (org.springframework.beans.BeanWrapperImpl) - About to invoke write method [public void org.springframework.orm.hibernate.HibernateTransactionManager.setSessionFactory(net.sf.hibernate.SessionFactory)] on object of class [org.springframework.orm.hibernate.HibernateTransactionManager]
DEBUG (BeanWrapperImpl.java:606) (org.springframework.beans.BeanWrapperImpl) - Invoked write method [public void org.springframework.orm.hibernate.HibernateTransactionManager.setSessionFactory(net.sf.hibernate.SessionFactory)] with value of type [net.sf.hibernate.SessionFactory]
DEBUG (AbstractAutowireCapableBeanFactory.java:128) (org.springframework.beans.factory.support.DefaultListableBeanFactory) - Invoking BeanPostProcessors before initialization of bean 'transactionManager'
DEBUG (AbstractAutowireCapableBeanFactory.java:717) (org.springframework.beans.factory.support.DefaultListableBeanFactory) - Calling afterPropertiesSet() on bean with beanName 'transactionManager'
[5/18/04 16:24:46:788 EDT] 3c2673d8 ExceptionUtil E CNTR0020E: Non-application exception occurred while processing method "getCompanyDivisionList" on bean "BeanId(Planning#PlanningEJB.jar#CommonService, null)". Exception data: java.lang.NoSuchMethodError: net.sf.hibernate.engine.SessionFactoryImplementor: method getConnectionProvider()Lnet/sf/hibernate/connection/ConnectionProvider; not found
at org.springframework.orm.hibernate.HibernateTransactionManager.afterPropertiesSet(HibernateTransactionManager.java:226)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:718)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:213)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:159)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:178)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:272)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:58)
at com.bgm.planning.common.util.ApplicationContextFactory.getApplicationContext(ApplicationContextFactory.java:45)
at com.bgm.planning.common.ejb.session.CommonServiceBean.getCompanyDivisionList(CommonServiceBean.java:90)
at com.bgm.planning.common.ejb.session.EJSRemoteStatelessCommonService_1b9653cb.getCompanyDivisionList(EJSRemoteStatelessCommonService_1b9653cb.java:22)
at com.bgm.planning.common.ejb.session._CommonService_Stub.getCompanyDivisionList(_CommonService_Stub.java:258)
at com.bgm.planning.common.control.CommonServiceBD.getCompanyDivisionList(CommonServiceBD.java:83)
at com.bgm.planning.common.control.JsGenerator.generateCompanyDivisionJs(JsGenerator.java:206)
at com.bgm.planning.common.control.JsGenerator.makeAllJsFiles(JsGenerator.java:84)
at com.bgm.planning.common.control.AutoJsGenerator.createJScripts(AutoJsGenerator.java:79)
at com.bgm.planning.common.control.AutoJsGenerator.init(AutoJsGenerator.java:35)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doInit(StrictServletInstance.java:82)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._init(StrictLifecycleServlet.java:147)
at com.ibm.ws.webcontainer.servlet.PreInitializedServletState.init(StrictLifecycleServlet.java:270)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.init(StrictLifecycleServlet.java:113)
at com.ibm.ws.webcontainer.servlet.ServletInstance.init(ServletInstance.java:189)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at com.ibm.ws.webcontainer.webapp.WebAppServletManager.addServlet(WebAppServletManager.java:870)
at com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadServlet(WebAppServletManager.java:224)
at com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadAutoLoadServlets(WebAppServletManager.java:542)
at com.ibm.ws.webcontainer.webapp.WebApp.loadServletManager(WebApp.java:1277)
at com.ibm.ws.webcontainer.webapp.WebApp.init(WebApp.java:283)
at com.ibm.ws.webcontainer.srt.WebGroup.loadWebApp(WebGroup.java:387)
at com.ibm.ws.webcontainer.srt.WebGroup.init(WebGroup.java:209)
at com.ibm.ws.webcontainer.WebContainer.addWebApplication(WebContainer.java:987)
at com.ibm.ws.runtime.component.WebContainerImpl.install(WebContainerImpl.java:136)
at com.ibm.ws.runtime.component.WebContainerImpl.start(WebContainerImpl.java:356)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:418)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:787)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:354)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:575)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:271)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:249)
at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:536)
at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:413)
at com.ibm.ws.runtime.component.ApplicationServerImpl.start(ApplicationServerImpl.java:125)
at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:536)
at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:413)
at com.ibm.ws.runtime.component.ServerImpl.start(ServerImpl.java:183)
at com.ibm.ws.runtime.WsServer.start(WsServer.java:128)
at com.ibm.ws.runtime.WsServer.main(WsServer.java:225)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:41)
at java.lang.reflect.Method.invoke(Method.java:386)
at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:94)
at com.ibm.etools.websphere.tools.runner.api.ServerRunnerV5$1.run(ServerRunnerV5.java:97)
Here is the ApplicationContext file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<!--
- Application context definition for Express on Hibernate.
-->
<beans>
<!-- Datasource that works in any application server
You could easily use J2EE data source instead if this were
running inside of a J2EE container.
-->
<bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName"><value>jdbc/bungeLSjdbc</value></property>
</bean>
<!-- Hibernate SessionFactory -->
<bean id="sessionFactory" class="org.springframework.orm.hibernate.LocalSessionFactoryBean">
<property name="dataSource"><ref local="dataSource"/></property>
<!-- Must references all OR mapping files. -->
<property name="mappingResources">
<list>
<value>com/bgm/planning/domain/UserDomain.hbm.xml</value>
<value>com/bgm/planning/domain/Group.hbm.xml</value>
</list>
</property>
<!-- Set the type of database; changing this one property will port this to Oracle,
MS SQL etc. -->
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">net.sf.hibernate.dialect.OracleDialect</prop>
</props>
</property>
</bean>
<!-- Pass the session factory to our UserDAO -->
<bean id="userDAOTarget" class="com.bgm.planning.logon.dao.UserDAOImpl">
<property name="sessionFactory"><ref local="sessionFactory"/></property>
</bean>
<bean id="transactionManager" class="org.springframework.orm.hibernate.HibernateTransactionManager">
<property name="sessionFactory"><ref bean="sessionFactory"/></property>
</bean>
<bean id="userDAO"
class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="transactionManager"><ref local="transactionManager"/></property>
<property name="target"><ref local="userDAOTarget"/></property>
<property name="transactionAttributes">
<props>
<prop key="addGroup">PROPAGATION_REQUIRED</prop>
</props>
</property>
</bean>
</beans>
Where it finds the datasource...Shows the mappings and for the Tables but gets error for bean id "transactionManager"
Can anybody help me for the same.
Thanks
gita
|
|