0
votes

I am trying...

  1. I have Batch Job app-context configuration in spring\batch\override\override.xml
  2. I have Web app servlet configuration on the same project using web.xml, mvc-dispatcher-servlet.xml
  3. My web app controllers are running successfully
  4. The very first expected Spring Integration listener not started
  5. The batch job context not loaded
  6. The batch Job Admin Console page not found - error 404

For update the Job Admin Console and Integration listener was running with the existing datauploadJobs.xml setup prior to making the same project as Web-Servlet context project. the location of the same is: META-INF\spring\batch\jobs\datauploadJobs.xml. That time in the web.xml mvc-dispatcher-servlet.xml was not there in the context parameter.

please Help.....Details of setup of latest see below:

web.xml (relevant part only)

<listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>

 <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>
        classpath*:/org/springframework/batch/admin/web/resources/webapp-config.xml
    </param-value>
</context-param>
<servlet>
    <servlet-name>mvc-dispatcher</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    <init-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>
            classpath*:/org/springframework/batch/admin/web/resources/servlet-config.xml,
            /WEB-INF/mvc-dispatcher-servlet.xml     
        </param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
</servlet>

================================================================================= mvc-dispatcher-servlet.xml

<context:annotation-config />
<context:component-scan base-package="com.tda.institutional.iRebalEnt" />
<mvc:annotation-driven />
<bean
    class="org.springframework.web.servlet.view.InternalResourceViewResolver">
    <property name="prefix">
        <value>/WEB-INF/pages/</value>
    </property>
    <property name="suffix">
        <value>.jsp</value>
    </property>
</bean>
<mvc:resources mapping="/resources/**" location="/,/resources/,/WEB-INF/" />
1
can u share your project structure and ur project's XMLsdharam
Also, turn on DEBUG logging; Spring (and Spring Integration) emit copious debug logs for bean instantiation/initialization.Gary Russell
@dharam..... provided more info......Saikat Sur

1 Answers

0
votes

Just want to know what is your servlet-config.xml has, if it is application context then load it in context configuration

Also check whether spring beans are initialized on start of the server.