Announcement Announcement Module
Collapse
No announcement yet.
Spring Batch Admin M2 with Oracle/2.0 SB Schema Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring Batch Admin M2 with Oracle/2.0 SB Schema

    I am trying to run the sample and configure it to run against Oracle 10.2. I basically took the sample, configured a properties file for Oracle (took out the init datasource setting!) and pointed it at my schema that was built with spring batch 2.0 ddl. That being said, things look ok until you click around some. Here are the three problems I am seeing.

    If I go to executions, I see my executions (the first 20). Rows 1-20 of 4,205. If I click "Next" to see more executions:

    http://localhost:9090/batch-admin/ba...20&pageSize=20

    I see this exception
    Code:
    org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.dao.EmptyResultDataAccessException: Incorrect result size: expected 1, actual 0
    	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:659)
    	org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:552)
    
    root cause
    
    org.springframework.dao.EmptyResultDataAccessException: Incorrect result size: expected 1, actual 0
    	org.springframework.dao.support.DataAccessUtils.requiredSingleResult(DataAccessUtils.java:71)
    	org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:472)
    	org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:476)
    	org.springframework.jdbc.core.JdbcTemplate.queryForLong(JdbcTemplate.java:480)
    	org.springframework.jdbc.core.simple.SimpleJdbcTemplate.queryForLong(SimpleJdbcTemplate.java:127)
    	org.springframework.batch.admin.service.JdbcSearchableJobExecutionDao.getJobExecutions(JdbcSearchableJobExecutionDao.java:190)
    	org.springframework.batch.admin.service.SimpleJobService.listJobExecutions(SimpleJobService.java:209)
    	org.springframework.batch.admin.web.JobExecutionController.list(JobExecutionController.java:144)
    The second involves drilling into the Job Execution details.
    First:
    batch/jobs/executions/4542

    then "Step Executions":
    batch/jobs/executions/4542/steps

    selecting "detail"
    /batch/jobs/executions/4542/steps/17030/progress

    I get this exception on "most" steps on any job I look at (somewhere around 95% failure)

    Code:
    org.springframework.web.util.NestedServletException: Request processing failed; nested exception is freemarker.core.InvalidReferenceException: Expression stepExecutionInfo.stepExecution.exitStatus.exitDescription is undefined on line 84, column 39 in manager/jobs/steps/execution.ftl.
    	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:659)
    	org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:552)
    
    root cause
    
    freemarker.core.InvalidReferenceException: Expression stepExecutionInfo.stepExecution.exitStatus.exitDescription is undefined on line 84, column 39 in manager/jobs/steps/execution.ftl.
    	freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)
    	freemarker.core.Expression.getStringValue(Expression.java:118)
    	freemarker.core.Expression.getStringValue(Expression.java:93)
    	freemarker.core.DollarVariable.accept(DollarVariable.java:76)
    	freemarker.core.Environment.visit(Environment.java:209)
    	freemarker.core.MixedContent.accept(MixedContent.java:92)
    	freemarker.core.Environment.visit(Environment.java:209)
    	freemarker.core.IfBlock.accept(IfBlock.java:82)
    	freemarker.core.Environment.visit(Environment.java:209)
    Lastly if I look at jobs I see the first page of jobs:
    * Rows: 1-20 of 180 * Next * Page Size: 20

    My next link:
    http://localhost:9090/batch-admin/ba...20&pageSize=20

    Clicking "Next" yields information about the job that showed up in the link vs. showing the next page:

    Job Instances for Job (Name: 1249859282430)

    If I hack the link and remove the job name that's embedded in it, I get the expected behavior:

    (Hacked link)
    http://localhost:9090/batch-admin/ba...20&pageSize=20

    (Correctly shows page 2 of the jobs)

  • #2
    Can you try just upgrading Spring Batch? There were some bugs in the query generators for pagination with Oracle that were fixed in 2.1.0. If it works with HSQL but not Oracle I suspect that it is fixed.

    Comment


    • #3
      I am running Spring Batch 2.1.0.M4 with Spring Batch Admin (the other app that's writing data to the 2.0 database schema is actually on Spring Batch 2.1.0.RELEASE). If I upgrade Spring Batch Admin to 2.1.0.RELEASE of Spring Batch, I get this exception (does _not_ occur on SB 2.1.0.M4):

      Code:
      12:42:44,798 ERROR main context.ContextLoader:208 - Context initialization faile
      d
      org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find clas
      s [org.springframework.batch.core.configuration.support.ClassPathXmlJobLoader] f
      or bean with name 'jobLoader' defined in URL [jar:file:/C:/apache-tomcat-6.0.20/
      webapps/mercybatch-admin/WEB-INF/lib/spring-batch-admin-manager-1.0.0.jar!/META-
      INF/bootstrap/batch/execution-context.xml]; nested exception is java.lang.ClassN
      otFoundException: org.springframework.batch.core.configuration.support.ClassPath
      XmlJobLoader
              at org.springframework.beans.factory.support.AbstractBeanFactory.resolve
      BeanClass(AbstractBeanFactory.java:1208)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBean
      Factory.predictBeanType(AbstractAutowireCapableBeanFactory.java:568)
              at org.springframework.beans.factory.support.AbstractBeanFactory.isFacto
      ryBean(AbstractBeanFactory.java:1277)
              at org.springframework.beans.factory.support.AbstractBeanFactory.isFacto
      ryBean(AbstractBeanFactory.java:844)
              at org.springframework.beans.factory.support.DefaultListableBeanFactory.
      preInstantiateSingletons(DefaultListableBeanFactory.java:539)
              at org.springframework.context.support.AbstractApplicationContext.finish
      BeanFactoryInitialization(AbstractApplicationContext.java:842)
              at org.springframework.context.support.AbstractApplicationContext.refres
      h(AbstractApplicationContext.java:416)
              at org.springframework.web.context.ContextLoader.createWebApplicationCon
      text(ContextLoader.java:261)
              at org.springframework.web.context.ContextLoader.initWebApplicationConte
      xt(ContextLoader.java:192)
              at org.springframework.web.context.ContextLoaderListener.contextInitiali
      zed(ContextLoaderListener.java:47)

      Comment


      • #4
        OK, then you might be able to just drop in spring-batch-infrastructure-2.1.0.RELEASE.jar (since the bug fix you need is there, but the missing class is in spring-batch-core). Or you can go to the trunk of Spring Batch Admin, or wait for the M3 release.

        Comment


        • #5
          I tried two things and no help either way. First, I mixed Spring Batch 2.1.0.M4 (core and test) with the the 2.1.0.RELEASE version of spring batch infrastructure. I was able to find the missing class of course (from core M4), but still had the same problems with paging and execution details. Also, I checked out trunk of Spring Batch Admin, changed the props for Oracle and built the sample app. I still see all of the same problems noted in the original post.

          Strangely paging does work in some places. For instance if I am looking at Job Instances via:
          /batch/jobs/{the_job_name}

          I am able to page that just fine.
          Last edited by sams; Mar 11th, 2010, 12:30 PM. Reason: typo

          Comment


          • #6
            Can you enable TRACE logging in org.springframework.jdbc and find the queries that are failing?

            Comment


            • #7
              Query that fails when going to page 2 of Job Executions:
              Code:
              core.JdbcTemplate:434 - Executing SQL query [SELECT * FROM (SELECT E.JOB_EXECUTION_ID AS SORT_KEY FROM BATCH_JOB_EXECUTION E, BATCH_JOB_INSTANCE I WHERE E.JOB_INSTANCE_ID=I.JOB_INSTANCE_ID ORDER BY E.JOB_EXECUTION_ID DESC) WHERE ROWNUM = 20]
              The failure on paging jobs page seems to be a rendering problem - the link gets made with the last job on the page embedded in it. Modifying this link and removing the job name from it gives the proper behavior (you can page it by manually modifying the query parameters).

              Comment


              • #8
                The last failure involves trying to get the step execution details. Here are all of logs for that:
                Code:
                core.JdbcTemplate:569 - Executing prepared SQL statement [SELECT JOB_EXECUTION_ID, START_TIME, END_TIME, STATUS, EXIT_CODE, EXIT_MESSAGE, CREATE_TIME, LAST_UPDATED, VERSION from BATCH_JOB_EXECUTION where JOB_EXECUTION_ID = ?]
                datasource.DataSourceUtils:112 - Fetching JDBC Connection from DataSource
                core.StatementCreatorUtils:206 - Setting SQL statement parameter value: column index 1, parameter value [4605], value class [java.lang.Long], SQL type unknown
                datasource.DataSourceUtils:312 - Returning JDBC Connection to DataSource
                core.JdbcTemplate:634 - Executing prepared SQL query
                core.JdbcTemplate:569 - Executing prepared SQL statement [SELECT ji.JOB_INSTANCE_ID, JOB_NAME, JOB_KEY, ji.VERSION from BATCH_JOB_INSTANCE ji, BATCH_JOB_EXECUTION je where JOB_EXECUTION_ID = ? and ji.JOB_INSTANCE_ID = je.JOB_INSTANCE_ID]
                datasource.DataSourceUtils:112 - Fetching JDBC Connection from DataSource
                core.StatementCreatorUtils:206 - Setting SQL statement parameter value: column index 1, parameter value [4605], value class [java.lang.Long], SQL type unknown
                core.JdbcTemplate:634 - Executing prepared SQL query
                core.JdbcTemplate:569 - Executing prepared SQL statement [SELECT JOB_INSTANCE_ID, KEY_NAME, TYPE_CD, STRING_VAL, DATE_VAL, LONG_VAL, DOUBLE_VAL from BATCH_JOB_PARAMS where JOB_INSTANCE_ID = ?]
                datasource.DataSourceUtils:112 - Fetching JDBC Connection from DataSource
                core.StatementCreatorUtils:206 - Setting SQL statement parameter value: column index 1, parameter value [4464], value class [java.lang.Long], SQL type unknown
                datasource.DataSourceUtils:312 - Returning JDBC Connection to DataSource
                datasource.DataSourceUtils:312 - Returning JDBC Connection to DataSource
                core.JdbcTemplate:634 - Executing prepared SQL query
                core.JdbcTemplate:569 - Executing prepared SQL statement [SELECT SHORT_CONTEXT, SERIALIZED_CONTEXT FROM BATCH_JOB_EXECUTION_CONTEXT WHERE JOB_EXECUTION_ID = ?]
                datasource.DataSourceUtils:112 - Fetching JDBC Connection from DataSource
                core.StatementCreatorUtils:206 - Setting SQL statement parameter value: column index 1, parameter value [4605], value class [java.lang.Long], SQL type unknown
                datasource.DataSourceUtils:312 - Returning JDBC Connection to DataSource
                core.JdbcTemplate:634 - Executing prepared SQL query
                core.JdbcTemplate:569 - Executing prepared SQL statement [SELECT STEP_EXECUTION_ID, STEP_NAME, START_TIME, END_TIME, STATUS, COMMIT_COUNT, READ_COUNT, FILTER_COUNT, WRITE_COUNT, EXIT_CODE, EXIT_MESSAGE, READ_SKIP_COUNT, WRITE_SKIP_COUNT, PROCESS_SKIP_COUNT, ROLLBACK_COUNT, LAST_UPDATED, VERSION from BATCH_STEP_EXECUTION where JOB_EXECUTION_ID = ? order by STEP_EXECUTION_ID]
                datasource.DataSourceUtils:112 - Fetching JDBC Connection from DataSource
                core.StatementCreatorUtils:206 - Setting SQL statement parameter value: column index 1, parameter value [4605], value class [java.lang.Long], SQL type unknown
                datasource.DataSourceUtils:312 - Returning JDBC Connection to DataSource
                core.JdbcTemplate:634 - Executing prepared SQL query
                core.JdbcTemplate:569 - Executing prepared SQL statement [SELECT STEP_EXECUTION_ID, STEP_NAME, START_TIME, END_TIME, STATUS, COMMIT_COUNT, READ_COUNT, FILTER_COUNT, WRITE_COUNT, EXIT_CODE, EXIT_MESSAGE, READ_SKIP_COUNT, WRITE_SKIP_COUNT, PROCESS_SKIP_COUNT, ROLLBACK_COUNT, LAST_UPDATED, VERSION from BATCH_STEP_EXECUTION where JOB_EXECUTION_ID = ? and STEP_EXECUTION_ID = ?]
                datasource.DataSourceUtils:112 - Fetching JDBC Connection from DataSource
                core.StatementCreatorUtils:206 - Setting SQL statement parameter value: column index 1, parameter value [4605], value class [java.lang.Long], SQL type unknown
                core.StatementCreatorUtils:206 - Setting SQL statement parameter value: column index 2, parameter value [17572], value class [java.lang.Long], SQL type unknown
                datasource.DataSourceUtils:312 - Returning JDBC Connection to DataSource
                core.JdbcTemplate:634 - Executing prepared SQL query
                core.JdbcTemplate:569 - Executing prepared SQL statement [SELECT SHORT_CONTEXT, SERIALIZED_CONTEXT FROM BATCH_STEP_EXECUTION_CONTEXT WHERE STEP_EXECUTION_ID = ?]
                datasource.DataSourceUtils:112 - Fetching JDBC Connection from DataSource
                core.StatementCreatorUtils:206 - Setting SQL statement parameter value: column index 1, parameter value [17572], value class [java.lang.Long], SQL type unknown
                datasource.DataSourceUtils:312 - Returning JDBC Connection to DataSource
                core.JdbcTemplate:634 - Executing prepared SQL query
                core.JdbcTemplate:569 - Executing prepared SQL statement [SELECT COUNT(STEP_EXECUTION_ID) from BATCH_STEP_EXECUTION where STEP_NAME = ?]
                datasource.DataSourceUtils:112 - Fetching JDBC Connection from DataSource
                core.StatementCreatorUtils:206 - Setting SQL statement parameter value: column index 1, parameter value [arvValidateInputJobParams], value class [java.lang.String], SQL type unknown
                datasource.DataSourceUtils:312 - Returning JDBC Connection to DataSource
                core.JdbcTemplate:634 - Executing prepared SQL query
                core.JdbcTemplate:569 - Executing prepared SQL statement [SELECT COUNT(STEP_EXECUTION_ID) from BATCH_STEP_EXECUTION where STEP_NAME = ?]
                Fetching JDBC Connection from DataSource
                core.StatementCreatorUtils:206 - Setting SQL statement parameter value: column index 1, parameter value [arvValidateInputJobParams], value class [java.lang.String], SQL type unknown
                datasource.DataSourceUtils:312 - Returning JDBC Connection to DataSource
                datasource.DataSourceUtils:112 - Fetching JDBC Connection from DataSource
                datasource.DataSourceUtils:312 - Returning JDBC Connection to DataSource
                core.JdbcTemplate:634 - Executing prepared SQL query
                core.JdbcTemplate:569 - Executing prepared SQL statement [SELECT * FROM (SELECT STEP_EXECUTION_ID, STEP_NAME, START_TIME, END_TIME, STATUS, COMMIT_COUNT, READ_COUNT, FILTER_COUNT, WRITE_COUNT, EXIT_CODE, EXIT_MESSAGE, READ_SKIP_COUNT, WRITE_SKIP_COUNT, PROCESS_SKIP_COUNT, ROLLBACK_COUNT, LAST_UPDATED, VERSION FROM BATCH_STEP_EXECUTION WHERE STEP_NAME = ? ORDER BY STEP_EXECUTION_ID DESC) WHERE ROWNUM <= 1000]
                datasource.DataSourceUtils:112 - Fetching JDBC Connection from DataSource
                core.StatementCreatorUtils:206 - Setting SQL statement parameter value: column index 1, parameter value [arvValidateInputJobParams], value class [java.lang.String], SQL type unknown
                datasource.DataSourceUtils:312 - Returning JDBC Connection to DataSource
                freemarker.runtime:96 - 
                Expression stepExecutionInfo.stepExecution.exitStatus.exitDescription is undefined on line 84, column 39 in manager/jobs/steps/execution.ftl.
                The problematic instruction:
                ----------
                ==> ${stepExecutionInfo.stepExecution.exitStatus.exitDescription} [on line 84, column 37 in manager/jobs/steps/execution.ftl]
                 in include "${execution}" [on line 7, column 1 in manager/jobs/steps/progress.ftl]
                 in include body [on line 40, column 16 in layouts/standard.ftl]
                ----------
                Java backtrace for programmers:
                ----------
                freemarker.core.InvalidReferenceException: Expression stepExecutionInfo.stepExecution.exitStatus.exitDescription is undefined on line 84, column 39 in manager/jobs/steps/execution.ftl.
                	at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)
                	at freemarker.core.Expression.getStringValue(Expression.java:118)
                	at freemarker.core.Expression.getStringValue(Expression.java:93)
                	at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
                	at freemarker.core.Environment.visit(Environment.java:209)
                	at freemarker.core.MixedContent.accept(MixedContent.java:92)
                	at freemarker.core.Environment.visit(Environment.java:209)
                	at freemarker.core.IfBlock.accept(IfBlock.java:82)
                	at freemarker.core.Environment.visit(Environment.java:209)
                	at freemarker.core.MixedContent.accept(MixedContent.java:92)
                	at freemarker.core.Environment.visit(Environment.java:209)
                	at freemarker.core.Environment.include(Environment.java:1482)
                	at freemarker.core.Include.accept(Include.java:169)
                	at freemarker.core.Environment.visit(Environment.java:209)
                	at freemarker.core.MixedContent.accept(MixedContent.java:92)
                	at freemarker.core.Environment.visit(Environment.java:209)
                	at freemarker.core.Environment.include(Environment.java:1482)
                	at freemarker.core.Include.accept(Include.java:169)
                	at freemarker.core.Environment.visit(Environment.java:209)
                	at freemarker.core.MixedContent.accept(MixedContent.java:92)
                	at freemarker.core.Environment.visit(Environment.java:209)
                	at freemarker.core.Environment.process(Environment.java:189)
                	at freemarker.template.Template.process(Template.java:237)
                	at org.springframework.web.servlet.view.freemarker.FreeMarkerView.processTemplate(FreeMarkerView.java:366)
                	at org.springframework.web.servlet.view.freemarker.FreeMarkerView.doRender(FreeMarkerView.java:283)
                	at org.springframework.web.servlet.view.freemarker.FreeMarkerView.renderMergedTemplateModel(FreeMarkerView.java:233)
                	at org.springframework.js.ajax.freemarker.AjaxFreeMarkerView.renderMergedTemplateModel(AjaxFreeMarkerView.java:109)
                	at org.springframework.web.servlet.view.AbstractTemplateView.renderMergedOutputModel(AbstractTemplateView.java:167)
                	at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
                	at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1060)
                	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:798)
                	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
                	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)
                	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:552)

                Comment


                • #9
                  The SQL looks fine to me, but I don't have an Oracle instance to try it out on just now. Can you see why it doesn't work?

                  Presumably the rendering error goes away if you switch back to the default database?

                  Comment


                  • #10
                    The Oracle paging should look something more like this (this would get page 2 of your results at 20/page - you can add a FIRST_ROWS hint as well if you want to get really fancy):

                    Code:
                    SELECT * FROM (SELECT ROWNUM as rn, e.* from (select E.JOB_EXECUTION_ID AS SORT_KEY FROM BATCH_JOB_EXECUTION E, BATCH_JOB_INSTANCE I WHERE E.JOB_INSTANCE_ID=I.JOB_INSTANCE_ID ORDER BY E.JOB_EXECUTION_ID DESC) e where rownum <= 40 ) where rn > 20;
                    Regarding the rendering on the Jobs list page, there's not enough jobs defined in the sample to create more than a page worth of data so I wasn't able to test that scenario. I'll see if I can experiment with the sample db to get similar effects.

                    Comment


                    • #11
                      The queries that you posted form the log weren't trying to do that though. The first one (the job execution) just has "where ROWNUM=20" - it only wants one record. The second has "where ROWNUM<=1000" (just the first 1000). They still look OK to me (but I still can't test them properly).

                      Comment


                      • #12
                        Sorry, yes, you are right. It is still incorrectly done even to return a single row. Rownum doesn't work as it's being used (it assigns the row numbers to the results themselves so you can't actually ask for rownum = 50 - unless you include rownum in the inner query). You can compare rownum, however as it'll check that as it's building results. It makes sense if you think about it (however obtuse) - it will make the rownum test (in the absolute case rownum = 50) and it will fail, hence you'll never get/generate any rows (if you use absolute). However, if you use <= some number, it'll succeed until it tries to generate a row past your range.

                        The problem query again:
                        Code:
                        SELECT * FROM (SELECT E.JOB_EXECUTION_ID AS SORT_KEY FROM BATCH_JOB_EXECUTION E, BATCH_JOB_INSTANCE I WHERE E.JOB_INSTANCE_ID=I.JOB_INSTANCE_ID ORDER BY E.JOB_EXECUTION_ID DESC) where rownum = 20;
                        One possible fix (include rownum in the inner query):
                        Code:
                        SELECT SORT_KEY FROM (SELECT E.JOB_EXECUTION_ID AS SORT_KEY, rownum rn FROM BATCH_JOB_EXECUTION E, BATCH_JOB_INSTANCE I WHERE E.JOB_INSTANCE_ID=I.JOB_INSTANCE_ID and rownum <= 20 ORDER BY E.JOB_EXECUTION_ID DESC) WHERE rn = 20;
                        Option 2 - Use min() over over the results to snag the sort key:
                        Code:
                         SELECT min(sort_key)
                          FROM (select E.JOB_EXECUTION_ID AS SORT_KEY FROM BATCH_JOB_EXECUTION E, BATCH_JOB_INSTANCE I 
                        WHERE E.JOB_INSTANCE_ID=I.JOB_INSTANCE_ID ORDER BY E.JOB_EXECUTION_ID DESC)  
                         WHERE ROWNUM <= 20;
                        Last edited by sams; Mar 12th, 2010, 05:19 PM. Reason: clarify rownum function

                        Comment


                        • #13
                          I had to do some damage to the OraclePagingQueryProvider class to fix this - luckily the admin code is using the factory directly so I could circumvent that and just create my hacked Oracle paging provider. The rownum fix was slightly more involved since Oracle will generate rownums then sort. Here's the query I ended up with to fix the job execution paging:

                          Code:
                           SELECT SORT_KEY FROM 
                             (SELECT a.*, rownum rn 
                               from (select E.JOB_EXECUTION_ID AS SORT_KEY FROM BATCH_JOB_EXECUTION E, BATCH_JOB_INSTANCE I 
                               WHERE E.JOB_INSTANCE_ID=I.JOB_INSTANCE_ID ORDER BY E.JOB_EXECUTION_ID DESC) a) WHERE rn = 20;
                          My hack to the OraclePagingQueryProvider to get this sql was quite bad (since I tried to use the SqlPagingQueryUtils... you can only imagine). I still have the other two issues, but I believe they're both freemarker template issues. I will see if I can get to the bottom of it.

                          Comment


                          • #14
                            I fixed the two template issues. I've never used Freemarker, so I just did my best to hack it as well. The first problem was in execution.ftl. The exitDescription is normally null (so it seems) on this path: stepExecutionInfo.stepExecution.exitStatus.exitDes cription so I just changed it to use the toString of exitStatus which includes the exitDescription if it exists (line 84):

                            ${stepExecutionInfo.stepExecution.exitStatus}

                            vs.

                            ${stepExecutionInfo.stepExecution.exitStatus.exitD escription}

                            The output ends up looking like this, which is fine for my purposes:
                            Exit Message exitCode=COMPLETED;exitDescription=null

                            The other issue was in jobs.ftl. It was using a variable defined in the rows loop to manufacture the link for the next/previous. That link included the job name. I modified it to make a new url (line 33) that was just to the /jobs resource (once again, no Freemarker skills so there's probably a better way to do this!):

                            Code:
                            <ul class="controlLinks">
                               <#assign base_job_url><@spring.url relativeUrl="${servletPath}/jobs"/></#assign>
                               <li>Rows: ${startJob}-${endJob} of ${totalJobs}</li> 
                               <#if nextJob??><li><a href="${base_job_url}?startJob=${nextJob}&pageSize=${pageSize!20}">Next</a></li></#if>
                               <#if previousJob??><li><a href="${base_job_url}?startJob=${previousJob}&pageSize=${pageSize!20}">Previous</a></li></#if>
                               <li>Page Size: ${pageSize!20}</li>
                            </ul>
                            Last edited by sams; Mar 15th, 2010, 03:43 PM. Reason: fix code markup

                            Comment


                            • #15
                              Originally posted by sams View Post
                              The first problem was in execution.ftl. The exitDescription is normally null (so it seems) on this path: stepExecutionInfo.stepExecution.exitStatus.exitDes cription
                              That's an Oracle problem too (empty strings come back from the JDBC driver as null). We will fix it some other way.

                              The other issue was in jobs.ftl. It was using a variable defined in the rows loop to manufacture the link for the next/previous. That link included the job name.
                              Nice catch, thanks. I don't think I ever had more than 20 jobs in a test.

                              I'll also have alook at the ROWNUM queries. Can you raise a JIRA for that, and then you will know when it is fixed?

                              Comment

                              Working...
                              X