这是我得到的例外:
]] Root cause of ServletException.
java.lang.NullPointerException
at com.xyz.ServiceFactory.getAppName(ServiceFactory.java:190)
at com.xyz.ServiceFactory.getApplicationName(ServiceFactory.java:128)
at com.xyz.SomeServiceAccessorProxy.<init>(SomeServiceAccessorProxy.java:10)
at com.xyz.SomeServiceAccessorImpl.getService(SomeServiceAccessorImpl.java:41)
at com.xyz.validateUserLogin(SomeCommon.java:89)
Truncated. see log file for complete stacktrace
因此,上述例外是仅可见的内容。 令人惊讶的是,关闭了weblogic-我们在粘贴在下面的日志中获得了更多详细信息:(完整日志)
<23/05/2019 10:49:25 AM EST> <Notice> <WebLogicServer> <BEA-000388> <JVM
called the WebLogic Server shutdown hook. The server will force shutdown
now.>
<23/05/2019 10:49:25 AM EST> <Notice> <WebLogicServer> <BEA-000396> <Server
shutdown has been requested by <WLS Kernel>.>
<23/05/2019 10:49:25 AM EST> <Notice> <WebLogicServer> <BEA-000365> <Server
state changed to FORCE_SUSPENDING.>
<23/05/2019 10:49:25 AM EST> <Notice> <WebLogicServer> <BEA-000365> <Server
state changed to ADMIN.>
<23/05/2019 10:49:25 AM EST> <Notice> <WebLogicServer> <BEA-000365> <Server
state changed to FORCE_SHUTTING_DOWN.>
<23/05/2019 10:49:25 AM EST> <Notice> <Server> <BEA-002607> <Channel
"Default[7]", listening on fe80:0:0:0:515e:8ad6:9c96:b298:7001, was shut
down.>
<23/05/2019 10:49:25 AM EST> <Notice> <Server> <BEA-002607> <Channel
"Default[6]", listening on fe80:0:0:0:9857:44d:606c:9ebd:7001, was shut
down.>
<23/05/2019 10:49:25 AM EST> <Notice> <Server> <BEA-002607> <Channel
"Default[5]", listening on fe80:0:0:0:162:e6b1:5031:79e5:7001, was shut
down.>
<23/05/2019 10:49:25 AM EST> <Notice> <Server> <BEA-002607> <Channel
"Default[1]", listening on 172.26.11.12:7001, was shut down.>
<23/05/2019 10:49:25 AM EST> <Notice> <Server> <BEA-002607> <Channel
"Default[4]", listening on fe80:0:0:0:f4a9:ad8e:35cf:ad32:7001, was shut
down.>
<23/05/2019 10:49:25 AM EST> <Notice> <Server> <BEA-002607> <Channel
"Default[2]", listening on fe80:0:0:0:2154:84d6:eba1:3618:7001, was shut
down.>
<23/05/2019 10:49:25 AM EST> <Notice> <Server> <BEA-002607> <Channel
"Default[3]", listening on fe80:0:0:0:2562:eb0f:7c68:7a63:7001, was shut
down.>
<23/05/2019 10:49:25 AM EST> <Notice> <Server> <BEA-002607> <Channel
"Default", listening on 192.168.56.1:7001, was shut down.>
<23/05/2019 10:49:25 AM EST> <Notice> <Server> <BEA-002607> <Channel
"Default[9]", listening on 127.0.0.1:7001, was shut down.>
<23/05/2019 10:49:25 AM EST> <Notice> <Server> <BEA-002607> <Channel
"Default[10]", listening on 0:0:0:0:0:0:0:1:7001, was shut down.>
<23/05/2019 10:49:25 AM EST> <Notice> <Server> <BEA-002607> <Channel
"Default[8]", listening on fe80:0:0:0:dc3e:fba8:561c:e9ca:7001, was shut
down.>
<23/05/2019 10:49:25 AM EST> <Error> <WebLogicServer> <BEA-000381>
<ServerLifeCycle operation failed.
Message: halt call on RuntimeServerService failed
java.lang.ExceptionInInitializerError
java.lang.ExceptionInInitializerError
at weblogic.iiop.IIOPOutputStream.<clinit>(IIOPOutputStream.java:138)
at weblogic.iiop.Message.getOutputStream(Message.java:175)
at weblogic.iiop.LocateRequestMessage.<init>
(LocateRequestMessage.java:93)
at weblogic.iiop.IORManager.locateNameService(IORManager.java:196)
at weblogic.iiop.IORManager.createInitialReference(IORManager.java:120)
Truncated. see log file for complete stacktrace
Caused By: org.omg.CORBA.INITIALIZE: Cannot instantiate
com.ibm.ws.orb.WSUtilDelegateImpl vmcid: 0x0 minor code: 0
completed: No
at javax.rmi.CORBA.Util.createDelegate(Util.java:355)
at javax.rmi.CORBA.Util.<clinit>(Util.java:67)
at weblogic.iiop.IIOPOutputStream.<clinit>(IIOPOutputStream.java:138)
at weblogic.iiop.Message.getOutputStream(Message.java:175)
at weblogic.iiop.LocateRequestMessage.<init>
(LocateRequestMessage.java:93)
Truncated. see log file for complete stacktrace
Caused By: java.lang.ClassNotFoundException:
com.ibm.ws.orb.WSUtilDelegateImpl (no security manager: RMI class loader
disabled)
at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:393)
at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:185)
at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:637)
at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:219)
at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:152)
Truncated. see log file for complete stacktrace
>
<23/05/2019 10:49:25 AM EST> <Error> <WebLogicServer> <BEA-000381>
<ServerLifeCycle operation failed.
Message: halt call on EditServerService failed
java.lang.NoClassDefFoundError: Could not initialize class
weblogic.iiop.IIOPOutputStream
java.lang.NoClassDefFoundError: Could not initialize class
weblogic.iiop.IIOPOutputStream
at weblogic.iiop.Message.getOutputStream(Message.java:175)
at weblogic.iiop.LocateRequestMessage.<init>
(LocateRequestMessage.java:93)
at weblogic.iiop.IORManager.locateNameService(IORManager.java:196)
at weblogic.iiop.IORManager.createInitialReference(IORManager.java:120)
at weblogic.corba.orb.ORB.string_to_object(ORB.java:341)
Truncated. see log file for complete stacktrace
>
<23/05/2019 10:49:25 AM EST> <Error> <WebLogicServer> <BEA-000381> <ServerLifeCycle operation failed.
Message: halt call on DomainRuntimeServerService failed
java.lang.NoClassDefFoundError: Could not initialize class weblogic.iiop.IIOPOutputStream
java.lang.NoClassDefFoundError: Could not initialize class weblogic.iiop.IIOPOutputStream
at weblogic.iiop.Message.getOutputStream(Message.java:175)
at weblogic.iiop.LocateRequestMessage.<init>(LocateRequestMessage.java:93)
at weblogic.iiop.IORManager.locateNameService(IORManager.java:196)
at weblogic.iiop.IORManager.createInitialReference(IORManager.java:120)
at weblogic.corba.orb.ORB.string_to_object(ORB.java:341)
Truncated. see log file for complete stacktrace
weblogic抱怨的类未找到异常: WsnInitialContextFactory 存在于web-inf \ lib
中的jar文件中仔细检查了一下。 注意-com.xyz.ServiceFactory类也存在于web-inf \ lib中的另一个jar中。
因此可以找到并调用来自web-inf \ lib的类,但是当代码到达该类时:'WsnInitialContextFactory',我们遇到了ClassNotFoundException。
注意2: 要注意的另一件事是,在进行上述调用之前,我明确设置了以下代码行:
System.setProperty("java.naming.factory.initial", "com.ibm.websphere.naming.WsnInitialContextFactory");
注意3: 如果我通过weblogic启动脚本将这些jar放在全局类路径上-那么我不会遇到此问题:
set JAVA_PROPERTIES=%JAVA_PROPERTIES% -Dweblogic.ext.dirs=C:\rmi_ibm_jars
我不希望将它们放在全局类路径上,因为这是不可取的,也不建议这样做。