Problemas com processamento batch + quartz
12/01/2015 09:46
11-01-2015 23:58:12,569 ERROR util.JDBCExceptionReporter - Invalid state, the Connection object is closed.
11-01-2015 23:58:12,594 ERROR listeners.ExceptionPrinterJobListener - Exception occurred in job: Importação dos dados do PSGA
org.quartz.JobExecutionException: org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: could not execute query; uncategorized SQLException for SQL [select this_.TPLUMA_COD as TPLUMA1_150_0_, this_.SCAMPOS_COD as SCAMPOS2_150_0_, this_.TCOR_COD as TCOR3_150_0_, this_.TCOR_COD_VENDA as TCOR4_150_0_, this_.DATA as DATA150_0_, this_.SFAZENDA_COD as SFAZENDA6_150_0_, this_.TROMBLO_COD as TROMBLO7_150_0_, this_.PESO_BRUTO as PESO8_150_0_, this_.SPESSPROD_COD as SPESSPROD9_150_0_, this_.THPLUMA_COD as THPLUMA10_150_0_, this_.SSAFRA_COD as SSAFRA11_150_0_, this_.SSAFRAS_COD2 as SSAFRAS12_150_0_, this_.SITUACAO as SITUACAO150_0_, this_.TTIPO_COD as TTIPO14_150_0_, this_.SVARIED_COD as SVARIED15_150_0_ from TPLUMA this_ where this_.TPLUMA_COD=?]; SQL state [HY010]; error code [0]; Invalid state, the Connection object is closed.; nested exception is java.sql.SQLException: Invalid state, the Connection object is closed. [See nested exception: org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: could not execute query; uncategorized SQLException for SQL [select this_.TPLUMA_COD as TPLUMA1_150_0_, this_.SCAMPOS_COD as SCAMPOS2_150_0_, this_.TCOR_COD as TCOR3_150_0_, this_.TCOR_COD_VENDA as TCOR4_150_0_, this_.DATA as DATA150_0_, this_.SFAZENDA_COD as SFAZENDA6_150_0_, this_.TROMBLO_COD as TROMBLO7_150_0_, this_.PESO_BRUTO as PESO8_150_0_, this_.SPESSPROD_COD as SPESSPROD9_150_0_, this_.THPLUMA_COD as THPLUMA10_150_0_, this_.SSAFRA_COD as SSAFRA11_150_0_, this_.SSAFRAS_COD2 as SSAFRAS12_150_0_, this_.SITUACAO as SITUACAO150_0_, this_.TTIPO_COD as TTIPO14_150_0_, this_.SVARIED_COD as SVARIED15_150_0_ from TPLUMA this_ where this_.TPLUMA_COD=?]; SQL state [HY010]; error code [0]; Invalid state, the Connection object is closed.; nested exception is java.sql.SQLException: Invalid state, the Connection object is closed.]
at grails.plugins.quartz.GrailsJobFactory$GrailsJob.execute(GrailsJobFactory.java:111)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
Caused by: org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: could not execute query; uncategorized SQLException for SQL [select this_.TPLUMA_COD as TPLUMA1_150_0_, this_.SCAMPOS_COD as SCAMPOS2_150_0_, this_.TCOR_COD as TCOR3_150_0_, this_.TCOR_COD_VENDA as TCOR4_150_0_, this_.DATA as DATA150_0_, this_.SFAZENDA_COD as SFAZENDA6_150_0_, this_.TROMBLO_COD as TROMBLO7_150_0_, this_.PESO_BRUTO as PESO8_150_0_, this_.SPESSPROD_COD as SPESSPROD9_150_0_, this_.THPLUMA_COD as THPLUMA10_150_0_, this_.SSAFRA_COD as SSAFRA11_150_0_, this_.SSAFRAS_COD2 as SSAFRAS12_150_0_, this_.SITUACAO as SITUACAO150_0_, this_.TTIPO_COD as TTIPO14_150_0_, this_.SVARIED_COD as SVARIED15_150_0_ from TPLUMA this_ where this_.TPLUMA_COD=?]; SQL state [HY010]; error code [0]; Invalid state, the Connection object is closed.; nested exception is java.sql.SQLException: Invalid state, the Connection object is closed.
at org.grails.datastore.gorm.GormStaticApi$_methodMissing_closure2.doCall(GormStaticApi.groovy:108)
at com.fazsaofrancisco.agritech.FardinhoService.importarDoPsga(FardinhoService.groovy:22)
at com.fazsaofrancisco.agritech.FardinhoService$_importarDoPsga_closure1.doCall(FardinhoService.groovy:14)
at com.fazsaofrancisco.agritech.FardinhoService.importarDoPsga(FardinhoService.groovy:13)
at com.fazsaofrancisco.agritech.RomaneioService$_importadoPsga_closure1.doCall(RomaneioService.groovy:39)
at com.fazsaofrancisco.agritech.RomaneioService.importadoPsga(RomaneioService.groovy:22)
at com.fazsaofrancisco.agritech.ContratoService.importarDoPsga(ContratoService.groovy:95)
at com.fazsaofrancisco.agritech.ContratoService$_importarDoPsga_closure2.doCall(ContratoService.groovy:36)
at com.fazsaofrancisco.agritech.ContratoService.importarDoPsga(ContratoService.groovy:34)
at com.fazsaofrancisco.agritech.ImportacaoPsgaJob$_execute_closure1.doCall(ImportacaoPsgaJob.groovy:28)
at org.grails.datastore.gorm.GormStaticApi.withNewTransaction(GormStaticApi.groovy:705)
at com.fazsaofrancisco.agritech.ImportacaoPsgaJob.execute(ImportacaoPsgaJob.groovy:22)
at grails.plugins.quartz.GrailsJobFactory$GrailsJob.execute(GrailsJobFactory.java:104)
dataSource_ORIGEM {
dialect = org.hibernate.dialect.SQLServerDialect
driverClassName = 'net.sourceforge.jtds.jdbc.Driver'
username = 'sa'
password = 'senha'
url = 'jdbc:jTDS:sqlserver://10.0.0.100/BANCO'
pooled = true
properties {
maxActive = -1
minEvictableIdleTimeMillis=1800000
timeBetweenEvictionRunsMillis=1800000
numTestsPerEvictionRun=3
testOnBorrow=true
testWhileIdle=true
testOnReturn=true
validationQuery="SELECT 1"
}
}
Para se registrar, clique aqui.