EJB не является обязательным и выдает ошибку InvalidName в websphere 8.5.12 - PullRequest
0 голосов
/ 28 января 2019

Проблема привязки EJB для нескольких EJB (которые предназначены только для удаленного доступа) в websphere 8.5.12.Все другие ejbs запустились, за исключением нескольких с ошибкой InvalidName.Это устаревшее приложение, которое мы пытаемся портировать с websphere 6 на websphere 8.5.12

Пробовал с несколькими опциями jndi, но ошибка та же.Фактически предполагается, что jndi name = "com.logistics.optifreight.optimizationmgmt.consolidation.consolidationregion.ejb.consolidationregionmgr.ConsolidationRegionMgrHome"

[1/28/19 0:04:13:365 EST] 00000052 SharedEJBRunt I   WSVR0037I: Starting EJB jar: ofr_ConsolidationRegionMgr.jar
[1/28/19 0:04:13:369 EST] 00000052 WASNameSpaceB I   CNTR0167I: The server is binding the com.logistics.optifreight.optimizationmgmt.consolidation.consolidationregion.ejb.consolidationregionmgr.ConsolidationRegionMgrHome interface of the com.logistics.optifreight.optimizationmgmt.consolidation.consolidationregion.ejb.consolidationregionmgr.ConsolidationRegionMgr enterprise bean in the ofr_ConsolidationRegionMgr.jar module of the ofr application.  The binding location is: com.logistics.optifreight.optimizationmgmt.consolidation.consolidationregion.ejb.consolidationregionmgr.ConsolidationRegionMgrHome
[1/28/19 0:04:13:369 EST] 00000052 AbstractEJBRu I   CNTR0167I: The server is binding the com.logistics.optifreight.optimizationmgmt.consolidation.consolidationregion.ejb.consolidationregionmgr.ConsolidationRegionMgrHome interface of the com.logistics.optifreight.optimizationmgmt.consolidation.consolidationregion.ejb.consolidationregionmgr.ConsolidationRegionMgr enterprise bean in the ofr_ConsolidationRegionMgr.jar module of the ofr application.  The binding location is: java:global/ofr/ofr_ConsolidationRegionMgr/com.logistics.optifreight.optimizationmgmt.consolidation.consolidationregion.ejb.consolidationregionmgr.ConsolidationRegionMgr!com.logistics.optifreight.optimizationmgmt.consolidation.consolidationregion.ejb.consolidationregionmgr.ConsolidationRegionMgrHome
[1/28/19 0:04:13:388 EST] 00000052 FfdcProvider  W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on /opt/hd/tp/talon_db2/talon_db2_instance/logs/ffdc/ofrserver_506a20db_19.01.28_00.04.13.3737642906525301202256.txt com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase$LeafOperationData.<init> 5347
[1/28/19 0:04:13:388 EST] 00000052 SharedNameSpa E   WSVR0046E: Unable to bind, com.logistics.optifreight.optimizationmgmt.consolidation.consolidationregion.ejb.consolidationregionmgr.ConsolidationRegionMgr!com.logistics.optifreight.optimizationmgmt.consolidation.consolidationregion.ejb.consolidationregionmgr.ConsolidationRegionMgrHome: com.logistics.optifreight.optimizationmgmt.consolidation.consolidationregion.ejb.consolidationregionmgr.ConsolidationRegionMgr!com.logistics.optifreight.optimizationmgmt.consolidation.consolidationregion.ejb.consolidationregionmgr.ConsolidationRegionMgrHome. Original exception : org.omg.CosNaming.NamingContextPackage.InvalidName: IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0
[1/28/19 0:04:13:389 EST] 00000052 SharedNameSpa E   WSVR0046E: Unable to bind, com.logistics.optifreight.optimizationmgmt.consolidation.consolidationregion.ejb.consolidationregionmgr.ConsolidationRegionMgr!com.logistics.optifreight.optimizationmgmt.consolidation.consolidationregion.ejb.consolidationregionmgr.ConsolidationRegionMgrHome: com.logistics.optifreight.optimizationmgmt.consolidation.consolidationregion.ejb.consolidationregionmgr.ConsolidationRegionMgr!com.logistics.optifreight.optimizationmgmt.consolidation.consolidationregion.ejb.consolidationregionmgr.ConsolidationRegionMgrHome. Original exception : org.omg.CosNaming.NamingContextPackage.InvalidName: IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0
[1/28/19 0:04:13:396 EST] 00000052 SharedEJBRunt E   WSVR0040E: addEjbModule failed for ofr_ConsolidationRegionMgr.jar
javax.naming.InvalidNameException: com.logistics.optifreight.optimizationmgmt.consolidation.consolidationregion.ejb.consolidationregionmgr.ConsolidationRegionMgr!com.logistics.optifreight.optimizationmgmt.consolidation.consolidationregion.ejb.consolidationregionmgr.ConsolidationRegionMgrHome. Original exception : org.omg.CosNaming.NamingContextPackage.InvalidName: IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0
        at com.ibm.ws.naming.jbatch.CommonBatchModeCNContextImpl.processException(CommonBatchModeCNContextImpl.java:488)
        at com.ibm.ws.naming.jbatch.CommonBatchModeCNContextImpl.rebindPostProcess(CommonBatchModeCNContextImpl.java:1413)
        at com.ibm.ws.naming.jbatch.CommonBatchModeCNContextImpl.executeBatchedOperations(CommonBatchModeCNContextImpl.java:1652)
        at com.ibm.ws.naming.jbatch.javaCNBatchContextImpl.executeBatchedOperations(javaCNBatchContextImpl.java:278)
        at com.ibm.ws.runtime.component.WASNameSpaceBinderImpl.executeBatchedOperation(WASNameSpaceBinderImpl.java:235)
        at com.ibm.ws.runtime.component.WASNameSpaceBinderImpl.end(WASNameSpaceBinderImpl.java:1233)
        at com.ibm.ws.ejbcontainer.runtime.AbstractEJBRuntime.startModule(AbstractEJBRuntime.java:762)
        at com.ibm.ws.ejbcontainer.runtime.SharedEJBRuntimeImpl.startModule(SharedEJBRuntimeImpl.java:338)
        at com.ibm.ws.runtime.component.EJBContainerImpl.start(EJBContainerImpl.java:3588)
        at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1201)
        at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1390)
        at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:639)
        at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:979)
        at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:785)
        at com.ibm.ws.runtime.component.ApplicationMgrImpl$5.run(ApplicationMgrImpl.java:2220)
        at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5486)
        at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5612)
        at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)
        at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2225)
        at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:436)
        at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
        at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:379)
        at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:127)
        at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$CUInitializer.run(CompositionUnitMgrImpl.java:985)
        at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:524)
        at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1892)

