简体   繁体   English

我的EJB应用程序没有部署在WebSphere上吗?

[英]My EJB application is not deploying on WebSphere?

I've tried installing an application onto a server and when the server tries to start the application, I am seeing an error in the log. 我尝试将应用程序安装到服务器上,并且服务器尝试启动应用程序时,我在日志中看到错误。 The most relevant part of the stack trace appear to be 堆栈跟踪中最相关的部分似乎是

    000000ab SharedEJBRunt E   WSVR0040E: addEjbModule failed for BasicsJMSEJB.jar
com.ibm.ejs.container.ContainerException: Failed to start the BasicsReversalBean component in the BasicsJMSEJB.jar module of the BasicsEnterpriseApp application.; nested exception is: 
    java.lang.NoClassDefFoundError: org.apache.log4j.Logger
    at com.ibm.ws.ejbcontainer.runtime.SharedEJBRuntimeImpl.startBean(SharedEJBRuntimeImpl.java:609)
    at com.ibm.ws.runtime.component.WASEJBRuntimeImpl.startBean(WASEJBRuntimeImpl.java:583)
    at com.ibm.ws.ejbcontainer.runtime.AbstractEJBRuntime.fireMetaDataCreatedAndStartBean(AbstractEJBRuntime.java:1716)
    at com.ibm.ws.ejbcontainer.runtime.AbstractEJBRuntime.startModule(AbstractEJBRuntime.java:681)
    at com.ibm.ws.ejbcontainer.runtime.SharedEJBRuntimeImpl.startModule(SharedEJBRuntimeImpl.java:336)
    at com.ibm.ws.runtime.component.EJBContainerImpl.start(EJBContainerImpl.java:3576)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1175)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1370)
    at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:639)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:968)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:774)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplicationDynamically(ApplicationMgrImpl.java:1374)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2179)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:445)
    at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:388)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:116)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$1.run(CompositionUnitMgrImpl.java:663)
    at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5474)
    at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5600)
    at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:677)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:621)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:1266)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
    at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:49)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
    at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:256)
    at javax.management.modelmbean.RequiredModelMBean$4.run(RequiredModelMBean.java:1148)
    at java.security.AccessController.doPrivileged(AccessController.java:252)
    at com.ibm.oti.security.CheckedAccessControlContext.securityCheck(CheckedAccessControlContext.java:30)
    at sun.misc.JavaSecurityAccessWrapper.doIntersectionPrivilege(JavaSecurityAccessWrapper.java:41)
    at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1142)
    at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:995)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:848)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:774)
    at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1335)
    at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
    at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:1228)
    at com.ibm.ws.management.connector.AdminServiceDelegator.invoke(AdminServiceDelegator.java:181)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
    at com.ibm.ws.management.connector.soap.SOAPConnector.invoke(SOAPConnector.java:478)
    at com.ibm.ws.management.connector.soap.SOAPConnector.service(SOAPConnector.java:312)
    at com.ibm.ws.management.connector.soap.SOAPConnection.handleRequest(SOAPConnection.java:65)
    at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:733)
    at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:522)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1862)
Caused by: java.lang.NoClassDefFoundError: org.apache.log4j.Logger
    at com.uhc.basics.compmgmt.messagebeans.BasicsReversalBean.<clinit>(BasicsReversalBean.java:54)
    at java.lang.J9VMInternals.initializeImpl(Native Method)
    at java.lang.J9VMInternals.initialize(J9VMInternals.java:236)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:56)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:39)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:527)
    at com.ibm.ws.ejbcontainer.runtime.SharedEJBRuntimeImpl.startBean(SharedEJBRuntimeImpl.java:577)
    ... 55 more
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Logger
    at java.net.URLClassLoader.findClass(URLClassLoader.java:434)
    at com.ibm.ws.bootstrap.ExtClassLoader.findClass(ExtClassLoader.java:204)
    at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:688)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:667)
    at com.ibm.ws.bootstrap.ExtClassLoader.loadClass(ExtClassLoader.java:119)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:650)
    at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:62)
    at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:58)
    at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:584)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:650)
    ... 63 more

I am having an enterpraise application and this EJB jar is added to my ear. 我有一个企业应用程序,并且这个EJB jar已添加到我的耳朵中。 I do not have any compilation error and build is also successfull through maven.I do have added log4j jar file as dependecy to this project. 我没有任何编译错误,并且通过maven也可以成功构建。我确实已将log4j jar文件作为依赖项添加到此项目中。 COuld you please help me where and what did I miss? 您能帮我想念我在哪里和想念什么吗?

There are only two ways from your deployed application to find a dependent jar. 从已部署的应用程序中,只有两种方法可以找到依赖的jar。

1 Include it correctly in the EJB jar itself. 1将其正确包含在EJB jar本身中。 You should inspect the contents of your packaged EJB jar file to confirm that the log4j jar is in fact included. 您应该检查打包的EJB jar文件的内容,以确认实际上包括了log4j jar。 Use jar tf jar-file or winzip. 使用jar tf jar-file或winzip。

2 By adding the log4j JAR file as a Shared Library on the Websphere server instance. 2通过将log4j JAR文件添加为Websphere服务器实例上的共享库。 In which case it will be available to all applications deployed on the server instance. 在这种情况下,它将对服务器实例上部署的所有应用程序可用。

If you are using Maven, ensure that you have not set the log4j dependancy to use the 如果使用的是Maven,请确保尚未将log4j依赖项设置为使用

<scope>provided</scope>

option. 选项。 This option will not include the log4j jar in the packaged application. 此选项不会在打包的应用程序中包括log4j jar。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 WebSphere v7.0未部署EJB - WebSphere v7.0 is not deploying EJB 在GlassFish中EJB应用程序部署失败 - EJB application deploying failed in GlassFish 使用Websphere Libertyty应用程序从经典Websphere应用程序访问远程ejb - Accessing remote ejb from classic websphere application with websphere liberty application WebSphere 7.从另一个应用程序注入EJB - WebSphere 7. Inject EJB from another application 在Websphere应用程序服务器6.1中部署.war文件? - Deploying .war file in Websphere application server 6.1? 在应用程序服务器(weblogic / websphere)上部署多个应用程序 - Deploying multiple applications on an application server(weblogic/websphere) NoTargetForURIException使用IntelliJ在Websphere上部署应用程序时 - NoTargetForURIException While deploying application on Websphere with IntelliJ EJB 3.1 绑定在 Websphere Application Server 上不起作用 - EJB 3.1 Binding does not work on Websphere Application Server 从WebSphere Administration Console 7.0或WebSphere Application Server的utils调用EJB无状态会话Bean方法 - Invoke EJB Stateless Session Bean method from WebSphere Administration console 7.0 or with WebSphere Application Server's utils 部署我的Flex应用程序 - Deploying my flex application
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM