Announcement Announcement Module
Collapse
No announcement yet.
pass location value to PropertyPlaceholderConfigurer thought context-param Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • pass location value to PropertyPlaceholderConfigurer thought context-param

    Problem is to load property file from external location not in classpath witch is given as context parameter in web.xml.


    The path of the config file is given as context-apram in web.xml:

    Code:
           <context-param>
                <param-name>config-filename</param-name>
    	    <param-value>C:/my.properties</param-value>
           </context-param>
    If to put this In the Spring context.xml, Spring can't resolve ${config-filename} placeholder until it's configured the property-placeholder (http://stackoverflow.com/questions/1...other-property)

    Code:
           <bean id="placeholderConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">	
    		<property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE"/>	
    	</bean>
    	<context:property-placeholder location="file:${config-fileName}" />
    So as it was suggested I have now this:

    Code:
           <bean id="placeholderConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">	
    		<property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE"/>
    		<property name="location">
    	    	<bean class="java.lang.System" factory-method="getenv">
    	        	<constructor-arg value="config-fileName"/>
    	     	</bean>    	
       		</property>	
    	</bean>
    	<context:property-placeholder location="file:${config-fileName}" />
    But properties files doesn't load:

    Code:
    2012-09-25 14:52:18,068 1 ERROR [main] context.ContextLoader - Context initialization failed
    java.lang.NullPointerException
    	at org.springframework.core.io.support.PropertiesLoaderSupport.loadProperties(PropertiesLoaderSupport.java:181)
    	at org.springframework.core.io.support.PropertiesLoaderSupport.mergeProperties(PropertiesLoaderSupport.java:161)
    	at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:69)
    	at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:640)
    	at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:615)
    	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:405)
    	at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
    	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
    	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
    	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
    	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
    	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
    	at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
    	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
    	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
    	at org.apache.catalina.core.StandardService.start(StandardService.java:525)
    	at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
    	at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
    	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:597)
    	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
    	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)

  • #2
    For starters your configuration is flawed as you have 2 PropertyPlaceHoldersConfigured either use the namespace or use the plain bean but not both and one will not process the other as they are initialized in the same part of the startup sequence.

    Also getEnv has nothing to do with context-parameters those are completly different so your getenv approach is basically not going to work.

    Just curious why does it have to be a context-parameter? If you can set it as a context parameter you can also set it is a value in your spring configuration?

    However assuming you use Spring 3.x or higher you could try some SpEL to achieve your goal.

    Code:
    <context:property-placeholder location="file:#{contextAttributes['config-filename']}" />

    Comment


    • #3
      I changed the configuration to
      Code:
             <bean id="placeholderConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
      		<property name="location" value="file:///#{contextAttributes['config-filename']}"/>
      		<property name="ignoreUnresolvablePlaceholders" value="true"/>
      	</bean>
      Now, the problem is the properties in file are not accessible:
      Code:
      2012-09-25 16:52:30,157 770 ERROR [main] util.JDBCExceptionReporter - Cannot load JDBC driver class '${database.driver.classname}'
      I use Spring 3.0.

      Originally posted by Marten Deinum View Post
      Just curious why does it have to be a context-parameter? If you can set it as a context parameter you can also set it is a value in your spring configuration?
      Lately the file path will be given through Tomcat context configuration.

      Comment


      • #4
        I'm still not sure why you are using the plain bean instead of the namespace.. Remove ignoreUnresolvablePlaceholders and enable debug/trace logging for the org.springframework.beans.factory.config package and see what is happening (and if the file gets replaced). Also why the /// in fthe location only file: should be enough.

        Lately the file path will be given through Tomcat context configuration.
        Which isn't the same as a context-param in web.xml (I assume here you mean putting it in a context.xml file for tomcat) as in general those are JNDI resources...

        Comment


        • #5
          The same result with namespace.

          for
          Code:
          <context:property-placeholder location="file:///#{contextAttributes['dgs3g-filename']}" />
          got the exception:

          Code:
          2012-09-25 17:18:59,105 1 ERROR [main] context.ContextLoader - Context initialization failed
          org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'dataSourceJdbc' defined in class path resource [spring/spring-backend-context-hibernate.xml]: Could not resolve placeholder 'database.driver.classname'
          	at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties(PropertyPlaceholderConfigurer.java:272)
          	at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:75)
          	at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:640)
          	at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:615)
          	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:405)
          	at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
          	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
          	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
          	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
          	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
          	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
          	at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
          	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
          	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
          	at org.apache.catalina.core.StandardService.start(StandardService.java:525)
          	at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
          	at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
          	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:597)
          	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
          	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)

          If to remove ///

          Code:
          SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
          org.springframework.beans.factory.BeanInitializationException: Could not load properties; nested exception is java.io.FileNotFoundException:  (The system cannot find the path specified)
          	at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:78)
          	at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:640)
          	at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:615)
          	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:405)
          	at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
          	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
          	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
          	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
          	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
          	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
          	at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
          	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
          	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
          	at org.apache.catalina.core.StandardService.start(StandardService.java:525)
          	at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
          	at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
          	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:597)
          	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
          	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
          Caused by: java.io.FileNotFoundException:  (The system cannot find the path specified)
          	at java.io.FileInputStream.open(Native Method)
          	at java.io.FileInputStream.<init>(FileInputStream.java:120)
          	at java.io.FileInputStream.<init>(FileInputStream.java:79)
          	at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70)
          	at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161)
          	at org.springframework.core.io.UrlResource.getInputStream(UrlResource.java:124)
          	at org.springframework.core.io.support.PropertiesLoaderSupport.loadProperties(PropertiesLoaderSupport.java:181)
          	at org.springframework.core.io.support.PropertiesLoaderSupport.mergeProperties(PropertiesLoaderSupport.java:161)
          	at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:69)
          	... 21 more
          2012-09-25 17:22:21,107 1 ERROR [main] context.ContextLoader - Context initialization failed
          Originally posted by Marten Deinum View Post
          Which isn't the same as a context-param in web.xml (I assume here you mean putting it in a context.xml file for tomcat) as in general those are JNDI resources...
          Why is not the same?

          http://tomcat.apache.org/tomcat-6.0-...g/context.html

          Comment


          • #6
            Why is not the same?
            as mentioned in my previous post a context-param isn't the same as a jndi resource!

            Edit: A forgot about the fact that you can also specify paramaeters in the context.xml which are available to the application. Must be having used to much JNDI .

            If the placeholder cannot be resolved it isn't in the file.

            To pin point your issue I suggested you enable debug/trace logging for the package that way you get information on what is happening (which file is being loaded etc.).

            Comment


            • #7
              Originally posted by Marten Deinum View Post
              as mentioned in my previous post a context-param isn't the same as a jndi resource!
              Putting in parameter is context also is not a jndi resource. They are both the same.

              Code:
              <Context>
                ...
                <Parameter ../>
              Originally posted by Marten Deinum View Post
              If the placeholder cannot be resolved it isn't in the file.
              It is in the file for sure.

              Originally posted by Marten Deinum View Post
              To pin point your issue I suggested you enable debug/trace logging for the package that way you get information on what is happening
              Debugging is already enabled.

              Comment


              • #8
                Then post your logging and not the stacktraces (also as mentioned you might need trace logging enabled).

                If it is in the file the placeholder will be found and replaced if it isn't you will get this message... So as mentioned I'm not 100% sure it is in the file you are trying to load...

                Putting in parameter is context also is not a jndi resource. They are both the same.
                See my edited post (before you posted this reply ).

                Comment


                • #9
                  Originally posted by Marten Deinum View Post
                  Then post your logging and not the stacktraces (also as mentioned you might need trace logging enabled).
                  Doesn't give any other result.

                  Originally posted by Marten Deinum View Post
                  If it is in the file the placeholder will be found and replaced if it isn't you will get this message... So as mentioned I'm not 100% sure it is in the file you are trying to load...
                  But I'm sure it is in file (database.driver.classname=com.mysql.jdbc.Driver).

                  Originally posted by Marten Deinum View Post
                  See my edited post (before you posted this reply ).
                  Sorry I haven't seen it)).

                  Comment


                  • #10
                    Sigh... Read..

                    Then post your logging
                    Enabling or disabling logging doesn't do anything for the result... I want to see the logging not the stacktraces..

                    As mentioned before it it either not in the file, it isn't matching in case or maybe in file encodings. Either way without seeing logging there is not much to do..

                    Comment


                    • #11
                      Originally posted by Marten Deinum View Post
                      Enabling or disabling logging doesn't do anything for the result... I want to see the logging not the stacktraces..
                      Here are all logs

                      catalina.log
                      Code:
                      Sep 26, 2012 10:53:12 AM org.apache.catalina.core.AprLifecycleListener init
                      INFO: Loaded APR based Apache Tomcat Native library 1.1.22.
                      Sep 26, 2012 10:53:12 AM org.apache.catalina.core.AprLifecycleListener init
                      INFO: APR capabilities: IPv6 [false], sendfile [true], accept filters [false], random [true].
                      Sep 26, 2012 10:53:13 AM org.apache.coyote.http11.Http11AprProtocol init
                      INFO: Initializing Coyote HTTP/1.1 on http-8082
                      Sep 26, 2012 10:53:13 AM org.apache.coyote.ajp.AjpAprProtocol init
                      INFO: Initializing Coyote AJP/1.3 on ajp-8009
                      Sep 26, 2012 10:53:13 AM org.apache.catalina.startup.Catalina load
                      INFO: Initialization processed in 766 ms
                      Sep 26, 2012 10:53:13 AM org.apache.catalina.core.StandardService start
                      INFO: Starting service Catalina
                      Sep 26, 2012 10:53:13 AM org.apache.catalina.core.StandardEngine start
                      INFO: Starting Servlet Engine: Apache Tomcat/6.0.35
                      Sep 26, 2012 10:53:13 AM org.apache.catalina.startup.HostConfig deployWAR
                      INFO: Deploying web application archive myapp.war
                      Sep 26, 2012 10:53:13 AM org.apache.catalina.startup.ContextConfig init
                      FINE: ContextConfig: Initializing
                      Sep 26, 2012 10:53:13 AM org.apache.catalina.startup.ContextConfig processContextConfig
                      FINE: Processing context [/myapp] configuration file C:\Program Files\tomcat\conf context.xml
                      Sep 26, 2012 10:53:13 AM org.apache.catalina.startup.ContextConfig processContextConfig
                      FINE: Successfully processed context [/myapp] configuration file C:\Program Files\tomcat\conf context.xml
                      Sep 26, 2012 10:53:13 AM org.apache.catalina.startup.ContextConfig processContextConfig
                      FINE: Processing context [/myapp] configuration file C:\Program Files\tomcat\conf Catalina/localhost/context.xml.default
                      Sep 26, 2012 10:53:14 AM org.apache.catalina.startup.ContextConfig start
                      FINE: ContextConfig: Processing START
                      Sep 26, 2012 10:53:14 AM org.apache.catalina.startup.ContextConfig processDefaultWebConfig
                      FINE: Processing context [/myapp] web configuration resource file://C:\Program Files\tomcat\conf\web.xml
                      Sep 26, 2012 10:53:14 AM org.apache.catalina.startup.ContextConfig applicationWebConfig
                      FINE: Parsing application web.xml file at jndi:/localhost/myapp/WEB-INF/web.xml
                      Sep 26, 2012 10:53:14 AM org.apache.catalina.startup.ContextConfig start
                      FINE: Pipeline Configuration:
                      Sep 26, 2012 10:53:14 AM org.apache.catalina.startup.ContextConfig start
                      FINE:   org.apache.catalina.core.StandardContextValve/1.0
                      Sep 26, 2012 10:53:14 AM org.apache.catalina.startup.ContextConfig start
                      FINE: ======================
                      Sep 26, 2012 10:53:15 AM org.apache.catalina.core.StandardContext addApplicationListener
                      INFO: The listener "com.sun.faces.config.ConfigureListener" is already configured for this context. The duplicate definition has been ignored.
                      Sep 26, 2012 10:53:15 AM com.sun.faces.config.ConfigureListener contextInitialized
                      INFO: Initializing Mojarra (1.2_13-b01-FCS) for context '/myapp'
                      Sep 26, 2012 10:53:18 AM org.apache.catalina.core.StandardContext start
                      SEVERE: Error listenerStart
                      Sep 26, 2012 10:53:18 AM org.apache.catalina.core.StandardContext start
                      SEVERE: Context [/myapp] startup failed due to previous errors
                      Sep 26, 2012 10:53:18 AM org.apache.catalina.startup.ContextConfig stop
                      FINE: ContextConfig: Processing STOP
                      Sep 26, 2012 10:53:19 AM org.apache.coyote.http11.Http11AprProtocol start
                      INFO: Starting Coyote HTTP/1.1 on http-8082
                      Sep 26, 2012 10:53:19 AM org.apache.coyote.ajp.AjpAprProtocol start
                      INFO: Starting Coyote AJP/1.3 on ajp-8009
                      Sep 26, 2012 10:53:19 AM org.apache.catalina.startup.Catalina start
                      INFO: Server startup in 6126 ms
                      spring.log
                      Code:
                      ERROR:2012-09-26 10:53:18,720 - Context initialization failed (in ContextLoader.java:220)
                      org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'dataSourceJdbc' defined in class path resource [spring/spring-backend-context-hibernate.xml]: Could not resolve placeholder 'database.driver.classname'
                      	at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties(PropertyPlaceholderConfigurer.java:272)
                      	at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:75)
                      	at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:640)
                      	at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:615)
                      	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:405)
                      	at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
                      	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
                      	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
                      	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
                      	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
                      	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
                      	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
                      	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
                      	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943)
                      	at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778)
                      	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:504)
                      	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
                      	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
                      	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
                      	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
                      	at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
                      	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
                      	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
                      	at org.apache.catalina.core.StandardService.start(StandardService.java:525)
                      	at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
                      	at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
                      	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:597)
                      	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
                      	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
                      Originally posted by Marten Deinum View Post
                      As mentioned before it it either not in the file, it isn't matching in case or maybe in file encodings. Either way without seeing logging there is not much to do..
                      If put file path reference directly it works fine:

                      Code:
                      <context:property-placeholder location="file:C:/my.properties}" />

                      The problem is how to get values when I pass the file path as context parameter.

                      Comment


                      • #12
                        The problem is how to get values when I pass the file path as context parameter.
                        That is as I already pointed out using SpEL...

                        I see nowhere that you have enabled debug logging for spring you, again, only post the stacktrace and the tomcat logs don't show anything I'm interested to see what happens BEFORE the stacktrace (with the debug and trace logging)...

                        Comment


                        • #13
                          Code:
                          2012-09-26 11:20:19,954 0 INFO  [main] context.ContextLoader - Root WebApplicationContext: initialization started
                          2012-09-26 11:20:19,997 43 INFO  [main] support.AbstractApplicationContext - Refreshing Root WebApplicationContext: startup date [Wed Sep 26 11:20:19 GMT+04:00 2012]; root of context hierarchy
                          2012-09-26 11:20:20,061 107 INFO  [main] xml.XmlBeanDefinitionReader - Loading XML bean definitions from ServletContext resource [/WEB-INF/spring-context.xml]
                          2012-09-26 11:20:20,166 212 INFO  [main] annotation.ClassPathScanningCandidateComponentProvider - JSR-330 'javax.inject.Named' annotation found and supported for component scanning
                          2012-09-26 11:20:20,372 418 INFO  [main] xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [spring/spring-backend-context-hibernate.xml]
                          2012-09-26 11:20:20,412 458 INFO  [main] annotation.ClassPathScanningCandidateComponentProvider - JSR-330 'javax.inject.Named' annotation found and supported for component scanning
                          2012-09-26 11:20:20,594 640 INFO  [main] xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [spring/core/spring-backend-context-dao.xml]
                          ..................
                          2012-09-26 11:20:20,789 835 INFO  [main] xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [spring/physical_storage/service/spring-service.xml]
                          2012-09-26 11:20:20,799 845 INFO  [main] xml.XmlBeanDefinitionReader - Loading XML bean definitions from ServletContext resource [/WEB-INF/document_management_beans/spring-context-bean.xml]
                          ..................
                          2012-09-26 11:20:20,829 875 INFO  [main] xml.XmlBeanDefinitionReader - Loading XML bean definitions from ServletContext resource [/WEB-INF/document_management_controllers/spring-context-controller.xml]
                          2012-09-26 11:20:20,840 886 INFO  [main] support.DefaultListableBeanFactory - Overriding bean definition for bean 'navigationMenuController': replacing [Generic bean: class [com.web.utils.NavigationMenuController]; scope=request; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in ServletContext resource [/WEB-INF/document_management_controllers/spring-context-controller.xml]] with [Generic bean: class [com.web.utils.NavigationMenuController]; scope=request; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in ServletContext resource [/WEB-INF/document_management_controllers/spring-context-controller.xml]]
                          ..........
                          2012-09-26 11:20:20,843 889 INFO  [main] support.DefaultListableBeanFactory - Overriding bean definition for bean 'departmentDocumentRelManagementController': replacing [Generic bean: class [com.web.documentManagement.web.depDoc.controller.DepartmentDocumentRelManagementController]; scope=session; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=init; destroyMethodName=null; defined in ServletContext resource [/WEB-INF/document_management_controllers/spring-context-controller.xml]] with [Generic bean: class [com.web.documentManagement.web.depDoc.controller.DepartmentDocumentRelManagementController]; scope=session; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=init; destroyMethodName=null; defined in ServletContext resource [/WEB-INF/document_management_controllers/spring-context-controller.xml]]
                          2012-09-26 11:20:20,844 890 INFO  [main] xml.XmlBeanDefinitionReader - Loading XML bean definitions from ServletContext resource [/WEB-INF/bookmark/beans/spring-context-bean.xml]
                          .........
                          2012-09-26 11:20:20,878 924 INFO  [main] xml.XmlBeanDefinitionReader - Loading XML bean definitions from ServletContext resource [/WEB-INF/spring-context-controller.xml]
                          2012-09-26 11:20:20,892 938 INFO  [main] xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [spring/declaration/manager/spring-manager.xml]
                          ................................
                          2012-09-26 11:20:20,949 995 INFO  [main] xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [spring/physical_storage/manager/spring-manager.xml]

                          Comment


                          • #14
                            Code:
                            2012-09-26 11:20:20,957 1003 INFO  [main] support.DefaultListableBeanFactory - Overriding bean definition for bean 'physicalStorageManager': replacing [Generic bean: class [com.physicalStorage.manager.impl.PhysicalStorageManagerImpl]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [spring/physical_storage/manager/spring-manager.xml]] with [Generic bean: class [com.physicalStorage.manager.impl.PhysicalStorageManagerImpl]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [spring/physical_storage/manager/spring-manager.xml]]
                            .............
                            2012-09-26 11:20:20,960 1006 INFO  [main] support.DefaultListableBeanFactory - Overriding bean definition for bean 'physicalStorageAddressManager': replacing [Generic bean: class [com.physicalStorage.manager.impl.PhysicalStorageAddressManagerImpl]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [spring/physical_storage/manager/spring-manager.xml]] with [Generic bean: class [com.physicalStorage.manager.impl.PhysicalStorageAddressManagerImpl]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [spring/physical_storage/manager/spring-manager.xml]]
                            2012-09-26 11:20:20,961 1007 INFO  [main] xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [spring/physical_storage/service/spring-service.xml]
                            2012-09-26 11:20:20,972 1018 INFO  [main] support.DefaultListableBeanFactory - Overriding bean definition for bean 'physicalStorageService': replacing [Generic bean: class [com.physicalStorage.service.impl.PhysicalStorageServiceImpl]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [spring/physical_storage/service/spring-service.xml]] with [Generic bean: class [com.physicalStorage.service.impl.PhysicalStorageServiceImpl]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [spring/physical_storage/service/spring-service.xml]]
                            .............
                            2012-09-26 11:20:20,973 1019 INFO  [main] support.DefaultListableBeanFactory - Overriding bean definition for bean 'boxTypeService': replacing [Generic bean: class [com.physicalStorage.service.impl.BoxTypeServiceImpl]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [spring/physical_storage/service/spring-service.xml]] with [Generic bean: class [com.physicalStorage.service.impl.BoxTypeServiceImpl]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [spring/physical_storage/service/spring-service.xml]]
                            2012-09-26 11:20:20,974 1020 INFO  [main] xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [spring/treatment/manager/spring-manager.xml]
                            ....................
                            2012-09-26 11:20:21,111 1157 INFO  [main] xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [spring/data_migration/service/spring-service.xml]
                            2012-09-26 11:20:21,119 1165 INFO *[main] xml.XmlBeanDefinitionReader - Loading XML bean definitions from ServletContext resource [/WEB-INF/physical_archive_management/declaration_beans/spring-context-bean.xml]
                            .....................
                            2012-09-26 11:20:21,381 1427 INFO *[main] xml.XmlBeanDefinitionReader - Loading XML bean definitions from ServletContext resource [/WEB-INF/help/beans/spring-context-bean.xml]
                            2012-09-26 11:20:21,387 1433 INFO *[main] support.DefaultListableBeanFactory - Overriding bean definition for bean 'helpBean': replacing [Generic bean: class [com.web.help.beans.HelpBean]; scope=request; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in ServletContext resource [/WEB-INF/bookmark/beans/spring-context-bean.xml]] with [Generic bean: class [com.web.help.beans.HelpBean]; scope=request; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in ServletContext resource [/WEB-INF/help/beans/spring-context-bean.xml]]
                            2012-09-26 11:20:21,388 1434 INFO *[main] xml.XmlBeanDefinitionReader - Loading XML bean definitions from ServletContext resource [/WEB-INF/help/controllers/spring-context-controller.xml]
                            2012-09-26 11:20:21,400 1446 INFO *[main] xml.XmlBeanDefinitionReader - Loading XML bean definitions from ServletContext resource [/WEB-INF/spring-context-security.xml]
                            2012-09-26 11:20:21,422 1468 INFO *[main] core.SpringSecurityCoreVersion - You are running with Spring Security Core 3.0.5.RELEASE
                            2012-09-26 11:20:21,422 1468 WARN *[main] core.SpringSecurityCoreVersion - You are advised to use Spring 3.0.3 or later with this version. You are running: 3.0.2.RELEASE
                            2012-09-26 11:20:21,422 1468 INFO *[main] config.SecurityNamespaceHandler - Spring Security 'config' module version is 3.0.5.RELEASE

                            Comment


                            • #15
                              Code:
                              2012-09-26 11:20:21,524 1570 INFO  [main] http.HttpSecurityBeanDefinitionParser - Checking sorted filter chain: [Root bean: class [org.springframework.security.web.access.channel.ChannelProcessingFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 100, Root bean: class [org.springframework.security.web.session.ConcurrentSessionFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 200, Root bean: class [org.springframework.security.web.context.SecurityContextPersistenceFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 300, Root bean: class [org.springframework.security.web.authentication.logout.LogoutFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 400, Root bean: class [org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 800, Root bean: class [org.springframework.security.web.authentication.www.BasicAuthenticationFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 1200, Root bean: class [org.springframework.security.web.savedrequest.RequestCacheAwareFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 1300, Root bean: class [org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 1400, Root bean: class [org.springframework.security.web.authentication.AnonymousAuthenticationFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 1600, Root bean: class [org.springframework.security.web.session.SessionManagementFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 1700, Root bean: class [org.springframework.security.web.access.ExceptionTranslationFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 1800, <org.springframework.security.web.access.intercept.FilterSecurityInterceptor#0>, order = 1900]
                              2012-09-26 11:20:22,346 2392 ERROR [main] context.ContextLoader - Context initialization failed

                              Comment

                              Working...
                              X