[1/28/19 0:04:13:399 EST] 00000052 DeployedAppli W   WSVR0206E: Module, ofr_ConsolidationRegionMgr.jar, of application, ofr.ear/deployments/ofr, failed to start
[1/28/19 0:04:13:402 EST] 00000052 ApplicationMg E   WSVR0101W: An error occurred starting, ofr
[1/28/19 0:04:13:402 EST] 00000052 ApplicationM

Дополнительная трассировка исключения: [1/28/19 0: 04: 14: 506 EST] 00000001 ContainerHelp E WSVR0501E: Ошибка создания компонента com.ibm.ws.runtime.component.CompositionUnitMgrImpl@f0ad7395 com.ibm.ws.exception.RuntimeWarning: com.ibm.ws.exception.RuntimeError:.ibm.ws.exception.RuntimeError: javax.naming.InvalidNameException: com.logistics.optifreight.optimizationmgmt.consolidation.consolidationregion.ejb.consolidationregionmgr.ConsolidationRegionMgr!,Исходное исключение: org.omg.CosNaming.NamingContextPackage.InvalidName: IDL: omg.org/CosNaming/NamingContext/InvalidName: 1.0 по адресу com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCUList (CompositionUnit3. Com) at3l3.ibm.ws.runtime.component.CompositionUnitMgrImpl.start (CompositionUnitMgrImpl.java:275) в com.ibm.ws.runtime.component.ContainerHelper.startComponents (ContainerHelper.java:540) в com.ibtime.ws.r.ContainerImpl.startComponents (ContainerImpl.java:627) в com.ibm.ws.runtime.component.ContainerImpl.start (ContainerImpl.java:618) в com.ibm.ws.runtime.component.ApplicationServerImpl.start (ApplicationSerj.mpl:252) на com.ibm.ws.runtime.component.ContainerHelper.startComponents (ContainerHelper.java:540) на com.ibm.ws.runtime.component.ContainerImpl.startComponents (ContainerImpl.java:627) на com.ibm.ws:runtime.WsServerImpl.bootServerContainer (WsServerImpl.java:316) по адресу com.ibm.ws.runtime.WsServerImpl.start (WsServerImpl.java:229) по адресу com.ibm.ws.runtime.WsServerImpser (WSSS) ()в com.ibm.ws.runtime.WsServer.main (WsServer.java:59) в sun.reflect.NativeMethodAccessorImpl.invoke0 (собственный метод) в sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessrefl) at..DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:55) в java.lang.reflect.Method.invoke (Method.java:613) в com.ibm.wsspi.bootstrap.WSLauncher.launch2ain.a. Com: WSibm.wsspi.bootstrap.WSLauncher.main (WSLauncher.java:96) в com.ibm.wsspi.bootstrap.WSLauncher.run (WSLauncher.java:77) в sun.reflect.NativeMethodAccessorImpl.invoke at0.refle.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:88) в sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:55) в java.lang.reflect.Mkehod.Java: 613) в org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException (EclipseAppContainer.java:587) в org.eclipse.equinox.internal.app.EclipseAppHandle.rj:19 или Eclipse (19).core.runtime.internal.adaptor..adaptor.at sun.reflect.NativeMethodAccessorImpl.invoke0 (родной метод) в sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:88) в sun.reflect.DelegatingMethodAccessorImpl.ettho.jho.jj.invoke (Method.java:613) в org.eclipse.core.launcher.Main.invokeFramework (Main.java:340) в org.eclipse.core.launcher.Main.basicRun (Main.java:282) в org.eclipse.core.launcher.Main.run (Main.java:981) в com.ibm.wsspi.bootstrap.WSPreLauncher.launchEclipse (WSPreLauncher.java:406) в com.ibm.wsspi.bootstrap.WSPreLauncher. (Java: 169) Вызвано: com.ibm.ws.exception.RuntimeError: com.ibm.ws.exception.RuntimeError: javax.naming.InvalidNameException: com.logistics.optifreight.optimizationmgmt.consolidation.consolidationregion.ejbrgg! com.logistics.optifreight.optimizationmgmt.consolidation.consolidationregion.ejb.consolidationregionmgr.ConsolidationRegionMgrHome.Исходное исключение: org.omg.CosNaming.NamingContextPackage.InvalidName: IDL: omg.org/CosNaming/NamingContext/InvalidName: 1.0 по адресу com.ibm.wsspi.runtime.component.WsComponentImpl.join (WsComponentImpl.java) com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCUList (CompositionUnitMgrImpl.java:1295) ... еще 39 Вызвано: com.ibm.ws.exception.RuntimeError: javax.naming.InvalidNameException: com.logmm.consolidation.consolidationregion.ejb.consolidationregionmgr.ConsolidationRegionMgr! com.logistics.optifreight.optimizationmgmt.consolidation.consolidationregion.ejb.consolidationregionmgr.ConsolidationRegionMgrHome.Исходное исключение: org.omg.CosNaming.NamingContextPackage.InvalidName: IDL: omg.org/CosNaming/NamingContext/InvalidName: 1.0 в com.ibm.ws.ejbcontainer.runtime.AbstractEJBRuntime.startModule (AbstractEJBR) .7.ibm.ws.ejbcontainer.runtime.SharedEJBRuntimeImpl.startModule (SharedEJBRuntimeImpl.java:338) в com.ibm.ws.runtime.component.EJBContainerImpl.start (EJBContainerImpl.jentun.com.com) 88ApplicationMgrImpl.start (ApplicationMgrImpl.java:1201) по адресу com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart (DeployedApplicationImpl.java:1390) по адресу com.ibm.ws.runtime.component.Depl.jmpl639) в com.ibm.ws.runtime.component.DeployedApplicationImpl.start (DeployedApplicationImpl.java:979) в com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication (ApplicationMgrImpl.java:785) в com.ib.runtime.component.ApplicationMgrImpl $ 5.run (ApplicationMgrImpl.java:2220) на com.ibm.ws.security.auth.ContextManagerImpl.runAs (ContextManagerImpl.java:5486) в com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem (ContextManagerImpl.java:5612) в com.ibm.ws.security.core.SecurityContextSContext:255) по адресу com.ibm.ws.runtime.component.ApplicationMgrImpl.start (ApplicationMgrImpl.java:2225) по адресу com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start (CompositionUnitMgrImpl.java:4mws. Com).runtime.component.CompositionUnitImpl.start (CompositionUnitImpl.java:123) в com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start (CompositionUnitMgrImpl.java:379) в com.ibm.wit500 долл. США (CompositionUnitMgrImpl.java:127) по адресу com.ibm.ws.runtime.component.CompositionUnitMgrImpl $ CUInitializer.run (CompositionUnitMgrImpl.java:985) по адресу com.ibm.wsspi.runtime.componialImpl.Java: 524) на com.ibm.ws.util.ThreadPool $ Worker.run (ThreadPool.java:1892)Вызвано:Исходное исключение: org.omg.CosNaming.NamingContextPackage.InvalidName: IDL: omg.org/CosNaming/NamingContext/InvalidName: 1.0 в com.ibm.ws.naming.jbatch.CommonBatchModeCNContextImpl.processException (CommonBatch.4848.ibm.ws.naming.jbatch.CommonBatchModeCNContextImpl.rebindPostProcess (CommonBatchModeCNContextImpl.java:1413) в com.ibm.ws.naming.jbatch.CommonBatchModeCNContextImpl.executeBnj.bj.MatchBatjavaCNBatchContextImpl.executeBatchedOperations (javaCNBatchContextImpl.java:278) при com.ibm.ws.runtime.component.WASNameSpaceBinderImpl.executeBatchedOperation (WASNameSpaceBinderImpl.java:235) в com.ibm.ws.runtime.component.WASNameSpaceBinderImpl.end (WASNameSpaceBinderImpl.java:1233) at com.ibm.ws.ejbcontainer.runtime.AbstractEJBRuntime.startModule (AbstractEJBRuntime.java:762) ... еще 19

фрагменты из ejb-jar.xml

 <enterprise-beans>
                <session id="ConsolidationRegionMgr">
                        <ejb-name>com.logistics.optifreight.optimizationmgmt.consolidation.consolidationregion.ejb.consolidationregionmgr.ConsolidationRegionMgr</ejb-name>
                        <home>com.logistics.optifreight.optimizationmgmt.consolidation.consolidationregion.ejb.consolidationregionmgr.ConsolidationRegionMgrHome</home>
                        <remote>com.logistics.optifreight.optimizationmgmt.consolidation.consolidationregion.ejb.consolidationregionmgr.ConsolidationRegionMgr</remote>
                        <ejb-class>com.logistics.optifreight.optimizationmgmt.consolidation.consolidationregion.ejb.consolidationregionmgr.ConsolidationRegionMgrBean</ejb-class>
                        <session-type>Stateless</session-type>
                        <transaction-type>Container</transaction-type>
                </session>
        </enterprise-beans>

Фрагменты из ibm-ejb-jar-bnd.xmi

<?xml version="1.0" encoding="UTF-8"?>
<com.ibm.ejs.models.base.bindings.ejbbnd:EJBJarBinding xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:com.ibm.ejs.models.base.bindings.commonbnd="commonbnd.xmi" xmlns:com.ibm.ejs.models.base.bindings.ejbbnd="ejbbnd.xmi" xmlns:org.eclipse.jst.j2ee.ejb="ejb.xmi" xmi:id="ejb-jar_ID_Bnd">
  <defaultDatasource xmi:id="ResourceRefBinding_1">
    <defaultAuth xmi:type="com.ibm.ejs.models.base.bindings.commonbnd:BasicAuthData" xmi:id="BasicAuthData_1"/>
  </defaultDatasource>
  <ejbJar href="META-INF/ejb-jar.xml#ejb-jar_ID"/>
  <ejbBindings xmi:id="com.logistics.optifreight.optimizationmgmt.consolidation.consolidationregion.ejb.consolidationregionmgr.ConsolidationRegionMgr_bnd" jndiName="com.logistics.optifreight.optimizationmgmt.consolidation.consolidationregion.ejb.consolidationregionmgr.ConsolidationRegionMgrHome">
    <enterpriseBean xmi:type="org.eclipse.jst.j2ee.ejb:Session" href="META-INF/ejb-jar.xml#ConsolidationRegionMgr"/>
  </ejbBindings>
</com.ibm.ejs.models.base.bindings.ejbbnd:EJBJarBinding>
~

1 Ответ

0 голосов
/ 31 января 2019

Устранена проблема. Оказалось, что имя jndi и имя ejb, которое мы использовали, слишком велико для имени и вызывает проблему в глобальном связывании.После того, как мы попробовали так много вариантов, наконец, когда мы заподозрили это и дали меньшее имя, эти EJB-компоненты были связаны.

...