当我们启动集群(2 个托管服务器,1 个管理员)时,我们遇到了此异常,我们只在 weblogic 10.3 中部署了与 OBPM 10.3.1 SP1 相对应的 ear。当服务器集群启动时,其中一个托管服务器(第一个启动的服务器)会因为这个重复的错误而过载并耗尽与目录数据库的连接。看起来引擎正在尝试从 LDAP 服务器获取信息,但我不知道它为什么会构建错误的查询。
fuego.directory.DirectoryRuntimeException: Exception [javax.naming.InvalidNameException: CN=Alvarez Guerrero Bernardo
DEL:ca9ef28d-3b94-4e8f-a6bd-8c880bb3791b,CN=Deleted Objects,DC=corp: [LDAP: error code 34 - 0000208F: NameErr: DSID-031001BA, problem 2006 (BAD_NAME), data 8349, best match of:
'CN=Alvarez Guerrero Bernardo
DEL:ca9ef28d-3b94-4e8f-a6bd-8c880bb3791b,CN=Deleted Objects,DC=corp,dc=televisa,dc=com,dc=mx'
^@]; remaining name 'CN=Alvarez Guerrero Bernardo
DEL:ca9ef28d-3b94-4e8f-a6bd-8c880bb3791b,CN=Deleted Objects,DC=corp'].
at fuego.directory.DirectoryRuntimeException.wrapException(DirectoryRuntimeException.java:85)
at fuego.directory.hybrid.ldap.JNDIQueryExecutor.selectById(JNDIQueryExecutor.java:163)
at fuego.directory.hybrid.ldap.JNDIQueryExecutor.selectById(JNDIQueryExecutor.java:110)
at fuego.directory.hybrid.ldap.Repository.selectById(Repository.java:38)
at fuego.directory.hybrid.msad.MSADGroupValueProvider.getAssignedParticipantsInternal(MSADGroupValueProvider.java:124)
at fuego.directory.hybrid.msad.MSADGroupValueProvider.getAssignedParticipants(MSADGroupValueProvider.java:70)
at fuego.directory.hybrid.ldap.Group$7.getValue(Group.java:149)
at fuego.directory.hybrid.ldap.Group$7.getValue(Group.java:152)
at fuego.directory.hybrid.ldap.LDAPResult.getValue(LDAPResult.java:76)
at fuego.directory.hybrid.ldap.LDAPOrganizationGroupAccessor.setInfo(LDAPOrganizationGroupAccessor.java:352)
at fuego.directory.hybrid.ldap.LDAPOrganizationGroupAccessor.build(LDAPOrganizationGroupAccessor.java:121)
at fuego.directory.hybrid.ldap.LDAPOrganizationGroupAccessor.build(LDAPOrganizationGroupAccessor.java:114)
at fuego.directory.hybrid.ldap.LDAPOrganizationGroupAccessor.fetchGroup(LDAPOrganizationGroupAccessor.java:94)
at fuego.directory.hybrid.HybridGroupAccessor.fetchGroup(HybridGroupAccessor.java:146)
at sun.reflect.GeneratedMethodAccessor66.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at fuego.directory.provider.DirectorySessionImpl$AccessorProxy.invoke(DirectorySessionImpl.java:756)
at $Proxy66.fetchGroup(Unknown Source)
at fuego.directory.DirOrganizationalGroup.fetch(DirOrganizationalGroup.java:275)
at fuego.metadata.GroupManager.loadGroup(GroupManager.java:225)
at fuego.metadata.GroupManager.find(GroupManager.java:57)
at fuego.metadata.ParticipantManager.addNestedGroups(ParticipantManager.java:621)
at fuego.metadata.ParticipantManager.buildCompleteRoleAssignments(ParticipantManager.java:527)
at fuego.metadata.Participant$RoleTransitiveClousure.build(Participant.java:760)
at fuego.metadata.Participant$RoleTransitiveClousure.access$100(Participant.java:692)
at fuego.metadata.Participant.buildRoles(Participant.java:401)
at fuego.metadata.Participant.updateMembers(Participant.java:372)
at fuego.metadata.Participant.<init>(Participant.java:64)
at fuego.metadata.Participant.createUncacheParticipant(Participant.java:84)
at fuego.server.persistence.jdbc.JdbcProcessInstancePersMgr.loadItems(JdbcProcessInstancePersMgr.java:1706)
at fuego.server.persistence.Persistence.loadInstanceItems(Persistence.java:838)
at fuego.server.AbstractInstanceService.readInstance(AbstractInstanceService.java:791)
at fuego.ejbengine.EJBInstanceService.getLockedROImpl(EJBInstanceService.java:218)
at fuego.server.AbstractInstanceService.getLockedROImpl(AbstractInstanceService.java:892)
at fuego.server.AbstractInstanceService.getLockedImpl(AbstractInstanceService.java:743)
at fuego.server.AbstractInstanceService.getLockedImpl(AbstractInstanceService.java:730)
at fuego.server.AbstractInstanceService.getLocked(AbstractInstanceService.java:144)
at fuego.server.AbstractInstanceService.getLocked(AbstractInstanceService.java:162)
at fuego.server.AbstractInstanceService.unselectAllItems(AbstractInstanceService.java:454)
at fuego.server.execution.ToDoItemUnselect.execute(ToDoItemUnselect.java:105)
at fuego.server.execution.DefaultEngineExecution$AtomicExecutionTA.runTransaction(DefaultEngineExecution.java:304)
at fuego.transaction.TransactionAction.startNestedTransaction(TransactionAction.java:527)
at fuego.transaction.TransactionAction.startTransaction(TransactionAction.java:548)
at fuego.transaction.TransactionAction.start(TransactionAction.java:212)
at fuego.server.execution.DefaultEngineExecution.executeImmediate(DefaultEngineExecution.java:123)
at fuego.server.execution.DefaultEngineExecution.executeAutomaticWork(DefaultEngineExecution.java:62)
at fuego.server.execution.EngineExecution.executeAutomaticWork(EngineExecution.java:42)
at fuego.server.execution.ToDoItem.executeAutomaticWork(ToDoItem.java:261)
at fuego.ejbengine.ItemExecutionBean$1.execute(ItemExecutionBean.java:223)
at fuego.server.execution.DefaultEngineExecution$AtomicExecutionTA.runTransaction(DefaultEngineExecution.java:304)
at fuego.transaction.TransactionAction.startBaseTransaction(TransactionAction.java:470)
at fuego.transaction.TransactionAction.startTransaction(TransactionAction.java:551)
at fuego.transaction.TransactionAction.start(TransactionAction.java:212)
at fuego.server.execution.DefaultEngineExecution.executeImmediate(DefaultEngineExecution.java:123)
at fuego.server.execution.EngineExecution.executeImmediate(EngineExecution.java:66)
at fuego.ejbengine.ItemExecutionBean.processMessage(ItemExecutionBean.java:209)
at fuego.ejbengine.ItemExecutionBean.onMessage(ItemExecutionBean.java:120)
at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:466)
at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:371)
at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:327)
at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4547)
at weblogic.jms.client.JMSSession.execute(JMSSession.java:4233)
at weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3709)
at weblogic.jms.client.JMSSession.access$000(JMSSession.java:114)
at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5058)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused by: javax.naming.InvalidNameException: CN=Alvarez Guerrero Bernardo
DEL:ca9ef28d-3b94-4e8f-a6bd-8c880bb3791b,CN=Deleted Objects,DC=corp: [LDAP: error code 34 - 0000208F: NameErr: DSID-031001BA, problem 2006 (BAD_NAME), data 8349, best match of:
'CN=Alvarez Guerrero Bernardo
DEL:ca9ef28d-3b94-4e8f-a6bd-8c880bb3791b,CN=Deleted Objects,DC=corp,dc=televisa,dc=com,dc=mx'
^@]; remaining name 'CN=Alvarez Guerrero Bernardo
DEL:ca9ef28d-3b94-4e8f-a6bd-8c880bb3791b,CN=Deleted Objects,DC=corp'
at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2979)
at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2794)
at com.sun.jndi.ldap.LdapCtx.searchAux(LdapCtx.java:1826)
at com.sun.jndi.ldap.LdapCtx.c_search(LdapCtx.java:1749)
at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_search(ComponentDirContext.java:368)
at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCompositeDirContext.java:338)
at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCompositeDirContext.java:321)
at javax.naming.directory.InitialDirContext.search(InitialDirContext.java:248)
at fuego.jndi.FaultTolerantLdapContext.search(FaultTolerantLdapContext.java:612)
at fuego.directory.hybrid.ldap.JNDIQueryExecutor.selectById(JNDIQueryExecutor.java:136)
... 67 more
答案1
我们终于解决了这个问题。这是由 LDAP 查询中的特殊字符引起的。OBPM 引擎将字符串 \0A 转换为新行,该字符串出现在查询中的 Bernardo 之后:
'CN=Alvarez Guerrero Bernardo\0ADEL:ca9ef28d-3b94-4e8f-a6bd-8c880bb3791b,CN=Deleted Objects,DC=corp,dc=televisa,dc=com,dc=mx'
当引擎解析查询时,它看起来像:
'CN=Alvarez Guerrero Bernardo
DEL:ca9ef28d-3b94-4e8f-a6bd-8c880bb3791b,CN=Deleted Objects,DC=corp,dc=televisa,dc=com,dc=mx'
我们不知道为什么查询包含“\0A”字符串,但 OBPM 在迁移后的第一次运行中循环执行该查询。我们在 Oracle 代码中插入一些代码来删除该字符串,问题就解决了。之后,我们从 Oracle 恢复了原始代码,问题没有再出现。