EJB3.0 WAS8 と Spring 3 を使用しています。Web コンポーネントを Web サーバーに配置し、EAR を App サーバーにデプロイしました。Web コンポーネントは、コンテキスト ルックアップが必要になるまで正常に動作します。InitialContext を使用すると、次の例外が発生します。
type Exception report
message Handler processing failed; nested exception is java.lang.NoClassDefFoundError: com.ibm.ws.exception.WsException
description The server encountered an internal error (Handler processing failed; nested exception is java.lang.NoClassDefFoundError: com.ibm.ws.exception.WsException) that prevented it from fulfilling this request.
exception
org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.NoClassDefFoundError: com.ibm.ws.exception.WsException
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:812)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:709)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:613)
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:536)
javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
root cause
java.lang.NoClassDefFoundError: com.ibm.ws.exception.WsException
java.lang.ClassLoader.defineClassImpl(Native Method)
java.lang.ClassLoader.defineClass(ClassLoader.java:275)
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:74)
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2901)
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1170)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1678)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556)
java.lang.ClassLoader.defineClassImpl(Native Method)
java.lang.ClassLoader.defineClass(ClassLoader.java:275)
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:74)
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2901)
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1170)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1678)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556)
java.lang.J9VMInternals.verifyImpl(Native Method)
java.lang.J9VMInternals.verify(J9VMInternals.java:72)
java.lang.J9VMInternals.initialize(J9VMInternals.java:134)
com.ibm.websphere.naming.WsnInitialContextFactory.<clinit>(WsnInitialContextFactory.java:68)
java.lang.J9VMInternals.initializeImpl(Native Method)
java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
java.lang.Class.forNameImpl(Native Method)
java.lang.Class.forName(Class.java:174)
javax.naming.spi.NamingManager$3.run(NamingManager.java:873)
javax.naming.spi.NamingManager$3.run(NamingManager.java:870)
java.security.AccessController.doPrivileged(AccessController.java:228)
javax.naming.spi.NamingManager.factoryForName(NamingManager.java:869)
javax.naming.spi.NamingManager.factoryForName(NamingManager.java:820)
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:246)
javax.naming.InitialContext.initializeDefaultInitCtx(InitialContext.java:318)
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:348)
javax.naming.InitialContext.internalInit(InitialContext.java:286)
javax.naming.InitialContext.<init>(InitialContext.java:211)
com.paam.util.ServiceLocator.getInitialContext(ServiceLocator.java:43)
com.paam.util.RemoteObjectCall.remoteObj(RemoteObjectCall.java:14)
com.paam.delegates.PAAMDelegate.InsertPAAMDetails(PAAMDelegate.java:18)
com.paam.controllers.NewPaamController.newpaamsubmit(NewPaamController.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.springframework.web.bind.annotation.support.HandlerMethodInvoker.doInvokeMethod(HandlerMethodInvoker.java:626)
org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:150)
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:354)
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:342)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:763)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:709)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:613)
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:536)
javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
root cause
java.lang.ClassNotFoundException: com.ibm.ws.exception.WsException
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1711)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556)
java.lang.ClassLoader.defineClassImpl(Native Method)
java.lang.ClassLoader.defineClass(ClassLoader.java:275)
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:74)
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2901)
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1170)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1678)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556)
java.lang.ClassLoader.defineClassImpl(Native Method)
java.lang.ClassLoader.defineClass(ClassLoader.java:275)
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:74)
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2901)
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1170)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1678)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556)
java.lang.J9VMInternals.verifyImpl(Native Method)
java.lang.J9VMInternals.verify(J9VMInternals.java:72)
java.lang.J9VMInternals.initialize(J9VMInternals.java:134)
com.ibm.websphere.naming.WsnInitialContextFactory.<clinit>(WsnInitialContextFactory.java:68)
java.lang.J9VMInternals.initializeImpl(Native Method)
java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
java.lang.Class.forNameImpl(Native Method)
java.lang.Class.forName(Class.java:174)
javax.naming.spi.NamingManager$3.run(NamingManager.java:873)
javax.naming.spi.NamingManager$3.run(NamingManager.java:870)
java.security.AccessController.doPrivileged(AccessController.java:228)
javax.naming.spi.NamingManager.factoryForName(NamingManager.java:869)
javax.naming.spi.NamingManager.factoryForName(NamingManager.java:820)
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:246)
javax.naming.InitialContext.initializeDefaultInitCtx(InitialContext.java:318)
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:348)
javax.naming.InitialContext.internalInit(InitialContext.java:286)
javax.naming.InitialContext.<init>(InitialContext.java:211)
com.paam.util.ServiceLocator.getInitialContext(ServiceLocator.java:43)
com.paam.util.RemoteObjectCall.remoteObj(RemoteObjectCall.java:14)
com.paam.delegates.PAAMDelegate.InsertPAAMDetails(PAAMDelegate.java:18)
com.paam.controllers.NewPaamController.newpaamsubmit(NewPaamController.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.springframework.web.bind.annotation.support.HandlerMethodInvoker.doInvokeMethod(HandlerMethodInvoker.java:626)
org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:150)
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:354)
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:342)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:763)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:709)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:613)
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:536)
javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
PS: 定義したログでこの例外を取得していません。tomcat ログ ディレクトリに localhost ログ ファイルが生成されます。そして、エラーがそこに出力されます。
誰かが問題の内容を知っている場合は、同じ解決策を親切に提案してください。