NameNotFoundException 未找到异常

NameNotFoundException not found exception

此问题与 IBM BPM Advanced 8.0 有关

我创建了 Toolkit ODM Binbank Toolkit。该工具包包含高级集成服务。 AIS 的名称是 IServiceBR001ACT。

然后我将此工具包附加到应用程序 "Collection",简称 ACOA,并创建了进程 TestRule,我只在其中调用 AIS IServiceBR001ACT。

然后我得到了异常。

---Error mssage: 
javax.naming.ServiceUnavailableException: No synchronous endpoints are available for targeted SCA export/service: BIN_Collection_Toolkit_Implementation/IServiceBR001ACT [Root exception is javax.naming.NameNotFoundException: Context: sme-devNode04Cell/nodes/sme-devNode04/servers/server1, name: sca/ACOA-Tip-BIN_Collection_Toolkit_Implementation/export/IServiceBR001ACT: First component in name ACOA-Tip-BIN_Collection_Toolkit_Implementation/export/IServiceBR001ACT not found. [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]]
---Error details: 
Process ID:         Ref[65a79c75-9416-4204-aba4-299fb2366892/TWProcess.1d714b6a-6dd4-4fba-bab2-98f04dc01444]
Process GUID:       guid:e51c9c5cfb9fe587:-3ed7be13:14f73fee28e:-3528
Error timestamp:    Sep 4, 2015 1:00:00 AM
Instance ID:        BPDInstance.14274
Task ID:            Task.41016
Root snapshot ID:   null
Snapshot ID:    Snapshot.3d4f3c6e-c02b-4cae-be92-851d62ffdc18
Branch ID:  null

---Error stack trace: 

