[jboss-user] [jBPM] - Deployment error on redeploy

Jaber C. Mourad do-not-reply at jboss.com
Tue Feb 8 03:59:33 EST 2011


Jaber C. Mourad [http://community.jboss.org/people/newbeewan] created the discussion

"Deployment error on redeploy"

To view the discussion, visit: http://community.jboss.org/message/586123#586123

--------------------------------------------------------------
Hi,

I'm trying to redeploy some processes definitions (jbpm4.4). the documentation is not clear about that the code is hidden by calling 

I'm deploying process definition like that :

NewDeployment deployment = repositoryService.createDeployment();
for (Resource resource : resources) {
    logger.debug("deploying {}", resource.getFilename());
    deployment.addResourceFromInputStream(resource.getFilename(), resource.getInputStream());
    Resource imageResource = resourceHelper.getResource(resource.getURL().toString().replace(".jpdl.xml", ".png"));
    logger.trace("image file {}", imageResource.getURL().getPath());
    if (imageResource.exists()) {
       deployment.addResourceFromInputStream(imageResource.getFilename(),
                                                imageResource.getInputStream());
    }
}
try {
    String deploymentId = deployment.deploy();
    logger.info("jbpm deployement done for deployementID {}", deploymentId);
} catch (JbpmException e) {
    logger.warn("processes not deployed", e);
}


It works well for the first deployment...

But of next deployement, it failed with an hibernate NoUniqueResultException :

org.hibernate.NonUniqueResultException: query did not return a unique result: 2
        at org.hibernate.impl.AbstractQueryImpl.uniqueElement(AbstractQueryImpl.java:868)
        at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:859)
        at org.jbpm.pvm.internal.query.AbstractQuery.execute(AbstractQuery.java:93)
        at org.jbpm.pvm.internal.query.ProcessDefinitionQueryImpl.execute(ProcessDefinitionQueryImpl.java:67)
        at org.jbpm.pvm.internal.query.AbstractQuery.untypedUniqueResult(AbstractQuery.java:77)
        at org.jbpm.pvm.internal.query.ProcessDefinitionQueryImpl.uniqueResult(ProcessDefinitionQueryImpl.java:161)
        at org.jbpm.pvm.internal.repository.ProcessDeployer.checkId(ProcessDeployer.java:163)
        at org.jbpm.pvm.internal.repository.ProcessDeployer.deploy(ProcessDeployer.java:94)
        at org.jbpm.pvm.internal.repository.DeployerManager.deploy(DeployerManager.java:46)
        at org.jbpm.pvm.internal.repository.RepositorySessionImpl.deploy(RepositorySessionImpl.java:62)
        at org.jbpm.pvm.internal.cmd.DeployCmd.execute(DeployCmd.java:47)
        at org.jbpm.pvm.internal.cmd.DeployCmd.execute(DeployCmd.java:33)
        at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
        at org.jbpm.pvm.internal.tx.SpringCommandCallback.doInTransaction(SpringCommandCallback.java:45)
        at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
        at org.jbpm.pvm.internal.tx.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:49)
        at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53)
        at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)
        at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:56)
        at org.jbpm.pvm.internal.repository.DeploymentImpl.deploy(DeploymentImpl.java:90)
        ...


How to redeploy some already deployed processes ?

Regards
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/586123#586123]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110208/ef553e4c/attachment-0001.html 


More information about the jboss-user mailing list