【问题标题】:Caused by: java.lang.NoClassDefFoundError: com/ibm/CORBA/iiop/ORB in WAS Liberty引起:java.lang.NoClassDefFoundError: com/ibm/CORBA/iiop/ORB in WAS Liberty
【发布时间】:2016-08-02 18:50:09
【问题描述】:

我开始在 Eclipse 中使用 WAS Liberty 8.5,当我尝试部署应用程序时出现此错误。

Caused by: java.lang.NoClassDefFoundError: com/ibm/CORBA/iiop/ORB

我发现这是由于 WAS 服务器安装提供的 WAS 运行时 jar ibmorb.jar

我不知道如何在 WAS Liberty 配置文件中进行配置。任何线索。

即使我在库路径中提到,但仍然出错。

<variable name="DRIVER_PATH" value="C:\NovemberR2\DMS\deploy\lib"/>
<library id="db2Lib">
          <fileset dir="${DRIVER_PATH}" includes="com.ibm.ws.orb_8.5.0.jar classes12.jar oracleJDBC.jar ojdbc6.jar ojdbc14.jar ibmorbapi.jar ibmorb.jar"/>
</library>

堆栈跟踪是--->

here is the stack trace.    ...` 61 more
Caused by: java.lang.NoClassDefFoundError: com/ibm/CORBA/iiop/ORB
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2442)
    at java.lang.Class.getMethod0(Class.java:2685)
    at java.lang.Class.getMethod(Class.java:1620)
    at com.ibm.ws.naming.util.Helpers.getInitORBMethodForNonApplet(Helpers.java:411)
    at com.ibm.ws.naming.util.Helpers.getOrb(Helpers.java:390)
    at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory.java:462)
    at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:128)
    orSourcesPropertyResolver.java:84)
    at org.springframework.core.env.PropertySourcesPropertyResolver.getProperty(PropertySourcesPropertyResolver.java:60)
    at org.springframework.core.env.AbstractEnvironment.getProperty(AbstractEnvironment.java:511)
    at org.springframework.context.support.PropertySourcesPlaceholderConfigurer$1.getProperty(PropertySourcesPlaceholderConfigurer.java:135)
    at org.springframework.context.support.PropertySourcesPlaceholderConfigurer$1.getProperty(PropertySourcesPlaceholderConfigurer.java:132)
    at org.springframework.core.env.PropertySourcesPropertyResolver.getProperty(PropertySourcesPropertyResolver.java:84)
    at org.springframework.core.env.PropertySourcesPropertyResolver.getPropertyAsRawString(PropertySourcesPropertyResolver.java:70)
    at org.springframework.core.env.AbstractPropertyResolver$1.resolvePlaceholder(AbstractPropertyResolver.java:207)
    at org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:147)
    at org.springframework.util.PropertyPlaceholderHelper.replacePlaceholders(PropertyPlaceholderHelper.java:126)
    at org.springframework.core.env.AbstractPropertyResolver.doResolvePlaceholders(AbstractPropertyResolver.java:204)
    at org.springframework.core.env.AbstractPropertyResolver.resolveRequiredPlaceholders(AbstractPropertyResolver.java:178)
    at org.springframework.context.support.PropertySourcesPlaceholderConfigurer$2.resolveStringValue(PropertySourcesPlaceholderConfigurer.java:175)
    at org.springframework.beans.factory.support.AbstractBeanFactory.resolveEmbeddedValue(AbstractBeanFactory.java:801)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:962)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:949)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:533)
    ... 63 more

感谢您的提示,但我曾经在 WAS 8.0 服务器和内置的 IBM WAS JDK 中很好地运行此应用程序,我开始使用 liberty 配置文件迁移到 WAS 8.5,并考虑对其进行试验。

【问题讨论】:

  • 异常的堆栈跟踪是什么?这将告诉您正在尝试加载它的内容。
  • 我用堆栈跟踪编辑了这个问题。
  • 我认为不支持 WAS JRE。

标签: websphere websphere-liberty


【解决方案1】:

希望这个答案对其他人有所帮助,因为它可能为时已晚! 尝试在类路径中添加com.ibm.ws.orb_8.5.0.jar。这个 jar 将在 &lt;WAS_HOME&gt;\AppServer\runtimes 下可用。这将解决问题。

【讨论】:

    【解决方案2】:

    这里的问题看起来像您使用 WAS 传统提供的 JDK 来运行 Liberty 服务器。

    WAS 传统版附带的 JDK 中将包含额外的东西,专门用于与传统版 WAS 一起运行(它不支持可插入的 JDK)。

    改为:
    使用标准 JDK 运行 Liberty 服务器。您可以从 IBM(不是传统 WAS 附带的)、Oracle 或 OpenJDK 获得标准 JDK。

    【讨论】:

      【解决方案3】:

      问题表明该应用程序在 WAS 8.0 上正常运行。使用 WAS 8.5,您现在正尝试在 Liberty Profile 上运行相同的应用程序。 Liberty 配置文件支持传统 WAS 配置文件功能的子集(现在称为“完整配置文件”)。

      正如用户 @aguibert 在他们的回答中提到的,您必须为 Liberty 配置文件提供 Java 运行时环境。这可以是任何兼容的 Java SE 6/7/8 JRE/JDK*。对于完整的配置文件,需要不同的 JDK;这与安装包捆绑在一起。此 WebSphere JDK 应包含 ibmorb.jar 文件。

      因此,请尝试使用 WAS 8.5 完整配置文件运行您的应用程序。这应该可以解决问题。您也可以考虑迁移到 WAS 的最新版本,即 v9.0。

      IBM 知识中心的其他资源:Liberty profile overview

      *以minimum supported Java levels为准。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2012-12-02
        • 1970-01-01
        • 1970-01-01
        • 2023-03-12
        • 1970-01-01
        • 2021-06-06
        • 1970-01-01
        • 2012-11-11
        相关资源
        最近更新 更多