TestRule(Rule)@Snapshot.3d4f3c6e-c02b-4cae-be92-851d62ffdc18(tip)/BPD.bea9811b-01ac-49eb-af6d-b9732624f9bb  
IServiceBR001ACT@Snapshot.0011b736-a14b-4bec-8db6-9f0ced5e3208/TWProcess.1d714b6a-6dd4-4fba-bab2-98f04dc01444   
---Java stack trace: 
com.lombardisoftware.component.common.workflow.WorkflowProcessItemException: javax.naming.ServiceUnavailableException: No synchronous endpoints are available for targeted SCA export/service: BIN_Collection_Toolkit_Implementation/IServiceBR001ACT [Root exception is javax.naming.NameNotFoundException: Context: sme-devNode04Cell/nodes/sme-devNode04/servers/server1, name: sca/ACOA-Tip-BIN_Collection_Toolkit_Implementation/export/IServiceBR001ACT: First component in name ACOA-Tip-BIN_Collection_Toolkit_Implementation/export/IServiceBR001ACT not found. [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]]
    at com.lombardisoftware.component.common.workflow.ExecutionJob.doJob(ExecutionJob.java:421)
    at com.lombardisoftware.server.ejb.workflow.EJBWorkflowManagerBean.doResumeWorkflowEngine(EJBWorkflowManagerBean.java:1236)
    at com.lombardisoftware.server.ejb.workflow.EJBWorkflowManagerBean.resumeTask(EJBWorkflowManagerBean.java:347)
    at com.lombardisoftware.server.ejb.workflow.EJBWorkflowManagerBean.resumeTask(EJBWorkflowManagerBean.java:311)
    at com.lombardisoftware.server.ejb.workflow.EJSRemoteStatefulEJBWorkflowManager_82478d70.resumeTask(Unknown Source)
    at com.lombardisoftware.server.ejb.workflow._EJBWorkflowManagerInterface_Stub.resumeTask(_EJBWorkflowManagerInterface_Stub.java:287)
    at com.lombardisoftware.component.common.workflow.EJBWorkflowManagerDelegateDefault.resumeTask(EJBWorkflowManagerDelegateDefault.java:94)
    at com.lombardisoftware.component.common.workflow.EJBWorkflowManagerDelegateWebSphere.run(EJBWorkflowManagerDelegateWebSphere.java:68)
    at java.security.AccessController.doPrivileged(AccessController.java:327)
    at com.lombardisoftware.client.delegate.common.WebsphereDelegateHelper.doAsCurrentSubjectContextSensitive(WebsphereDelegateHelper.java:197)
    at com.lombardisoftware.client.delegate.common.WebsphereDelegateHelper.doAsCurrentSubjectContextSensitive(WebsphereDelegateHelper.java:181)
    at com.lombardisoftware.component.common.workflow.EJBWorkflowManagerDelegateWebSphere.resumeTask(EJBWorkflowManagerDelegateWebSphere.java:66)
    at com.lombardisoftware.bpd.runtime.engine.quartz.ExecuteSystemLaneActivityTask.run(ExecuteSystemLaneActivityTask.java:70)
    at java.security.AccessController.doPrivileged(AccessController.java:362)
    at javax.security.auth.Subject.doAs(Subject.java:573)
    at com.ibm.websphere.security.auth.WSSubject.doAs(WSSubject.java:195)
    at com.ibm.websphere.security.auth.WSSubject.doAs(WSSubject.java:152)
    at com.lombardisoftware.client.delegate.common.WebsphereDelegateHelper.doAs(WebsphereDelegateHelper.java:172)
    at com.lombardisoftware.client.delegate.common.WebsphereDelegateHelper.run(WebsphereDelegateHelper.java:139)
    at java.security.AccessController.doPrivileged(AccessController.java:327)
    at com.lombardisoftware.client.delegate.common.WebsphereDelegateHelper.doAs(WebsphereDelegateHelper.java:134)
    at com.lombardisoftware.bpd.runtime.engine.quartz.ExecuteSystemLaneActivityTask.execute(ExecuteSystemLaneActivityTask.java:89)
    at com.lombardisoftware.server.scheduler.Engine.execute(Engine.java:796)
    at com.lombardisoftware.server.scheduler.Engine.access0(Engine.java:78)
    at com.lombardisoftware.server.scheduler.Engine.run(Engine.java:503)
    at com.lombardisoftware.client.delegate.common.WebsphereDelegateHelper.run(WebsphereDelegateHelper.java:100)
    at java.security.AccessController.doPrivileged(AccessController.java:362)
    at javax.security.auth.Subject.doAs(Subject.java:573)
    at com.ibm.websphere.security.auth.WSSubject.doAs(WSSubject.java:195)
    at com.ibm.websphere.security.auth.WSSubject.doAs(WSSubject.java:152)
    at com.lombardisoftware.client.delegate.common.WebsphereDelegateHelper.doAs(WebsphereDelegateHelper.java:172)
    at com.lombardisoftware.client.delegate.common.WebsphereDelegateHelper.run(WebsphereDelegateHelper.java:96)
    at com.lombardisoftware.server.scheduler.Utils$EJBThreadRootRunnable.executeRunnable(Utils.java:113)
    at com.lombardisoftware.server.scheduler.ThreadPool$Worker.run(ThreadPool.java:194)
    at java.lang.Thread.run(Thread.java:784)
Caused by: java.lang.RuntimeException: javax.naming.ServiceUnavailableException: No synchronous endpoints are available for targeted SCA export/service: BIN_Collection_Toolkit_Implementation/IServiceBR001ACT [Root exception is javax.naming.NameNotFoundException: Context: sme-devNode04Cell/nodes/sme-devNode04/servers/server1, name: sca/ACOA-Tip-BIN_Collection_Toolkit_Implementation/export/IServiceBR001ACT: First component in name ACOA-Tip-BIN_Collection_Toolkit_Implementation/export/IServiceBR001ACT not found. [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]]
    at com.lombardisoftware.component.scaconnector.worker.SCAConnectorWorker.call(SCAConnectorWorker.java:253)
    at com.lombardisoftware.component.scaconnector.worker.SCAConnectorWorker.call(SCAConnectorWorker.java:228)
    at com.lombardisoftware.utility.spring.ProgrammaticTransactionSupport.doInTransaction(ProgrammaticTransactionSupport.java:409)
    at org.springframework.transaction.jta.WebSphereUowTransactionManager$UOWActionAdapter.run(WebSphereUowTransactionManager.java:306)
    at com.ibm.ws.uow.EmbeddableUOWManagerImpl.runUnderNewUOW(EmbeddableUOWManagerImpl.java:787)
    at com.ibm.ws.uow.EmbeddableUOWManagerImpl.runUnderUOW(EmbeddableUOWManagerImpl.java:366)
    at org.springframework.transaction.jta.WebSphereUowTransactionManager.execute(WebSphereUowTransactionManager.java:252)
    at com.lombardisoftware.utility.spring.ProgrammaticTransactionSupport.executeInNewTransaction(ProgrammaticTransactionSupport.java:404)
    at com.lombardisoftware.utility.spring.ProgrammaticTransactionSupport.execute(ProgrammaticTransactionSupport.java:267)
    at com.lombardisoftware.utility.spring.ProgrammaticTransactionSupport.execute(ProgrammaticTransactionSupport.java:198)
    at com.lombardisoftware.component.scaconnector.worker.SCAConnectorWorker.doJobProcessRequest(SCAConnectorWorker.java:228)
    at com.lombardisoftware.component.scaconnector.worker.SCAConnectorWorker.doJob(SCAConnectorWorker.java:104)
    at com.lombardisoftware.component.common.workflow.ExecutionJob.doJob(ExecutionJob.java:409)
    ... 34 more
