【发布时间】:2018-04-10 07:16:29
【问题描述】:
我在 Websphere 应用程序server 8.5.5 中使用启动客户端来启动一个独立的 java 程序。默认classLoaderMode (PARENT_FIRST) 可以正常工作。
但是,当我将其更改为 PARENT_LAST 时,它无法初始化应用程序组件。这是命令
> File to launch = C:\workspace\myapp.ear
> CC Property File = null
> Client Jar File = <default>
> Alternate DD = null
> BootstrapHost = localhost
> BootstrapPort = 2809
> Trace enabled = false
> Tracefile = null
> Init only = false
> Classpath Parameter = myjar.jar
> Security Manager = disable
> Security Manager Class = Not used. -CCsecurityManager=disable
> Security Manager Policy = Not used. -CCsecurityManager=disable
> Exit VM = true
> Soap Connector Port = null
> Application Parameters = --name abc
> Provider URL = null
> Dump Java Name Space = long
> Admin Connector Host = null
> Admin Connector Port = null
> Admin Connector Type = null
> Admin Connector User = null
> PARENT_LAST mode = true
这里是例外:
WSCL0910I:正在初始化组件: com.ibm.ejs.jms.JMSClientRegistration WSCL0911I: 组件已初始化 成功地。 [10/28/17 19:41:10:901 EDT] 00000001 W UOW= 来源=com.ibm.websphere.naming.genericURLInitialContextFactory 线程=[P=69444:O=0:CT] NMSV0907E: 无法对“com.ibm.ws.naming.urlns.genericURLContextFactory”类型的对象调用方法“getObjectInstance”。 [10/28/17 19:41:11:145 EDT] 00000001 W UOW=null source=com.ibm.ws.naming.util.CommonHelpers org=IBM prod=WebSphere 组件=应用服务器线程=[P=69444:O=0:CT] NMSV0303E: 方案的 NamingManager.getURLContext 发生异常:“服务”。 [10/28/17 19:41:11:169 EDT] 00000001 E UOW=null 源=com.ibm.ws.activity.ActivityServiceClientComponentImpl org=IBM prod=WebSphere 组件=应用服务器 线程=[P=69444:O=0:CT] WACT0001E: com.ibm.ws.activity.ActivityServiceClientComponentImpl 类中的方法 start 收到一个 意外异常;异常堆栈跟踪如下: javax.naming.ConfigurationException:无法调用方法 com.ibm.ws.naming.ur 类型对象上的 getObjectInstance lns.genericURLContextFactory。 [根例外是 java.lang.reflect.InvocationTargetException] 在 com.ibm.websphere.naming.genericURLInitialContextFactory.getAndInvokeMethod(genericURLInitialContextFactory.java:483) 在 com.ibm.websphere.naming.genericURLContextFactory.getObjectInstance(genericURLContextFactory.java:162) 在 javax.naming.spi.NamingManager.getURLContext(NamingManager.java:706) 在 com.ibm.ws.naming.util.CommonHelpers.getContextIfUrlName(CommonHelpers.java:477) 在 com.ibm.ws.naming.util.CommonHelpers.getContextIfUrlName(CommonHelpers.java:438) 在 com.ibm.websphere.naming.JndiHelper.recursiveBind(JndiHelper.java:503) 在 com.ibm.websphere.naming.JndiHelper.recursiveRebind(JndiHelper.java:391) 在 com.ibm.ws.activity.ActivityServiceClientComponentImpl.start(ActivityServiceClientComponentImpl.java:106) 在 com.ibm.ws.runtime.component.ContainerHelper.startComponents(ContainerHelper.java:540) 在 com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:627) 在 com.ibm.ws.client.applicationclient.ClientComponentInitImpl.start(ClientComponentInitImpl.java:77) 在 com.ibm.ws.client.applicationclient.ClientContainer.startComponents(ClientContainer.java:1945) 在 com.ibm.ws.client.applicationclient.ClientContainer.init(ClientContainer.java:326) 在 com.ibm.ws.client.applicationclient.launchClient.createContainerAndLaunchApp(launchClient.java:749) 在 com.ibm.ws.client.applicationclient.launchClient.main(launchClient.java:495) 在 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 在 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60) 在 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) 在 java.lang.reflect.Method.invoke(Method.java:611) 在 com.ibm.wsspi.bootstrap.WSLauncher.launchMain(WSLauncher.java:234) 在 com.ibm.wsspi.bootstrap.WSLauncher.main(WSLauncher.java:96) 在 com.ibm.wsspi.bootstrap.WSLauncher.run(WSLauncher.java:77) 在 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 在 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60) 在 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) 在 java.lang.reflect.Method.invoke(Method.java:611) 在 org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:587) 在 org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:198) 在 org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) 在 org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) 在 org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369) 在 org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) com.ibm.ws.exception.RuntimeError: javax.naming.ConfigurationException:无法调用方法 getObjectInstance 对象类型 com.ibm.ws.naming.urlns.genericURLContextFactory。 [根例外是 java.lang.reflect.InvocationTargetException] 在 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 在 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60) 在 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) 在 java.lang.reflect.Method.invoke(Method.java:611) 在 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.main(WSPreLauncher.java:169) 在 com.ibm.websphere.client.applicationclient.launchClient.main(launchClient.java:246) 引起:java.lang.reflect.InvocationTargetException 在 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 在 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60) 在 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) 在 java.lang.reflect.Method.invoke(Method.java:611) 在 com.ibm.websphere.naming.genericURLInitialContextFactory.getAndInvokeMethod(genericURLInitialContextFactory.java:469) ... 41 更多原因:javax.naming.ConfigurationException:URL 方案“服务”没有名称空间。 在 com.ibm.ws.naming.urlns.genericURLContextFactory.isNameSpaceAccessable(genericURLContextFactory.java:99) 在 com.ibm.ws.naming.urlbase.UrlContextFactory.getObjectInstance(UrlContextFactory.java:85) ... 46 更多
是什么原因导致 IBM 启动客户端在 PARENT_LAST 类加载器模式下加载并失败?我想知道它是否是一个 Websphere 应用程序Server 8.5.5。或者我只是运行不正确。
提前致谢。
【问题讨论】:
标签: java client websphere classloader