【问题标题】:Springboot maven war works on local weblogic 12.2.1.2 but not on other systemSpringboot maven war 适用于本地 weblogic 12.2.1.2 但不适用于其他系统
【发布时间】:2019-12-12 09:47:38
【问题描述】:

我在 Eclipse 氧气中使用 maven 开发了一个应用程序。它使用弹簧靴 2.1.6。如果启用了 wls:prefer-application-packages,它将在我的本地 weblogic 12.2.1.3 上运行。但在其他系统上不行。尝试了 weblogic.xml 的不同组合。这段代码在 weblogic 中不起作用。

 <wls:container-descriptor>
                    <wls:prefer-web-inf-classes>true</wls:prefer-web-inf-classes>
                </wls:container-descriptor>
            The following works locally but not on other systems.
            <wls:container-descriptor>
             <wls:prefer-application-packages>
                        <wls:package-name>org.slf4j.*</wls:package-name>
                        <wls:package-name>org.springframework.*</wls:package-name>
                        <wls:package-name>org.hibernate.*</wls:package-name>
                        <wls:package-name>javax.validation.*</wls:package-name>
                        <wls:package-name>javax.validation.spi.*</wls:package-name>
                    </wls:prefer-application-packages>
                </wls:container-descriptor>
            Error:
            An attempt was made to call a method that does not exist. The attempt was made from the following location:

                org.hibernate.validator.internal.xml.config.ValidationBootstrapParameters.<init>(ValidationBootstrapParameters.java:63)

            The following method did not exist:

                javax.validation.BootstrapConfiguration.getClockProviderClassName()Ljava/lang/String;

            The method's class, javax.validation.BootstrapConfiguration, is available from the following locations:

                zip:C:/wls12213/user_projects/domains/base_domain/servers/AdminServer/tmp/_WL_user/demo-0.0.1-SNAPSHOT/vluesa/war/WEB-INF/lib/validation-api-2.0.1.Final.jar!/javax/validation/BootstrapConfiguration.class
                jar:file:/C:/wls12213/oracle_common/modules/javax.validation.jar!/javax/validation/BootstrapConfiguration.class

            It was loaded from the following location:

                file:/C:/wls12213/oracle_common/modules/javax.validation.jar

            The war file which is currently generated through pom.xml should work on all weblogic server at least with the same version.

【问题讨论】:

  • 这听起来像是您需要调查作为应用程序一部分部署的依赖项,因为该错误似乎表明版本不匹配。那里可能有一些不应该与应用程序一起部署的过时依赖项。

标签: maven spring-boot weblogic12c


【解决方案1】:

Yoy 不能同时使用这两个标签。

<wls:prefer-web-inf-classes>true</wls:prefer-web-inf-classes>

<wls:prefer-application-packages>

二选一。

另外,当我测试这个时,我只得到了

<wls:prefer-application-packages>

在独立服务器上工作。但是没有做彻底的工作,因为我让它与提到的标签一起工作。

Oracle documentation

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-07-08
    • 2021-01-16
    • 2018-12-07
    • 1970-01-01
    • 2020-07-07
    相关资源
    最近更新 更多