实际上,我正在尝试将文件字段类型添加到任务表单中,用户可以在任务表单中上传任务表单中的文件。
我做了相应的程序:
1)ant clean.demo
2)添加“文件输入”:new org.jbpm.formModeler.core.fieldTypes.file.FileCustomType()tp jBPM-installer / conf / META-INF / CustomWorkItemHandlers.conf
3)将cutomFieldType.jar(包括以下https://github.com/droolsjbpm/jbpm-form-modeler/tree/master/jbpm-form-modeler-sample-custom-types/jbpm-form-modeler-custom-file-type的构建。)添加到WEB / lib
4)ant install.demo
5)ant start.demo
但不幸的是我面临部署失败 这是错误:
2015-01-23 11:52:35,578 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC000001: Failed to start service jboss.deployment.unit."jbpm-console.war".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."jbpm-console.war".WeldStartService: Failed to start service
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_67]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_67]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_67]
Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001414: Bean name is ambiguous. Name fdch resolves to beans:
- Managed Bean [class org.jbpm.formModeler.fieldTypes.document.handling.FileDownloadHandler] with qualifiers [@Default @Named @Any],
- Managed Bean [class org.jbpm.formModeler.core.fieldTypes.file.FileDownloadHandler] with qualifiers [@Default @Named @Any]
at org.jboss.weld.bootstrap.ConcurrentValidator$5.doWork(ConcurrentValidator.java:134)
at org.jboss.weld.bootstrap.ConcurrentValidator$5.doWork(ConcurrentValidator.java:130)
at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:60)
at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:53)
at java.util.concurrent.FutureTask.run(FutureTask.java:262) [rt.jar:1.7.0_67]
... 3 more
如果我错过了什么,你能帮助我吗?
答案 0 :(得分:0)
出现此问题是因为在两个不同的jar中有两个名称相同的bean(fdch)
(jbpm-form-modeler-custom-file-type.jar)和你的jar(cutomFieldType.jar)
您需要将此类的bean名称更改为另一个名称,例如(@Named(“mybean”))
或者你可以从web-inf \ ib中删除jbpm-form-modeler-custom-file-type.jar