One Star

Error on Deployment in TAC

I tested a change in TIS and it was successful. The same change was needed in four jobs. Made the changes then went to TAC so that I could generate the jobs again and then deploy. All for generated fine. Once the status was "Ready to Deploy", I clicked deploy on the first job and received a message that an unexpected error occurred. All the other jobs deployed fine. I am now stuck with a job that says "Requesting Deployment" as the status. I need to "unlock" that and get the job generated and deployed. When I try to do anything on this job, it can't because TAC thinks it is still trying to deploy. How do I get this unstuck???
Here is the log:
!!!Cannot flush and commit transaction.!!!
org.talend.administrator.common.persistence.hibernate.HibernateTransactionHolder.commitWithFlush(HibernateTransactionHolder.java:116)
org.talend.administrator.common.persistence.hibernate.HibernateTransactionHolder.commitWithFlushAndBeginNewTransaction(HibernateTransactionHolder.java:190)
org.talend.administrator.scheduler.business.job.deploy.VirtualServerJobDeployer.sendAndDeploy(VirtualServerJobDeployer.java:110)
org.talend.administrator.scheduler.business.job.deploy.JobServerJobDeployerCached.sendAndDeploy(JobServerJobDeployerCached.java:44)
org.talend.administrator.scheduler.business.ExecutionTaskHandler.deployJobUnit(ExecutionTaskHandler.java:587)
org.talend.administrator.scheduler.business.ExecutionTaskHandler$2.run(ExecutionTaskHandler.java:445)
Caused by: Batch update returned unexpected row count from update ; actual row count: 0; expected: 1
org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched(Expectations.java:61)
org.hibernate.jdbc.Expectations$BasicExpectation.verifyOutcome(Expectations.java:46)
org.hibernate.jdbc.BatchingBatcher.checkRowCounts(BatchingBatcher.java:68)
org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)
org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:242)
org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:235)
org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:140)
org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
org.talend.administrator.common.persistence.hibernate.HibernateTransactionHolder.commitWithFlush(HibernateTransactionHolder.java:108)
org.talend.administrator.common.persistence.hibernate.HibernateTransactionHolder.commitWithFlushAndBeginNewTransaction(HibernateTransactionHolder.java:190)
org.talend.administrator.scheduler.business.job.deploy.VirtualServerJobDeployer.sendAndDeploy(VirtualServerJobDeployer.java:110)
org.talend.administrator.scheduler.business.job.deploy.JobServerJobDeployerCached.sendAndDeploy(JobServerJobDeployerCached.java:44)
org.talend.administrator.scheduler.business.ExecutionTaskHandler.deployJobUnit(ExecutionTaskHandler.java:587)
org.talend.administrator.scheduler.business.ExecutionTaskHandler$2.run(ExecutionTaskHandler.java:445)
3 REPLIES
Seventeen Stars

Re: Error on Deployment in TAC

Yes sometimes this happens, I know this problem but I was not able so far to find the trigger.
OK lets solve your problem:
Open the TAC database in a SQL tool. You find your task in the table executiontasks. You will find your task by the column label.
The state is a text field status change the content to READY_TO_DEPLOY and the column processingstate to 0
This way you unlock your task. I would recommend to open a enterprise ticket if this happens again.
Next: I would recommend NOT using the suggested H2SQL database because this is a file embedded database. I would suggest using a dedicated MySQL database for the TAC.
One Star

Re: Error on Deployment in TAC

Thank you for your response. We do use MySQL for our TAC database so hopefully, your solution will work for me. Incidentally, this is not the first occurrance so I did just open a ticket this morning to hopefully try and get it fixed for good.
Thanks again.
One Star

Re: Error on Deployment in TAC

A follow up. I found the task in the table you mentioned. I had to update three columns in that table for that task.
status = 'READY_TO_RUN'
errorstatus= 'NO_ERROR'
processingstate = FALSE
By resetting these three columns for the task in question, I was able to regenerate and delploy successfully!! The job us running as I type.
Thanks again!!!