Announcement Announcement Module
Collapse
No announcement yet.
BeanFactory not initialized or already closed - call 'refresh' before accessing beans Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • BeanFactory not initialized or already closed - call 'refresh' before accessing beans

    I'm trying to add spring security to a regular JSF application. After repeated tries and I'm failing with the following error on tomcat bring-up.

    Here is the entire stack trace. Any help is appreciated.

    SEVERE: Exception sending context destroyed event to listener instance of class org.springframework.web.context.ContextLoaderListe ner
    java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext
    at org.springframework.context.support.AbstractRefres hableApplicationContext.getBeanFactory(AbstractRef reshableApplicationContext.java:171)
    at org.springframework.context.support.AbstractApplic ationContext.destroyBeans(AbstractApplicationConte xt.java:1048)
    at org.springframework.context.support.AbstractApplic ationContext.doClose(AbstractApplicationContext.ja va:1022)
    at org.springframework.context.support.AbstractApplic ationContext.close(AbstractApplicationContext.java :970)
    at org.springframework.web.context.ContextLoader.clos eWebApplicationContext(ContextLoader.java:556)
    at org.springframework.web.context.ContextLoaderListe ner.contextDestroyed(ContextLoaderListener.java:14 2)
    at org.apache.catalina.core.StandardContext.listenerS top(StandardContext.java:4245)
    at org.apache.catalina.core.StandardContext.stop(Stan dardContext.java:4886)
    at org.apache.catalina.core.StandardContext.start(Sta ndardContext.java:4750)
    at org.apache.catalina.manager.ManagerServlet.start(M anagerServlet.java:1276)
    at org.apache.catalina.manager.HTMLManagerServlet.sta rt(HTMLManagerServlet.java:625)
    at org.apache.catalina.manager.HTMLManagerServlet.doG et(HTMLManagerServlet.java:136)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:617)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:717)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)
    at org.apache.catalina.filters.CsrfPreventionFilter.d oFilter(CsrfPreventionFilter.java:186)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:191)
    at org.apache.catalina.authenticator.AuthenticatorBas e.invoke(AuthenticatorBase.java:563)
    at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:293)
    at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:859)
    at org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.process(Http11Protocol.java:602)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run( JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:662)


    my web.xml is

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
    	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
    	
    	<context-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>
                /WEB-INF/applicationContext.xml
                /WEB-INF/applicationContext-security.xml
            </param-value>
        </context-param>
        <context-param>
            <param-name>javax.faces.PROJECT_STAGE</param-name>
            <param-value>Development</param-value>
        </context-param>
    	<context-param>
    		<param-name>javax.faces.VALIDATE_EMPTY_FIELDS</param-name>
    		<param-value>false</param-value>
    	</context-param>
    	<context-param>
    		<param-name>javax.faces.FACELETS_SKIP_COMMENTS</param-name>
    		<param-value>true</param-value>
    	</context-param>
    	
    	<context-param>
            <param-name>com.icesoft.faces.debugDOMUpdate</param-name>
            <param-value>false</param-value>
        </context-param>
    	
    	<context-param>
            <param-name>com.icesoft.faces.concurrentDOMViews</param-name>
            <param-value>true</param-value>
        </context-param>
        
        <context-param>
            <param-name>com.icesoft.faces.synchronousUpdate</param-name>
            <param-value>true</param-value>
        </context-param>
    	  
    	<!-- Faces Servlet -->  
    	<servlet>
    		<servlet-name>Faces Servlet</servlet-name>
    		<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    		<!-- <load-on-startup>1</load-on-startup> -->
    	</servlet>
    	
    	<servlet>
    	    <servlet-name>Resource Servlet</servlet-name>
    	    <servlet-class>com.icesoft.faces.webapp.CompatResourceServlet</servlet-class>
    	    <load-on-startup>1</load-on-startup>
    	</servlet>
    	<!-- Extension Mapping -->
    	<servlet-mapping>
    		<servlet-name>Faces Servlet</servlet-name>
    		<url-pattern>/faces/*</url-pattern>
    		<url-pattern>*.jsf</url-pattern>
    	</servlet-mapping>
    	<servlet-mapping>
            <servlet-name>Faces Servlet</servlet-name>
            <url-pattern>/icefaces/*</url-pattern>
        </servlet-mapping>
        <session-config>
    		<session-timeout>90</session-timeout>
    	</session-config>
    	
    	
    	<servlet-mapping>
    	  <servlet-name>Resource Servlet</servlet-name>
    	  <url-pattern>/xmlhttp/*</url-pattern>
    	  <url-pattern>/resources/*</url-pattern>
    	</servlet-mapping>
    	
    	 <filter>
            <filter-name>springSecurityFilterChain</filter-name>
            <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
        </filter>
    
        <filter-mapping>
            <filter-name>springSecurityFilterChain</filter-name>
            <url-pattern>/*</url-pattern>
        </filter-mapping>
    
        <listener>
            <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
        </listener>
        <listener>
            <listener-class>org.springframework.security.web.session.HttpSessionEventPublisher</listener-class>
        </listener>
    	
    	
    	<welcome-file-list>
    		<!-- <welcome-file>faces/greeting.xhtml</welcome-file> -->
    		<welcome-file>index.html</welcome-file>
    		<!-- <welcome-file>faces/test.xhtml</welcome-file> -->
    	</welcome-file-list>
    </web-app>

    And my applicationContext-security.xml is

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans:beans xmlns="http://www.springframework.org/schema/security"
                 xmlns:beans="http://www.springframework.org/schema/beans"
                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                 xsi:schemaLocation="http://www.springframework.org/schema/beans
               http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
               http://www.springframework.org/schema/security
               http://www.springframework.org/schema/security/spring-security-3.0.xsd">
    
        <!--  key configuration here is an entry point to be used by security intercepts -->
        <http realm="Sample Realm" entry-point-ref="authenticationEntryPoint" auto-config="false">
    
            <custom-filter ref="sessionManagementFilter" before="SESSION_MANAGEMENT_FILTER" />
            <!-- any role that is used to protect a directory, can be multiples -->
            <intercept-url pattern='/secure/**' access='ROLE_READER' />
    
            <!-- enable form login to use UsernamePasswordAuthenticationFilter [/j_spring_security_check] -->
            <form-login login-page="/general/logins/htmlLogin.faces"  
                        authentication-failure-url="/general/logins/loginFailed.jsf"/>
    
            <!-- logout page uses the default LogoutFilter, no changes are needed as IT accepts a GET call... -->
            <!-- here is an example logout link:
                    <a href="#{request.contextPath}/j_spring_security_logout">Logout</a> -->
            <logout logout-url="/j_spring_security_logout"
                    logout-success-url="/general/main.jsf"
                    invalidate-session="true"/>
        </http>
    
        <beans:bean id="authenticationEntryPoint"
            class="org.springframework.security.web.authentication.LoginUrlAuthenticationEntryPoint">
            <beans:property name="loginFormUrl" value="/general/logins/login.jsf" />
        </beans:bean>
    
        <!-- test with this before you hook up your LDAP or other Authentication Manager -->
        <authentication-manager alias="authenticationManager">
            <authentication-provider>
                <user-service>
                    <user name="[email protected]" password="pass1234" authorities="ROLE_READER"/>
                    <user name="[email protected]" password="pass5678" authorities="ROLE_READER"/>
                </user-service>
            </authentication-provider>
        </authentication-manager>
    
        <beans:bean id="sessionManagementFilter" class="org.springframework.security.web.session.SessionManagementFilter">
            <beans:constructor-arg name="securityContextRepository" ref="httpSessionSecurityContextRepository" />
            <beans:property name="invalidSessionUrl" value="/general/logins/sessionExpired.jsf" />
            <!-- this permits redirection to session timeout page from javascript/ajax or http -->
            <beans:property name="redirectStrategy" ref="jsfRedirectStrategy" />
        </beans:bean>
    
        <beans:bean id="jsfRedirectStrategy" class="com.palm.safe.spring.security.JsfRedirectStrategy"/>
        <beans:bean id="httpSessionSecurityContextRepository" class="org.springframework.security.web.context.HttpSessionSecurityContextRepository"/>
    
    </beans:beans>

  • #2
    This usually means there was another error. Look in the logs for any other errors which will clue you in to why the application is not starting up.

    Comment


    • #3
      Originally posted by Rob Winch View Post
      This usually means there was another error. Look in the logs for any other errors which will clue you in to why the application is not starting up.
      Thanks, it turns out I only get the error use 3.1.1.RELEASE version of the spring framework jars, and works just fine with 3.0.5.RELEASE and I'm pretty sure it got something with jar conflict probably from other jersey-spring dependency I have in my pom(inspite of excluding spring, spring-core, spring-web, spring-beans, spring-context etc). I can live with 3.0.5.RELEASE for now, I'll first sort out my LDAP issues first before upgrading SPRING jars.

      Anyway, seeing as what you signature is what it is, it brings me to another question I thought i might as well ask. I'm a newbie with using LDAP and spring security and now that I've incorporated basic login authentication using the settings in appContext-security.xml, I'm still struggling the with exact configuration details add the basic LDAP authentication. I have my LDAP server, port, domainName etc that I plan to use. However I'm confused with all the configuration, the BindAuthentication, whether or not to use ActiveDirectory

      With all that, I was wondering if you giving me some pointed changes to make to my appContext-security to add the right kind of tags to support a simple LDAP authentication.

      Comment


      • #4
        Your best bet is to look at the LDAP sample application http://static.springsource.org/sprin...mple-apps.html

        Comment


        • #5
          i am getting the similar problem while i am using maven spring 4 ,hibernate 4.2.7,when i start my tomcat get error as follows :


          org.springframework.beans.factory.xml.XmlBeanDefin itionStoreException: Line 10 in XML document from ServletContext resource [/WEB-INF/gff-servlet.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 10; columnNumber: 124; cvc-elt.1: Cannot find the declaration of element 'beans'.
          at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.doLoadBeanDefinitions(XmlBeanDefinitio nReader.java:398)
          at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR eader.java:335)
          at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR eader.java:303)
          at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:180)
          at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:216)
          at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:187)
          at org.springframework.web.context.support.XmlWebAppl icationContext.loadBeanDefinitions(XmlWebApplicati onContext.java:125)
          at org.springframework.web.context.support.XmlWebAppl icationContext.loadBeanDefinitions(XmlWebApplicati onContext.java:94)
          at org.springframework.context.support.AbstractRefres hableApplicationContext.refreshBeanFactory(Abstrac tRefreshableApplicationContext.java:129)
          at org.springframework.context.support.AbstractApplic ationContext.obtainFreshBeanFactory(AbstractApplic ationContext.java:540)
          at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:454)
          at org.springframework.web.context.ContextLoader.conf igureAndRefreshWebApplicationContext(ContextLoader .java:381)
          at org.springframework.web.context.ContextLoader.init WebApplicationContext(ContextLoader.java:293)
          at org.springframework.web.context.ContextLoaderListe ner.contextInitialized(ContextLoaderListener.java: 106)
          at org.apache.catalina.core.StandardContext.listenerS tart(StandardContext.java:4734)
          at org.apache.catalina.core.StandardContext.startInte rnal(StandardContext.java:5154)
          at org.apache.catalina.util.LifecycleBase.start(Lifec ycleBase.java:150)
          at org.apache.catalina.core.ContainerBase.addChildInt ernal(ContainerBase.java:726)
          at org.apache.catalina.core.ContainerBase.addChild(Co ntainerBase.java:702)
          at org.apache.catalina.core.StandardHost.addChild(Sta ndardHost.java:697)
          at org.apache.catalina.startup.HostConfig.deployWAR(H ostConfig.java:976)
          at org.apache.catalina.startup.HostConfig$DeployWar.r un(HostConfig.java:1762)
          at java.util.concurrent.Executors$RunnableAdapter.cal l(Executors.java:471)
          at java.util.concurrent.FutureTask.run(FutureTask.jav a:262)
          at java.util.concurrent.ThreadPoolExecutor.runWorker( ThreadPoolExecutor.java:1145)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:615)
          at java.lang.Thread.run(Thread.java:744)
          Caused by: org.xml.sax.SAXParseException; lineNumber: 10; columnNumber: 124; cvc-elt.1: Cannot find the declaration of element 'beans'.
          at com.sun.org.apache.xerces.internal.util.ErrorHandl erWrapper.createSAXParseException(ErrorHandlerWrap per.java:198)
          at com.sun.org.apache.xerces.internal.util.ErrorHandl erWrapper.error(ErrorHandlerWrapper.java:134)
          at com.sun.org.apache.xerces.internal.impl.XMLErrorRe porter.reportError(XMLErrorReporter.java:437)
          at com.sun.org.apache.xerces.internal.impl.XMLErrorRe porter.reportError(XMLErrorReporter.java:368)
          at com.sun.org.apache.xerces.internal.impl.XMLErrorRe porter.reportError(XMLErrorReporter.java:325)
          at com.sun.org.apache.xerces.internal.impl.xs.XMLSche maValidator.handleStartElement(XMLSchemaValidator. java:1906)
          at com.sun.org.apache.xerces.internal.impl.xs.XMLSche maValidator.startElement(XMLSchemaValidator.java:7 46)
          at com.sun.org.apache.xerces.internal.impl.XMLNSDocum entScannerImpl.scanStartElement(XMLNSDocumentScann erImpl.java:378)
          at com.sun.org.apache.xerces.internal.impl.XMLNSDocum entScannerImpl$NSContentDriver.scanRootElementHook (XMLNSDocumentScannerImpl.java:604)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumen tFragmentScannerImpl$FragmentContentDriver.next(XM LDocumentFragmentScannerImpl.java:3122)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumen tScannerImpl$PrologDriver.next(XMLDocumentScannerI mpl.java:880)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumen tScannerImpl.next(XMLDocumentScannerImpl.java:606)
          at com.sun.org.apache.xerces.internal.impl.XMLNSDocum entScannerImpl.next(XMLNSDocumentScannerImpl.java: 117)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumen tFragmentScannerImpl.scanDocument(XMLDocumentFragm entScannerImpl.java:510)
          at com.sun.org.apache.xerces.internal.parsers.XML11Co nfiguration.parse(XML11Configuration.java:848)
          at com.sun.org.apache.xerces.internal.parsers.XML11Co nfiguration.parse(XML11Configuration.java:777)
          at com.sun.org.apache.xerces.internal.parsers.XMLPars er.parse(XMLParser.java:141)
          at com.sun.org.apache.xerces.internal.parsers.DOMPars er.parse(DOMParser.java:243)
          at com.sun.org.apache.xerces.internal.jaxp.DocumentBu ilderImpl.parse(DocumentBuilderImpl.java:347)
          at org.springframework.beans.factory.xml.DefaultDocum entLoader.loadDocument(DefaultDocumentLoader.java: 76)
          at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.doLoadDocument(XmlBeanDefinitionReader .java:428)
          at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.doLoadBeanDefinitions(XmlBeanDefinitio nReader.java:390)
          ... 26 more

          12-Feb-2014 15:30:35.658 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log Closing Spring root WebApplicationContext
          12-Feb-2014 15:30:35.772 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.listenerS top Exception sending context destroyed event to listener instance of class org.springframework.web.context.ContextLoaderListe ner
          java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext
          at org.springframework.context.support.AbstractRefres hableApplicationContext.getBeanFactory(AbstractRef reshableApplicationContext.java:170)
          at org.springframework.context.support.AbstractApplic ationContext.destroyBeans(AbstractApplicationConte xt.java:921)
          at org.springframework.context.support.AbstractApplic ationContext.doClose(AbstractApplicationContext.ja va:895)
          at org.springframework.context.support.AbstractApplic ationContext.close(AbstractApplicationContext.java :841)
          at org.springframework.web.context.ContextLoader.clos eWebApplicationContext(ContextLoader.java:551)
          at org.springframework.web.context.ContextLoaderListe ner.contextDestroyed(ContextLoaderListener.java:11 5)
          at org.apache.catalina.core.StandardContext.listenerS top(StandardContext.java:4775)
          at org.apache.catalina.core.StandardContext.stopInter nal(StandardContext.java:5368)
          at org.apache.catalina.util.LifecycleBase.stop(Lifecy cleBase.java:232)
          at org.apache.catalina.util.LifecycleBase.start(Lifec ycleBase.java:160)
          at org.apache.catalina.core.ContainerBase.addChildInt ernal(ContainerBase.java:726)
          at org.apache.catalina.core.ContainerBase.addChild(Co ntainerBase.java:702)
          at org.apache.catalina.core.StandardHost.addChild(Sta ndardHost.java:697)
          at org.apache.catalina.startup.HostConfig.deployWAR(H ostConfig.java:976)
          at org.apache.catalina.startup.HostConfig$DeployWar.r un(HostConfig.java:1762)
          at java.util.concurrent.Executors$RunnableAdapter.cal l(Executors.java:471)
          at java.util.concurrent.FutureTask.run(FutureTask.jav a:262)
          at java.util.concurrent.ThreadPoolExecutor.runWorker( ThreadPoolExecutor.java:1145)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:615)
          at java.lang.Thread.run(Thread.java:744)

          12-Feb-2014 15:30:38.104 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized()
          12-Feb-2014 15:30:38.104 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextInitialized()




          and my web.xml entry


          <context-param>
          <param-name>contextConfigLocation</param-name>
          <param-value>/WEB-INF/gff-servlet.xml</param-value>
          </context-param>

          <listener>
          <listener-class>org.springframework.web.context.ContextLoade rListener</listener-class>
          </listener>



          while gff-servlet file is :

          Code:
          <?xml version="1.0" encoding="UTF-8"?>
          <beans xmlns="http://www.springframework.org/schema/beans"
              xmlns:context="http://www.springframework.org/schema/context"
              xmlns:mvc="http://www.springframework.org/schema/mvc" 
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xmlns:tx="http://www.springframework.org/schema/tx"
              xsi:schemaLocation="http://www.springframework.org/schema/beans     http://www.springframework.org/schema/beans/spring-beans-4.0.0.xsd
                                  http://www.springframework.org/schema/context   http://www.springframework.org/schema/context/spring-context-4.0.0.xsd
                                  http://www.springframework.org/schema/mvc       http://www.springframework.org/schema/mvc/spring-mvc-4.0.0.xsd
                                  http://www.springframework.org/schema/tx        http://www.springframework.org/schema/tx/spring-tx-4.0.0.xsd">
          
          
              
              <context:component-scan base-package="com.gff" />
              
              <mvc:annotation-driven />
              
              <tx:annotation-driven />
          
              <bean id="viewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver">
                  <property name="viewClass">
                      <value>
                          org.springframework.web.servlet.view.tiles3.TilesView
                      </value>
                  </property>
              </bean>
              
              <bean id="tilesConfigurer" class="org.springframework.web.servlet.view.tiles3.TilesConfigurer">
                  <property name="definitions">
                      <list>
                          <value>/WEB-INF/tiles-def.xml</value>
                      </list>
                  </property>
              </bean>
              
              <bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
                  <property name="basename" value="classpath:messages"></property>
              </bean>
              
              <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
                  <property name="location" value="/WEB-INF/jdbc.properties" />
              </bean>
              
              <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
                  <property name="driverClassName" value="${jdbc.driverClassName}" />
                  <property name="url" value="${jdbc.databaseurl}"  />
                  <property name="username" value="${jdbc.username}" />
                  <property name="password" value="${jdbc.password}" />
              </bean>
              
              <bean id="sessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
                  <property name="dataSource" ref="dataSource" />
                  <property name="configLocation">
                      <value>classpath:hibernate.cfg.xml</value>
                  </property>
                  <property name="configurationClass">
                      <value>org.hibernate.cfg.AnnotationConfiguration</value>
                  </property>
                  <property name="hibernateProperties">
                      <props>
                          <prop key="hibernate.dialect">${jdbc.dialect}</prop>
                          <prop key="hibernate.show_sql">true</prop>
                      </props>
                  </property>
              </bean>
                
              <bean id="transactionManager" class="org.springframework.orm.hibernate4.HibernateTransactionManager">
                  <property name="sessionFactory" ref="sessionFactory" />
              </bean>
              
          </beans>

          Comment

          Working...
          X