Announcement Announcement Module
Collapse
No announcement yet.
CannotCreateTransactionException Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • CannotCreateTransactionException

    Hello All,
    I am trying to save object and I am seeing these exceptions

    Code:
    org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is java.lang.NullPointerException: null
    java.lang.NullPointerException
    	at org.springframework.orm.hibernate3.HibernateTransactionManager.doBegin(HibernateTransactionManager.java:465)
    	at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:282)
    	at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:225)
    	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:89)
    	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
    	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
    	at $Proxy1.saveOperation(Unknown Source)
    	at com.my.com.ws.MyWebService.someOperation(MyWebService.java:138)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    	at java.lang.reflect.Method.invoke(Method.java:585)
    The spring configuration file is as follows. I am trying to use txProxyTemplate for the service layer.

    Code:
    	<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close">
    		<property name="driverClass" value="oracle.jdbc.driver.OracleDriver"/>
    		<property name="jdbcUrl" value="jjdbc:oracle:thin:@localhost:1521:MY"/>
    		<property name="user" value="User"/>
    		<property name="password" value="Pass"/>
    		<property name="minPoolSize" value="15"/>
    		<property name="maxPoolSize" value="200"/>
    		<property name="maxStatements" value="100"/>
    		<property name="checkoutTimeout" value="3000"/>
    		<property name="idleConnectionTestPeriod" value="60"/>
    	</bean>
    	
    	<bean id="nativeJdbcExtractor" class="org.springframework.jdbc.support.nativejdbc.SimpleNativeJdbcExtractor"/>
    	      <bean id="oracleLobHandler" class="org.springframework.jdbc.support.lob.OracleLobHandler">
    	          <property name="nativeJdbcExtractor">
    	              <ref local="nativeJdbcExtractor"/>
    	          </property>
    	      </bean>
    	
    	    <!-- Hibernate SessionFactory -->
    	    <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
    	        <property name="lobHandler">
    	            <ref bean="oracleLobHandler"/>
    	        </property>
    	        <property name="dataSource"><ref local="dataSource"/></property>
    	       <property name="mappingDirectoryLocations">
    	            <list><value>/WEB-INF/classes</value></list>
    	        </property>
    	
    	        <property name="hibernateProperties">
    	        <props>
    	            <prop key="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</prop>
    	            <prop key="hibernate.max_fetch_depth">3</prop>
    	            <prop key="hibernate.show_sql">true</prop>
    	            <prop key="hibernate.jdbc.use_scrollable_resultset">false</prop>
    	            <prop key="hibernate.connection.release_mode">auto</prop>
    	        </props>
    	        </property>
    	    </bean>
    	
    	    <!-- Transaction manager for a single Hibernate SessionFactory (alternative to JTA) -->
    	    <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
    	        <property name="sessionFactory"><ref local="sessionFactory"/></property>
    	    </bean>
    	
    	   
    	    <bean id="txProxyTemplate" abstract="true" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
    	        <property name="transactionManager"><ref local="transactionManager"/></property>
    	        <property name="transactionAttributes">
    	            <props>
    	                <prop key="save*">PROPAGATION_REQUIRED</prop>
    	                <prop key="delete*">PROPAGATION_REQUIRED</prop>
    	                <prop key="remove*">PROPAGATION_REQUIRED</prop>
    	                <prop key="*">PROPAGATION_SUPPORTS</prop>
    	            </props>
    	        </property>
        	</bean>
        	
        	<bean id="ServiceDAO" class="com.my.commerce.dao.ServiceHibernateDAOImpl">
    	        <property name="sessionFactory"><ref bean="sessionFactory"/></property>
    	        <property name="dao"><ref bean="iDAO"/></property>
    	        <property name="ssDao"><ref bean="ssDao"/></property>
    	        <property name="mServiceDao"><ref bean="mService"/></property>
    	    </bean>
    	    
    	    <bean id="serviceTarget" class="com.my.services.ServiceImpl">
    	    	  <property name="serviceDAO"><ref local="ServiceDAO"/></property>
    	    </bean>
    	    
    	    <bean id="myService"  parent="txProxyTemplate">
    	        <property name="target"><ref local="serviceTarget"/></property>
        	</bean>
    I try to get the instance of mySevice in code as follows
    Code:
    	MyService service = BeanConfigFactory.getBean("myService");
    	service.saveOperation(); //this is where it fails.
    I am using Tomcat 5.5 with spring and hibernate. Any other save operation from dao which does not uses txProxyTemplate works fine, Any idea whats going wrong here.

    -- springnewbie
    Last edited by springnewbie; Dec 28th, 2008, 10:45 AM.

  • #2
    Try to remove <prop key="hibernate.connection.release_mode">auto</prop> from the hibernate config.

    Comment


    • #3
      Remove hibernate.connection.release_mode from confg still the same error

      Comment


      • #4
        Hmm... Which version of Spring is that? And please post the whole stacktrace.

        Comment


        • #5
          Spring version is 1.2.6
          Hibernate 3.0.5

          Code:
          org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is java.lang.NullPointerException: null
          java.lang.NullPointerException
          	at org.springframework.orm.hibernate3.HibernateTransactionManager.doBegin(HibernateTransactionManager.java:465)
          	at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:282)
          	at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:225)
          	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:89)
          	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
          	at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:643)
          	at com.my.services.ServiceImpl$$EnhancerByCGLIB$$ae789704_2.saveOperation(<generated>)
          	at com.my.ws.MyWebServiceImpl.createObj(Unknown Source)
          	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          	at java.lang.reflect.Method.invoke(Method.java:585)
          	at com.sun.xml.ws.api.server.InstanceResolver$1.invoke(InstanceResolver.java:246)
          	at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:146)
          	at com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:257)
          	at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:93)
          	at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
          	at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
          	at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
          	at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
          	at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:243)
          	at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:444)
          	at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)
          	at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135)
          	at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doGet(WSServletDelegate.java:129)
          	at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doPost(WSServletDelegate.java:160)
          	at com.sun.xml.ws.transport.http.servlet.WSServlet.doPost(WSServlet.java:75)
          	at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
          	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
          	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
          	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
          	at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
          	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
          	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
          	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
          	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
          	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
          	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
          	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
          	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
          	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
          	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
          	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
          	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
          	at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
          	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
          	at java.lang.Thread.run(Thread.java:595)

          Comment


          • #6
            Versions are far too old, it will be very hard to diagnose/fix this. Can you migrate to a newer Spring and Hibernate version?

            Comment


            • #7
              I have to change it and see

              Comment


              • #8
                Still the same exception. no difference.

                I am now using spring 2.5.x and Hibernate 3.3 though I didnot change any of the spring config files. I hope that should not make any difference

                Comment


                • #9
                  And how your saveOperation() is implemented?

                  BTW, as far as I understand you are using not ApplicationContext but BeanFactory, which is not recommended, see chapters 3.1 and 3.8.1 is Spring Reference.

                  Originally posted by springnewbie View Post
                  Still the same exception. no difference.

                  I am now using spring 2.5.x and Hibernate 3.3 though I didnot change any of the spring config files. I hope that should not make any difference

                  Comment


                  • #10
                    saveOperation() is inside a service layer. In this method we try to save all our entities.

                    I will look at the spring reference and will try to implement ApplicationContext.

                    Comment


                    • #11
                      May you post following -
                      • your web.xml
                      • error stack with current version of spring along with exact Spring version number (not 2.5.x, but 2.5.5, 2.5.6 or whatever you are using).
                      • complete context.xml that causes problem

                      If they are to big you may zip them together and post resulting zip as attachment.
                      Originally posted by springnewbie View Post
                      saveOperation() is inside a service layer. In this method we try to save all our entities.

                      I will look at the spring reference and will try to implement ApplicationContext.

                      Comment


                      • #12
                        Spring version 2.5.5.
                        Hibernate 3.3

                        web.xml
                        Code:
                        <?xml version="1.0" encoding="UTF-8"?>
                        <web-app 
                            xmlns="http://java.sun.com/xml/ns/javaee" 
                            version="2.5" 
                            xmlns:xsi="http://www.w3.org/2001/XMLSchema" 
                            xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
                            
                        	<display-name>MyService</display-name>
                        	<context-param>
                            <param-name>contextConfigLocation</param-name>
                            <param-value>
                            /WEB-INF/applicationContext-*.xml 
                                    classpath*:META-INF/applicationContext-*.xml
                            </param-value>
                          </context-param>
                          
                          <context-param>
                        		<param-name>log4jConfigLocation</param-name>
                        		<param-value>/WEB-INF/log4j.xml</param-value>
                        	</context-param>
                        	
                          <listener>
                        		<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
                        	</listener>
                          
                            <listener>
                            <listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class>
                          </listener>
                          
                          <listener>
                        		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
                        	</listener>
                        
                        	<listener>
                          	<listener-class>com.sun.xml.ws.transport.http.servlet.WSServletContextListener</listener-class>
                          </listener>  
                        
                           
                          <filter>
                           	 <filter-name>hibernateFilter</filter-name>
                            <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
                          </filter>
                          
                          <filter-mapping>
                            <filter-name>hibernateFilter</filter-name>
                            <url-pattern>/*</url-pattern>
                          </filter-mapping>
                          
                          <servlet>
                        	  <servlet-name>context</servlet-name>
                        	  <servlet-class>org.springframework.web.context.ContextLoaderServlet</servlet-class>
                        	<load-on-startup>1</load-on-startup>
                        </servlet>
                          
                        
                            <servlet>
                                <display-name>MyService</display-name>
                                <servlet-name>MyService</servlet-name>
                                <servlet-class>com.sun.xml.ws.transport.http.servlet.WSServlet</servlet-class>
                            </servlet>
                            <servlet>
                            <servlet-name>spring</servlet-name>
                            <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
                            <load-on-startup>2</load-on-startup>
                          </servlet>
                            <servlet-mapping>
                                <servlet-name>PMService</servlet-name>
                                <url-pattern>/pm</url-pattern>
                            </servlet-mapping>
                             
                          <servlet-mapping>
                            <servlet-name>spring</servlet-name>
                            <url-pattern>/*</url-pattern>
                          </servlet-mapping>
                            
                            <session-config>
                                <session-timeout>30</session-timeout>
                            </session-config>   
                            	
                        	
                        </web-app>
                        Context.xml file
                        Code:
                        <?xml version="1.0" encoding="UTF-8"?>
                        <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
                        
                        <beans>
                            <bean id="ServiceDAO" class="com.my.commerce.dao.ServiceHibernateDAOImpl">
                                <property name="sessionFactory"><ref bean="sessionFactory"/></property>
                                <property name="dao"><ref bean="idsDAO"/></property>
                                <property name="siteServiceDao"><ref bean="siteServiceDao"/></property>
                                <property name="mServiceDao"><ref bean="mService"/></property>
                            </bean>
                            
                        
                             <bean id="myService" parent="txProxyTemplate">
                                <property name="target">
                                    <bean class="com.my.services.MyServiceImpl">
                                      <property name="serviceDAO"><ref local="ServiceDAO"/></property>
                                    </bean>
                                </property>
                            </bean>
                            
                        </beans>

                        Comment


                        • #13
                          common.xml

                          Code:
                          <?xml version="1.0" encoding="UTF-8"?>
                          <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
                          
                          <beans>
                          
                              <!-- JND DataSource for J2EE environments -->
                             	  <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close">
                          		<property name="driverClass" value="oracle.jdbc.driver.OracleDriver"/>
                          		<property name="jdbcUrl" value="jdbc:oracle:thin:@lost:1521:sid"/>
                          		<property name="user" value="USER"/>
                          		<property name="password" value="PASS"/>
                          		<property name="minPoolSize" value="15"/>
                          		<property name="maxPoolSize" value="200"/>
                          		<property name="maxStatements" value="100"/>
                          		<property name="checkoutTimeout" value="3000"/>
                          		<property name="idleConnectionTestPeriod" value="60"/>
                          	</bean>
                             
                            
                              <!-- nativeJdbcExatractor and oracleLobHandler are needed for Lob support (Clob, Blob) -->
                              <bean id="nativeJdbcExtractor" class="org.springframework.jdbc.support.nativejdbc.SimpleNativeJdbcExtractor"/>
                          
                                <bean id="oracleLobHandler" class="org.springframework.jdbc.support.lob.OracleLobHandler">
                                    <property name="nativeJdbcExtractor">
                                        <ref local="nativeJdbcExtractor"/>
                                    </property>
                                </bean>
                          
                              <!-- Hibernate SessionFactory -->
                              <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
                                  <property name="lobHandler">
                                      <ref bean="oracleLobHandler"/>
                                  </property>
                                  <property name="dataSource"><ref local="dataSource"/></property>
                                 <property name="mappingDirectoryLocations">
                                      <list><value>/WEB-INF/classes</value></list>
                                  </property>
                          
                                  <property name="hibernateProperties">
                                  <props>
                                      <prop key="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</prop>
                                      <prop key="hibernate.max_fetch_depth">3</prop>
                                      <prop key="hibernate.show_sql">true</prop>
                                      <prop key="hibernate.jdbc.use_scrollable_resultset">false</prop>
                                      <prop key="hibernate.connection.release_mode">auto</prop>
                                  </props>
                                  </property>
                              </bean>
                          
                              <!-- Transaction manager for a single Hibernate SessionFactory (alternative to JTA) -->
                              <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
                                  <property name="sessionFactory"><ref local="sessionFactory"/></property>
                              </bean>
                          
                              <bean id="txProxyTemplate" abstract="true" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
                                  <property name="transactionManager"><ref local="transactionManager"/></property>
                                  <property name="proxyTargetClass"><value>true</value></property> 
                                  <property name="transactionAttributes">
                                      <props>
                                          <prop key="save*">PROPAGATION_REQUIRED</prop>
                                          <prop key="delete*">PROPAGATION_REQUIRED</prop>
                                          <prop key="remove*">PROPAGATION_REQUIRED</prop>
                                          <prop key="*">PROPAGATION_SUPPORTS</prop>
                                      </props>
                                  </property>
                              </bean>
                              
                              <!-- bean locator service -->
                              <bean id="beanConfigFactory" class="com.my.common.BeanConfigFactory" factory-method="getInstance">
                              </bean>
                                      
                              <!-- File Upload Resolver -->
                              <bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
                                  <property name="maxUploadSize"><value>681574400</value></property>
                              </bean>
                              
                              <!-- View Resolver for JSPs -->
                              <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
                                  <property name="requestContextAttribute"><value>rc</value></property>
                                  <property name="viewClass"><value>org.springframework.web.servlet.view.JstlView</value></property>
                                  <property name="prefix"><value></value></property>
                                  <property name="suffix"><value>.jsp</value></property>
                              </bean>
                          
                          </beans>
                          Error log
                          Code:
                          DEBUG - transaction completed on session with on_close connection release mode; be sure to close the session to release JDBC resources!
                          INFO - successfully passed the generate productmovement
                          ERROR - Error creating/updating product movement:- 
                          java.lang.NullPointerException
                          	at com.my.ws.MyWebServiceImpl.createOrUpdate(Unknown Source)
                          	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                          	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                          	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                          	at java.lang.reflect.Method.invoke(Method.java:585)
                          	at com.sun.xml.ws.api.server.InstanceResolver$1.invoke(InstanceResolver.java:246)
                          	at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:146)
                          	at com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:257)
                          	at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:93)
                          	at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
                          	at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
                          	at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
                          	at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
                          	at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:243)
                          	at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:444)
                          	at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)
                          	at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135)
                          	at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doGet(WSServletDelegate.java:129)
                          	at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doPost(WSServletDelegate.java:160)
                          	at com.sun.xml.ws.transport.http.servlet.WSServlet.doPost(WSServlet.java:75)
                          	at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
                          	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
                          	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
                          	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
                          	at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
                          	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
                          	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
                          	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
                          	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
                          	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
                          	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
                          	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
                          	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
                          	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
                          	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
                          	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
                          	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
                          	at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
                          	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
                          	at java.lang.Thread.run(Thread.java:595)

                          Comment


                          • #14
                            Sorry, but I do not understand how your context is created -
                            in your web.xml you define context loader listener that should pick up all files with name pattern applicationContext-*.xml from your classpath and WEB-INF, but you have not posted any file with suitable name. How you common.xml and context.xml participate in context creation is covered with dark.

                            As well I do not understand what for do you need bean service locator, why you beans can not be simply injected into their consumers?

                            Regards,
                            Oleksandr

                            Comment


                            • #15
                              common.xml and context.xml are named as applicationContext-common.xml
                              and applicationContext-context.xml.

                              The reason I am using Beanfactory is the consumer is web service which interacts with different spring based service.

                              Comment

                              Working...
                              X