Caused by: javax.naming.ServiceUnavailableException: No synchronous endpoints are available for targeted SCA export/service: BIN_Collection_Toolkit_Implementation/IServiceBR001ACT [Root exception is javax.naming.NameNotFoundException: Context: sme-devNode04Cell/nodes/sme-devNode04/servers/server1, name: sca/ACOA-Tip-BIN_Collection_Toolkit_Implementation/export/IServiceBR001ACT: First component in name ACOA-Tip-BIN_Collection_Toolkit_Implementation/export/IServiceBR001ACT not found. [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]]
    at com.lombardisoftware.component.scaconnector.worker.SCAConnectorWorker.call(SCAConnectorWorker.java:250)
    ... 46 more
Caused by: javax.naming.NameNotFoundException: Context: sme-devNode04Cell/nodes/sme-devNode04/servers/server1, name: sca/ACOA-Tip-BIN_Collection_Toolkit_Implementation/export/IServiceBR001ACT: First component in name ACOA-Tip-BIN_Collection_Toolkit_Implementation/export/IServiceBR001ACT not found. [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]
    at com.ibm.ws.naming.jndicos.CNContextImpl.mapNotFoundException(CNContextImpl.java:4564)
    at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1822)
    at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1777)
    at com.ibm.ws.naming.jndicos.CNContextImpl.lookupExt(CNContextImpl.java:1434)
    at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:616)
    at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:165)
    at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:179)
    at org.apache.aries.jndi.DelegateContext.lookup(DelegateContext.java:161)
    at javax.naming.InitialContext.lookup(InitialContext.java:436)
    at com.ibm.ws.soa.sca.oasis.binding.sca.SCAReferenceBindingInvoker.doInvoke(SCAReferenceBindingInvoker.java:108)
    at com.ibm.ws.soa.sca.oasis.binding.sca.SCAReferenceBindingInvoker.invoke(SCAReferenceBindingInvoker.java:85)
    at org.apache.tuscany.sca.core.invocation.InterceptorAsyncImpl.invoke(InterceptorAsyncImpl.java:58)
    at org.apache.tuscany.sca.core.invocation.InterceptorAsyncImpl.invoke(InterceptorAsyncImpl.java:58)
    at org.apache.tuscany.sca.core.invocation.InterceptorAsyncImpl.invoke(InterceptorAsyncImpl.java:58)
    at org.apache.tuscany.sca.core.invocation.RuntimeInvoker.invoke(RuntimeInvoker.java:125)
    at org.apache.tuscany.sca.core.invocation.RuntimeInvoker.invoke(RuntimeInvoker.java:108)
    at org.apache.tuscany.sca.core.invocation.RuntimeInvoker.invoke(RuntimeInvoker.java:91)
    at org.apache.tuscany.sca.core.assembly.impl.RuntimeEndpointReferenceImpl.invoke(RuntimeEndpointReferenceImpl.java:238)
    at com.ibm.bpm.sca.core.ReferenceInvoker.invokeCompleteMessage(ReferenceInvoker.java:87)
    at com.lombardisoftware.component.scaconnector.worker.SCAConnectorWorker.call(SCAConnectorWorker.java:234)
    ... 46 more
