Results 1 to 8 of 8

Thread: Is it possible to add two more columns to the batch_job_execution table?

  1. #1
    Join Date
    Jan 2008
    Posts
    21

    Default Is it possible to add two more columns to the batch_job_execution table?

    I am scheduling batch jobs dynamically from web page using quartz scheduler Api.Whatever batch job schedule information user entered into the web page..I am storing to a table called batch_schedule(which has id and version on it with some other scheduling information) in the database and using quartz scheduler to schedule it.When it's executing the job it's entering information into Batch_Job_Execution.Upto that point everything is fine.

    To that Batch_Job_Execution we would like to add 2 more columns(id,version) so that we can easily map that table to batch_schedule.

    I have batch_job_execution table in my oracle database..so adding 2 more columns is not a big deal.

    But how can I change the Spring batch execution hibernate mapping xml files and dao classes in such a way that it should include these 2 columns dynamically whenever it's entering values into batch_job_execution table.
    And if I can do that will I need to make changes to any other classes too.

    Your early response would be much appreciated.

  2. #2
    Join Date
    Dec 2006
    Posts
    1,061

    Default

    What version of the framework are you using?

    Since m4 Job Parameters have been used for just this scenario.

  3. #3
    Join Date
    Jan 2008
    Posts
    21

    Default Is it possible to add two more columns to the batch_job_execution table?

    Using m3.So will that be possible?

    is it easy to upgrade to m4?

  4. #4
    Join Date
    Dec 2006
    Posts
    1,061

    Default

    It is possible in M4, using JobParameters. There is a migration guide on the website for moving from m3 to m4.

  5. #5
    Join Date
    Jan 2008
    Posts
    21

    Default Is it possible to add two more columns to the batch_job_execution table?

    I converted everything Spring Framework m4 from m3.My jdk is 1.4.,So I am getting the following error when I am trying to execute my job.

    java.lang.NoClassDefFoundError: java/lang/StringBuilder
    at org.springframework.batch.execution.repository.dao .JdbcJobDao.createJobKey(JdbcJobDao.java:142)
    at org.springframework.batch.execution.repository.dao .JdbcJobDao.findJobInstances(JdbcJobDao.java:197)
    at org.springframework.batch.execution.repository.Sim pleJobRepository.createJobExecution(SimpleJobRepos itory.java:156)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.springframework.aop.support.AopUtils.invokeJoi npointUsingReflection(AopUtils.java:301)
    at org.springframework.aop.framework.ReflectiveMethod Invocation.invokeJoinpoint(ReflectiveMethodInvocat ion.java:182)
    at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :149)
    at org.springframework.transaction.interceptor.Transa ctionInterceptor.invoke(TransactionInterceptor.jav a:106)
    at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :171)
    at org.springframework.aop.interceptor.ExposeInvocati onInterceptor.invoke(ExposeInvocationInterceptor.j ava:89)
    at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :171)
    at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:204)
    at $Proxy0.createJobExecution(Unknown Source)
    at org.springframework.batch.execution.launch.SimpleJ obLauncher.run(SimpleJobLauncher.java:78)
    at gov.ed.app.ats.batch.launch.DailyCountsJob.execute (DailyCountsJob.java:79)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:2 02)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run (SimpleThreadPool.java:529)
    2008-02-27 13:40:05,375 ERROR [org.quartz.core.ErrorLogger] - <Job (group1.testing threw an exception.>
    org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: java.lang.NoClassDefFoundError: java/lang/StringBuilder]
    at org.quartz.core.JobRunShell.run(JobRunShell.java:2 13)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run (SimpleThreadPool.java:529)
    Caused by: java.lang.NoClassDefFoundError: java/lang/StringBuilder
    at org.springframework.batch.execution.repository.dao .JdbcJobDao.createJobKey(JdbcJobDao.java:142)
    at org.springframework.batch.execution.repository.dao .JdbcJobDao.findJobInstances(JdbcJobDao.java:197)
    at org.springframework.batch.execution.repository.Sim pleJobRepository.createJobExecution(SimpleJobRepos itory.java:156)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.springframework.aop.support.AopUtils.invokeJoi npointUsingReflection(AopUtils.java:301)
    at org.springframework.aop.framework.ReflectiveMethod Invocation.invokeJoinpoint(ReflectiveMethodInvocat ion.java:182)
    at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :149)
    at org.springframework.transaction.interceptor.Transa ctionInterceptor.invoke(TransactionInterceptor.jav a:106)
    at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :171)
    at org.springframework.aop.interceptor.ExposeInvocati onInterceptor.invoke(ExposeInvocationInterceptor.j ava:89)
    at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :171)
    at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:204)
    at $Proxy0.createJobExecution(Unknown Source)
    at org.springframework.batch.execution.launch.SimpleJ obLauncher.run(SimpleJobLauncher.java:78)
    at gov.ed.app.ats.batch.launch.DailyCountsJob.execute (DailyCountsJob.java:79)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:2 02)
    ... 1 more
    Last edited by arunaalluri; Feb 27th, 2008 at 02:04 PM.

  6. #6
    Join Date
    Dec 2006
    Posts
    1,061

    Default

    Are you using our jars or compiling yourself?

  7. #7
    Join Date
    Jan 2008
    Posts
    21

    Default Is it possible to add two more columns to the batch_job_execution table?

    using your jars

  8. #8
    Join Date
    Sep 2005
    Location
    Hong Kong, China
    Posts
    33

    Default

    "java/lang/StringBuilder" is available in 1.5 or above

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •