Spring Context initialization failed while bootstrapping with Websphere 7.x server -
i working on migration task migrating project websphere 6.1 websphere 7.0.0.39. upgraded jdk version 1.5 1.6.
actually 1 of web project, uses spring , hibernate combination. version of spring 2.5.3. spring context initialized while bootstrapping i.e. @ server startup.
so getting org.springframework.web.context.contextloader initwebapplicationcontext context initialization failed error while server startup.
i did google search on below issue , found jira spr-4788 says spring2.5 && ibm jdk6 produce npe below.
stack trace server startup log :
org.springframework.context.support.abstractapplicationcontext obtainfreshbeanfactory bean factory application context [org.springframework.web.context.support.xmlwebapplicationcontext@27822782]: org.springframework.beans.factory.support.defaultlistablebeanfactory@39ed39ed [5/9/16 16:29:03:417 ist] 0000000c defaultlistab org.springframework.beans.factory.support.defaultsingletonbeanregistry destroysingletons destroying singletons in org.springframework.beans.factory.support.defaultlistablebeanfactory@39ed39ed: defining beans [applicationcontextholder,datasource,entitymanagerfactory,transactionmanager,jndieptemplate,sequenceproxy,transferactionitemdao,transfertemplateactionitemdao,achactionitemdao,achtemplateactionitemdao,wireactionitemdao,wiretemplateactionitemdao,pospayactionitemdao,cdbalancesdao,bankirreportsdao,favoritedao,statedao,securemsgactionitemdao,specialreportitemdao,alertsactionitemdao,shortcutmenudao,useractionitemdao,achauthactionitemdao,corporatewirebannerdao,wirebannerdao,corporatetransferbannerdao,transferbannerdao,corporateachbannerdao,achbannerdao,corporatepospaybannerdao,pospaybannerdao,issuesbannerdao,stoppaybannerdao,uploadbannerdao,corporateissuesbannerdao,corporatestoppaybannerdao,corporateuploadbannerdao,org.springframework.aop.config.internalautoproxycreator,org.springframework.transaction.config.internaltransactionadvisor,cdbalancesdao,org.springframework.context.annotation.internalpersistenceannotationprocessor,org.springframework.context.annotation.internalcommonannotationprocessor,org.springframework.context.annotation.internalautowiredannotationprocessor,org.springframework.context.annotation.internalrequiredannotationprocessor]; root of factory hierarchy [5/9/16 16:29:03:417 ist] 0000000c contextloader e org.springframework.web.context.contextloader initwebapplicationcontext context initialization failed org.springframework.beans.factory.beancreationexception: error creating bean name 'org.springframework.context.annotation.internalpersistenceannotationprocessor': initialization of bean failed; nested exception java.lang.nullpointerexception @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.docreatebean(abstractautowirecapablebeanfactory.java:478) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory$1.run(abstractautowirecapablebeanfactory.java:409) @ java.security.accesscontroller.doprivileged(accesscontroller.java:224) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.createbean(abstractautowirecapablebeanfactory.java:380) @ org.springframework.beans.factory.support.abstractbeanfactory$1.getobject(abstractbeanfactory.java:264) @ org.springframework.beans.factory.support.defaultsingletonbeanregistry.getsingleton(defaultsingletonbeanregistry.java:217) @ org.springframework.beans.factory.support.abstractbeanfactory.dogetbean(abstractbeanfactory.java:261) @ org.springframework.beans.factory.support.abstractbeanfactory.getbean(abstractbeanfactory.java:185) @ org.springframework.beans.factory.support.abstractbeanfactory.getbean(abstractbeanfactory.java:164) @ org.springframework.context.support.abstractapplicationcontext.registerbeanpostprocessors(abstractapplicationcontext.java:579) @ org.springframework.context.support.abstractapplicationcontext.refresh(abstractapplicationcontext.java:366) @ org.springframework.web.context.contextloader.createwebapplicationcontext(contextloader.java:255) @ org.springframework.web.context.contextloader.initwebapplicationcontext(contextloader.java:199) @ org.springframework.web.context.contextloaderlistener.contextinitialized(contextloaderlistener.java:45) @ com.ibm.ws.webcontainer.webapp.webapp.notifyservletcontextcreated(webapp.java:1721) @ com.ibm.ws.webcontainer.webapp.webapp.commoninitializationfinish(webapp.java:388) @ com.ibm.ws.webcontainer.webapp.webappimpl.initialize(webappimpl.java:299) @ com.ibm.ws.webcontainer.webapp.webgroupimpl.addwebapplication(webgroupimpl.java:100) @ com.ibm.ws.webcontainer.virtualhostimpl.addwebapplication(virtualhostimpl.java:166) @ com.ibm.ws.webcontainer.wswebcontainer.addwebapp(wswebcontainer.java:732) @ com.ibm.ws.webcontainer.wswebcontainer.addwebapplication(wswebcontainer.java:617) @ com.ibm.ws.webcontainer.component.webcontainerimpl.install(webcontainerimpl.java:376) @ com.ibm.ws.webcontainer.component.webcontainerimpl.start(webcontainerimpl.java:668) @ com.ibm.ws.runtime.component.applicationmgrimpl.start(applicationmgrimpl.java:1146) @ com.ibm.ws.runtime.component.deployedapplicationimpl.firedeployedobjectstart(deployedapplicationimpl.java:1320) @ com.ibm.ws.runtime.component.deployedmoduleimpl.start(deployedmoduleimpl.java:611) @ com.ibm.ws.runtime.component.deployedapplicationimpl.start(deployedapplicationimpl.java:945) @ com.ibm.ws.runtime.component.applicationmgrimpl.startapplication(applicationmgrimpl.java:759) @ com.ibm.ws.runtime.component.applicationmgrimpl$3.run(applicationmgrimpl.java:2082) @ com.ibm.ws.security.auth.contextmanagerimpl.runas(contextmanagerimpl.java:5398) @ com.ibm.ws.security.auth.contextmanagerimpl.runassystem(contextmanagerimpl.java:5486) @ com.ibm.ws.security.core.securitycontext.runassystem(securitycontext.java:255) @ com.ibm.ws.runtime.component.applicationmgrimpl.start(applicationmgrimpl.java:2087) @ com.ibm.ws.runtime.component.compositionunitmgrimpl.start(compositionunitmgrimpl.java:434) @ com.ibm.ws.runtime.component.compositionunitimpl.start(compositionunitimpl.java:123) @ com.ibm.ws.runtime.component.compositionunitmgrimpl.start(compositionunitmgrimpl.java:377) @ com.ibm.ws.runtime.component.compositionunitmgrimpl.access$300(compositionunitmgrimpl.java:123) @ com.ibm.ws.runtime.component.compositionunitmgrimpl$cuinitializer.run(compositionunitmgrimpl.java:944) @ com.ibm.wsspi.runtime.component.wscomponentimpl$_asynchinitializer.run(wscomponentimpl.java:496) @ com.ibm.ws.util.threadpool$worker.run(threadpool.java:1662) caused by: java.lang.nullpointerexception @ org.springframework.core.generictyperesolver.gettypevariablemap(generictyperesolver.java:144) @ org.springframework.core.generictyperesolver.resolvereturntype(generictyperesolver.java:93) @ org.springframework.beans.generictypeawarepropertydescriptor.getpropertytype(generictypeawarepropertydescriptor.java:58) @ java.beans.propertydescriptor.setwritemethod(propertydescriptor.java:111) @ java.beans.propertydescriptor.<init>(propertydescriptor.java:77) @ org.springframework.beans.generictypeawarepropertydescriptor.<init>(generictypeawarepropertydescriptor.java:47) @ org.springframework.beans.cachedintrospectionresults.<init>(cachedintrospectionresults.java:250) @ org.springframework.beans.cachedintrospectionresults.forclass(cachedintrospectionresults.java:144) @ org.springframework.beans.beanwrapperimpl.getcachedintrospectionresults(beanwrapperimpl.java:252) @ org.springframework.beans.beanwrapperimpl.convertforproperty(beanwrapperimpl.java:380) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.convertforproperty(abstractautowirecapablebeanfactory.java:1287) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.applypropertyvalues(abstractautowirecapablebeanfactory.java:1248) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.populatebean(abstractautowirecapablebeanfactory.java:1008) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.docreatebean(abstractautowirecapablebeanfactory.java:470) ... 39 more [5/9/16 16:29:03:433 ist] 0000000c webapp e com.ibm.ws.webcontainer.webapp.webapp notifyservletcontextcreated srve0283e: exception caught while initializing context: {0} org.springframework.beans.factory.beancreationexception: error creating bean name 'org.springframework.context.annotation.internalpersistenceannotationprocessor': initialization of bean failed; nested exception java.lang.nullpointerexception @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.docreatebean(abstractautowirecapablebeanfactory.java:478) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory$1.run(abstractautowirecapablebeanfactory.java:409) @ java.security.accesscontroller.doprivileged(accesscontroller.java:224) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.createbean(abstractautowirecapablebeanfactory.java:380) @ org.springframework.beans.factory.support.abstractbeanfactory$1.getobject(abstractbeanfactory.java:264) @ org.springframework.beans.factory.support.defaultsingletonbeanregistry.getsingleton(defaultsingletonbeanregistry.java:217) @ org.springframework.beans.factory.support.abstractbeanfactory.dogetbean(abstractbeanfactory.java:261) @ org.springframework.beans.factory.support.abstractbeanfactory.getbean(abstractbeanfactory.java:185) @ org.springframework.beans.factory.support.abstractbeanfactory.getbean(abstractbeanfactory.java:164) @ org.springframework.context.support.abstractapplicationcontext.registerbeanpostprocessors(abstractapplicationcontext.java:579) @ org.springframework.context.support.abstractapplicationcontext.refresh(abstractapplicationcontext.java:366) @ org.springframework.web.context.contextloader.createwebapplicationcontext(contextloader.java:255) @ org.springframework.web.context.contextloader.initwebapplicationcontext(contextloader.java:199) @ org.springframework.web.context.contextloaderlistener.contextinitialized(contextloaderlistener.java:45) @ com.ibm.ws.webcontainer.webapp.webapp.notifyservletcontextcreated(webapp.java:1721) @ com.ibm.ws.webcontainer.webapp.webapp.commoninitializationfinish(webapp.java:388) @ com.ibm.ws.webcontainer.webapp.webappimpl.initialize(webappimpl.java:299) @ com.ibm.ws.webcontainer.webapp.webgroupimpl.addwebapplication(webgroupimpl.java:100) @ com.ibm.ws.webcontainer.virtualhostimpl.addwebapplication(virtualhostimpl.java:166) @ com.ibm.ws.webcontainer.wswebcontainer.addwebapp(wswebcontainer.java:732) @ com.ibm.ws.webcontainer.wswebcontainer.addwebapplication(wswebcontainer.java:617) @ com.ibm.ws.webcontainer.component.webcontainerimpl.install(webcontainerimpl.java:376) @ com.ibm.ws.webcontainer.component.webcontainerimpl.start(webcontainerimpl.java:668) @ com.ibm.ws.runtime.component.applicationmgrimpl.start(applicationmgrimpl.java:1146) @ com.ibm.ws.runtime.component.deployedapplicationimpl.firedeployedobjectstart(deployedapplicationimpl.java:1320) @ com.ibm.ws.runtime.component.deployedmoduleimpl.start(deployedmoduleimpl.java:611) @ com.ibm.ws.runtime.component.deployedapplicationimpl.start(deployedapplicationimpl.java:945) @ com.ibm.ws.runtime.component.applicationmgrimpl.startapplication(applicationmgrimpl.java:759) @ com.ibm.ws.runtime.component.applicationmgrimpl$3.run(applicationmgrimpl.java:2082) @ com.ibm.ws.security.auth.contextmanagerimpl.runas(contextmanagerimpl.java:5398) @ com.ibm.ws.security.auth.contextmanagerimpl.runassystem(contextmanagerimpl.java:5486) @ com.ibm.ws.security.core.securitycontext.runassystem(securitycontext.java:255) @ com.ibm.ws.runtime.component.applicationmgrimpl.start(applicationmgrimpl.java:2087) @ com.ibm.ws.runtime.component.compositionunitmgrimpl.start(compositionunitmgrimpl.java:434) @ com.ibm.ws.runtime.component.compositionunitimpl.start(compositionunitimpl.java:123) @ com.ibm.ws.runtime.component.compositionunitmgrimpl.start(compositionunitmgrimpl.java:377) @ com.ibm.ws.runtime.component.compositionunitmgrimpl.access$300(compositionunitmgrimpl.java:123) @ com.ibm.ws.runtime.component.compositionunitmgrimpl$cuinitializer.run(compositionunitmgrimpl.java:944) @ com.ibm.wsspi.runtime.component.wscomponentimpl$_asynchinitializer.run(wscomponentimpl.java:496) @ com.ibm.ws.util.threadpool$worker.run(threadpool.java:1662) caused by: java.lang.nullpointerexception @ org.springframework.core.generictyperesolver.gettypevariablemap(generictyperesolver.java:144) @ org.springframework.core.generictyperesolver.resolvereturntype(generictyperesolver.java:93) @ org.springframework.beans.generictypeawarepropertydescriptor.getpropertytype(generictypeawarepropertydescriptor.java:58) @ java.beans.propertydescriptor.setwritemethod(propertydescriptor.java:111) @ java.beans.propertydescriptor.<init>(propertydescriptor.java:77) @ org.springframework.beans.generictypeawarepropertydescriptor.<init>(generictypeawarepropertydescriptor.java:47) @ org.springframework.beans.cachedintrospectionresults.<init>(cachedintrospectionresults.java:250) @ org.springframework.beans.cachedintrospectionresults.forclass(cachedintrospectionresults.java:144) @ org.springframework.beans.beanwrapperimpl.getcachedintrospectionresults(beanwrapperimpl.java:252) @ org.springframework.beans.beanwrapperimpl.convertforproperty(beanwrapperimpl.java:380) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.convertforproperty(abstractautowirecapablebeanfactory.java:1287) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.applypropertyvalues(abstractautowirecapablebeanfactory.java:1248) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.populatebean(abstractautowirecapablebeanfactory.java:1008) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.docreatebean(abstractautowirecapablebeanfactory.java:470) ... 39 more
spring jars in class-path of web project:
3rdparty/spring-2.5.3.jar 3rdparty/spring-aop.jar 3rdparty/spring-beans.jar 3rdparty/spring-binding.jar 3rdparty/spring-context-support.jar 3rdparty/spring-context.jar 3rdparty/spring-core.jar 3rdparty/spring-dao.jar 3rdparty/spring-faces.jar 3rdparty/spring-jdbc.jar 3rdparty/spring-js.jar 3rdparty/spring-mock.jar 3rdparty/spring-security-acl.jar 3rdparty/spring-security-core-tiger.jar 3rdparty/spring-security-core.jar 3rdparty/spring-security-taglibs.jar 3rdparty/spring-support.jar 3rdparty/spring-test.jar 3rdparty/spring-tx.jar 3rdparty/spring-web.jar 3rdparty/spring-webflow.jar 3rdparty/spring-webmvc.jar
spring configuration file
<?xml version="1.0" encoding="utf-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:context="http://www.springframework.org/schema/context" xsi:schemalocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd"> <!-- http://static.springframework.org/spring/docs/2.5.x/reference/xsd-config.html --> <!-- see spring in action pg 143 --> <bean id="applicationcontextholder" class="com.s1.core.webapplicationcontextholder" /> <bean id="datasource" class="org.springframework.jdbc.datasource.webspheredatasourceadapter"> <property name="targetdatasource"> <bean class="org.springframework.jndi.jndiobjectfactorybean"> <property name="jndiname" value="jdbc/epdatabase" /> </bean> </property> </bean> <bean id="entitymanagerfactory" class="org.springframework.orm.jpa.localcontainerentitymanagerfactorybean"> <property name="datasource" ref="datasource"/> <property name="persistenceunitname" value="bankingejbpersistenceunit"/> <property name="jpavendoradapter"> <bean class="org.springframework.orm.jpa.vendor.hibernatejpavendoradapter"> <property name="database" value="db2"/> <property name="showsql" value="false"/> </bean> </property> </bean> <bean id="transactionmanager" class="org.springframework.orm.jpa.jpatransactionmanager"> <property name="entitymanagerfactory" ref="entitymanagerfactory" /> </bean> <bean id="jndieptemplate" class="org.springframework.jndi.jnditemplate"> <property name="environment"> <props> <prop key="java.naming.factory.initial">com.ibm.websphere.naming.wsninitialcontextfactory</prop> <prop key="java.naming.provider.url">iiop://localhost:@boot_strap_port@</prop> </props> </property> </bean> <bean id="sequenceproxy" class="org.springframework.ejb.access.simpleremotestatelesssessionproxyfactorybean" scope="prototype"> <property name="jndiname" value="ejb/com/s1/arch/sequence/sequenceservicehome"/> <property name="businessinterface" value="com.s1.arch.persistence.sequence.sequenceservice"/> <property name="jnditemplate"> <ref local="jndieptemplate"/> </property> <property name="cachehome" value="false"/> <property name="lookuphomeonstartup" value="false"/> <property name="resourceref" value="false"/> <property name="homeinterface" value="com.s1.arch.persistence.sequence.sequenceservicehome"/> </bean> <bean id="transferactionitemdao" class="com.s1.core.dashboard.dao.transferactionitemdao" autowire="byname" /> <bean id="transfertemplateactionitemdao" class="com.s1.core.dashboard.dao.transfertemplateactionitemdao" autowire="byname" /> <bean id="achactionitemdao" class="com.s1.core.dashboard.dao.achactionitemdao" autowire="byname" /> <bean id="achtemplateactionitemdao" class="com.s1.core.dashboard.dao.achtemplateactionitemdao" autowire="byname" /> <bean id="wireactionitemdao" class="com.s1.core.dashboard.dao.wireactionitemdao" autowire="byname" /> <bean id="wiretemplateactionitemdao" class="com.s1.core.dashboard.dao.wiretemplateactionitemdao" autowire="byname" /> <bean id="pospayactionitemdao" class="com.s1.core.dashboard.dao.pospayactionitemdao" autowire="byname" /> <bean id="cdbalancesdao" class="com.s1.core.dashboard.dao.cdbalancesdao" autowire="byname" /> <bean id="bankirreportsdao" class="com.s1.core.dashboard.dao.bankirreportsdao" autowire="byname" /> <bean id="favoritedao" class="com.s1.core.dashboard.dao.favoritedao" autowire="byname" /> <bean id="statedao" class="com.s1.core.dashboard.dao.statedao" autowire="byname" /> <bean id="securemsgactionitemdao" class="com.s1.core.dashboard.dao.securemsgactionitemdao" /> <bean id="specialreportitemdao" class="com.s1.core.dashboard.dao.specialreportitemdao" autowire="byname" /> <bean id="alertsactionitemdao" class="com.s1.core.dashboard.dao.alertsactionitemdao" autowire="byname" /> <bean id="shortcutmenudao" class="com.s1.core.dashboard.dao.shortcutmenudao" autowire="byname" /> <bean id="useractionitemdao" class="com.s1.core.dashboard.dao.useractionitemdao" autowire="byname" /> <bean id="achauthactionitemdao" class="com.s1.core.dashboard.dao.achauthactionitemdao" autowire="byname" /> <bean id="corporatewirebannerdao" class="com.s1.pso.core.banner.dao.psocorporatewirebannerdao" autowire="byname" /> <bean id="wirebannerdao" class="com.s1.pso.core.banner.dao.psowirebannerdao" autowire="byname" /> <bean id="corporatetransferbannerdao" class="com.s1.pso.core.banner.dao.psocorporatetransferbannerdao" autowire="byname" /> <bean id="transferbannerdao" class="com.s1.pso.core.banner.dao.psotransferbannerdao" autowire="byname" /> <bean id="corporateachbannerdao" class="com.s1.pso.core.banner.dao.psocorporateachbannerdao" autowire="byname" /> <bean id="achbannerdao" class="com.s1.pso.core.banner.dao.psoachbannerdao" autowire="byname" /> <bean id="corporatepospaybannerdao" class="com.s1.pso.core.banner.dao.psocorporatepospaybannerdao" autowire="byname" /> <bean id="pospaybannerdao" class="com.s1.pso.core.banner.dao.psopospaybannerdao" autowire="byname" /> <bean id="issuesbannerdao" class="com.s1.pso.core.banner.dao.psoissuesbannerdao" autowire="byname" /> <bean id="stoppaybannerdao" class="com.s1.pso.core.banner.dao.psostoppaybannerdao" autowire="byname" /> <bean id="uploadbannerdao" class="com.s1.pso.core.banner.dao.psouploadbannerdao" autowire="byname" /> <bean id="corporateissuesbannerdao" class="com.s1.pso.core.banner.dao.psocorporateissuesbannerdao" autowire="byname" /> <bean id="corporatestoppaybannerdao" class="com.s1.pso.core.banner.dao.psocorporatestoppaybannerdao" autowire="byname" /> <bean id="corporateuploadbannerdao" class="com.s1.pso.core.banner.dao.psocorporateuploadbannerdao" autowire="byname" /> <tx:annotation-driven transaction-manager="transactionmanager" /> <context:annotation-config /> </beans>
persistence.xml
<persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0"> <persistence-unit name="bankingejbpersistenceunit" transaction-type="resource_local"> <!-- provider needs set if use several jpa providers <provider>org.hibernate.ejb.hibernatepersistence</provider> <provider>org.unitils.orm.jpa.util.provider.hibernate.unitilshibernatepersistenceprovider</provider> --> <provider>org.hibernate.ejb.hibernatepersistence</provider> <class>com.s1.core.dashboard.bean.achactionitem</class> <class>com.s1.core.dashboard.bean.alertsactionitem</class> <class>com.s1.core.dashboard.bean.bankirreports</class> <class>com.s1.core.dashboard.bean.banktransactionactionitem</class> <class>com.s1.core.dashboard.bean.cdbalancesentity</class> <class>com.s1.core.dashboard.bean.favoriteitem</class> <class>com.s1.core.dashboard.bean.pospayactionitem</class> <class>com.s1.core.dashboard.bean.securemsgactionitem</class> <class>com.s1.core.dashboard.bean.shortcutmenuentity</class> <class>com.s1.core.dashboard.bean.specialreportitem</class> <class>com.s1.core.dashboard.bean.stateitem</class> <class>com.s1.core.dashboard.bean.transferactionitem</class> <class>com.s1.core.dashboard.bean.wireactionitem</class> <properties> <!-- sql stdout logging --> <property name="hibernate.show_sql" value="false"/> <property name="hibernate.format_sql" value="true"/> <property name="use_sql_comments" value="true"/> <property name="hibernate.connection.release_mode" value="after_transaction"/> <property name="hibernate.c3p0.min_size" value="5"/> <property name="hibernate.c3p0.max_size" value="20"/> <property name="hibernate.c3p0.timeout" value="300"/> <property name="hibernate.c3p0.max_statements" value="50"/> <property name="hibernate.c3p0.idle_test_period" value="3000"/> <property name="hibernate.dialect" value="org.hibernate.dialect.db2dialect" /> <property name="hibernate.connection.datasource" value="jdbc/epdatabase" /> <property name="hibernate.connection.driver_class" value="com.ibm.db2.jcc.db2driver" /> </properties> </persistence-unit> <persistence-unit name="parserpersistenceunit" transaction-type="resource_local"> <provider>org.hibernate.ejb.hibernatepersistence</provider> <class>com.s1.core.parser.parsedpdstatement</class> <class>com.s1.core.parser.parsedpdstatementdetail</class> <class>com.s1.core.parser.parsedpdtransaction</class> <class>com.s1.core.parser.parsedpdtransactionmemo</class> <class>com.s1.core.parser.parsedcdstatement</class> <class>com.s1.core.parser.parsedcdstatementdetail</class> <class>com.s1.core.parser.parsedcdtransaction</class> <class>com.s1.core.parser.parsedcdtransactionmemo</class> <exclude-unlisted-classes>true</exclude-unlisted-classes> <properties> <property name="hibernate.show_sql" value="false" /> <property name="hibernate.format_sql" value="false" /> <property name="hibernate.dialect" value="org.hibernate.dialect.db2dialect" /> <!--<property name="hibernate.hbm2ddl.auto" value="update" /> --> <!-- enable pooling of connections efficiency. can disabled in development --> <property name="hibernate.c3p0.min_size" value="5" /> <property name="hibernate.c3p0.max_size" value="20" /> <property name="hibernate.c3p0.timeout" value="300" /> <property name="hibernate.c3p0.max_statements" value="50" /> <property name="hibernate.c3p0.idle_test_period" value="3000" /> <property name="hibernate.connection.datasource" value="jdbc/epdatabase" /> <property name="hibernate.connection.driver_class" value="com.ibm.db2.jcc.db2driver" /> </properties> </persistence-unit> </persistence>
listener configuration in web.xml
<listener> <listener-class> org.springframework.web.context.contextloaderlistener </listener-class> </listener>
Comments
Post a Comment