Caused by: org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0
    at com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.handleNameNotFound(WsnOptimizedNamingImpl.java:2483)
    at com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.getNextWsnOptimizedNamingContext(WsnOptimizedNamingImpl.java:1254)
    at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase.run(WsnOptimizedNamingImplBase.java:4623)
    at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase.run(WsnOptimizedNamingImplBase.java:4618)
    at com.ibm.ws.naming.util.CommonHelpers.retry(CommonHelpers.java:871)
    at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase.getTargetContext(WsnOptimizedNamingImplBase.java:4617)
    at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase$LeafOperationData.<init>(WsnOptimizedNamingImplBase.java:5229)
    at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase.resolve_complete_info(WsnOptimizedNamingImplBase.java:2160)
    at com.ibm.WsnOptimizedNaming._NamingContextStub.resolve_complete_info(_NamingContextStub.java:538)
    at com.ibm.ws.naming.jndicos.CNContextImpl.run(CNContextImpl.java:2958)
    at com.ibm.ws.naming.jndicos.CNContextImpl.run(CNContextImpl.java:2954)
    at com.ibm.ws.naming.util.CommonHelpers.retry(CommonHelpers.java:871)
    at com.ibm.ws.naming.jndicos.CNContextImpl.cosResolve(CNContextImpl.java:2952)
    at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1818)
    ... 64 more

我查看了websphere,发现这里没有创建正确命名的sca组件。

如何解决这个问题?

我应该用 toolkit 做些什么还是应该在应用程序内部正确指向 toolkit?

这只是 IBM BPM 中的错误。 我刚刚删除并连接回工具包。 一切正常。

也可能是该错误的另一个原因。

当我们有项目 ExampleProject 依赖于工具包 AB

and 两个工具包 AB 都依赖于另一个工具包 C,但是它们取决于不同的快照版本。

在那种情况下,websphere 尝试部署快照,但无法执行此操作并显示错误代码。

Caused by: com.ibm.bpm.fds.common.FDSException: Failed to process contribution dependency, ctrbDependencyId(false) = ContributionDependency.c63331fb-84a3-4207-9765-264e4ff4891b, libraryName(false) = CONSOLE_Business_Object_Toolkit_Library, contributionId(false) = Contribution.c1abb10c-334e-4e24-b581-680481515246, contributionRef(false) = null, deployWith(false) = true, guid(false) = guid:146778b866395858:-7560582:141a6a84e9b:-4ff5, versionId(false) = 6b739dd4-a735-4b8d-8647-c4118c3fe8d3, lastModified(false) = 2013-10-18 12:50:26.0, lastModifiedByUserId(false) = User.9, state = RECORD_STATE_UP_TO_DATE, saveSyncId = null
at com.ibm.bpm.fds.repo.adapter.JavaAdapter.processContributionDependencies(JavaAdapter.java:527)
at com.ibm.bpm.fds.repo.adapter.JavaAdapter.processContribution(JavaAdapter.java:341)
at com.ibm.bpm.fds.repo.adapter.JavaAdapter.processContributionDependencies(JavaAdapter.java:515)
at com.ibm.bpm.fds.repo.adapter.JavaAdapter.processContribution(JavaAdapter.java:341)
at com.ibm.bpm.fds.repo.adapter.JavaAdapter.buildDependencyTree(JavaAdapter.java:226)
… 16 more
Caused by: com.lombardisoftware.core.TeamWorksException: There are 3 contributions called CONSOLE_Business_Object_Toolkit_Library. Please fix the dependency tree from Console so that there is only 1.
at com.lombardisoftware.client.persistence.ContributionFactory.getContributionByName(ContributionFactory.java:188)
at com.lombardisoftware.client.persistence.ContributionFactory.getContributionByName(ContributionFactory.java:166)
at com.ibm.bpm.fds.repo.adapter.JavaAdapter.processContributionDependencies(JavaAdapter.java:495)
… 20 more

mode 详细描述这里 https://bpmtricks.wordpress.com/2013/11/04/toolkit-version-problem/