WebLogic部署成功时出错

问题描述 投票:0回答:1

我们正在将在Java 6上运行的WebLogic 10升级到在Java 8上运行的WebLogic 12C。

最初我无法在WebLogic 12C上部署我的应用程序。我想,使用以下命令,我应该在我的“WEB_APPLICATION”.ear文件中更新几个ejb-jar.xml文件以克服验证错误。

java weblogic.DDConverter -d。 “WEB_APPLICATION” 的.ear

确切地说,我已经更新了所有“消息驱动目标”标签,以便与新版本的Java和WebLogic兼容。例如,我的一个ejb-jar.xml文件看起来像下面

<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.2">
    <display-name>CacheNotificationsMDBeanModule</display-name>
    <enterprise-beans>
    <message-driven>
      <description>Message driven bean for cache notifications</description>
      <display-name>CacheNotificationsMDB</display-name>
      <ejb-name>CacheNotificationsMDB</ejb-name>
      <ejb-class>com.cache.CacheNotificationsMDB</ejb-class>
      <transaction-type>Bean</transaction-type>   
      <activation-config>
        <activation-config-property>
          <activation-config-property-name>destinationType</activation-config-property-name>
          <activation-config-property-value>javax.jms.Topic</activation-config-property-value>
        </activation-config-property>
        <activation-config-property>
          <activation-config-property-name>subscription-durability</activation-config-property-name>
          <activation-config-property-value>NonDurable</activation-config-property-value>
        </activation-config-property>
      </activation-config>    
    </message-driven>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
      <method>
        <ejb-name>CacheNotificationsMDB</ejb-name>
        <method-name>*</method-name>
      </method>
      <trans-attribute>NotSupported</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
</ejb-jar>

虽然我现在可以部署我的应用程序,但我收到以下消息和错误。

<**********> <******> <[ACTIVE] ExecuteThread:队列为'19':'weblogic.kernel.Default(self-tuning)'> <> <> < 37954930-b27e-4d11-86e2-87dc139d7fda-00000012> <1535573307036> <[severity-value:16] [rid:0] [partition-id:0] [partition-name:DOMAIN]>,EJBComponent:common-utils- mdbs.jar)配置了未知的activation-config-property name subscription-durability>

<**********> <******> <[STANDBY] ExecuteThread:队列为'1':'weblogic.kernel.Default(self-tuning)'> <> <37954930- b27e-4d11-86e2-87dc139d7fda-00000007> <1535573336247> <[severity-value:16] [rid:0] [partition-id:0] [partition-name:DOMAIN]> / kuy712 / war / WEB-INF / validation.xml,不符合JSR 303规范。>

<**********> <******> <[STANDBY] ExecuteThread:队列为'1':'weblogic.kernel.Default(self-tuning)'> <> <37954930- b27e-4d11-86e2-87dc139d7fda-00000007> <1535573336243> <[severity-value:32] [rid:0] [partition-id:0] [partition-name:DOMAIN]>

指定目录中的validation.xml文件如下所示

<!DOCTYPE form-validation PUBLIC
          "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.1//EN"
          "dtds/validator_1_1_3.dtd">
<form-validation>

  <!--  Default locale validation -->

  <!--  Some of the example validation in the default formset are diabled for now,
    but can be enabled and customized as needed
    for your default and other formsets formset. Note that http://www.regexlib.com/ may
    contain usefull regular expressions to apply to your customization
    with the "mask" validator! -->
  <formset>
    .......

和validator_1_1_3.dtd文件存在于以下目录中。

/ U01 /应用/ ORACLE /配置/域/ Domainlab /服务器/ ********的/ tmp / _WL_user // kuy712 /战争/ WEB-INF / DTD的

我是weblogic的新手,我不太确定如何解决这个问题。有人可以帮帮我吗?

java weblogic12c bean-validation dtd
1个回答
1
投票

你的ejb-jar.xml应该是:

<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.2">
    <display-name>CacheNotificationsMDBeanModule</display-name>
    <enterprise-beans>
    <message-driven>
      <description>Message driven bean for cache notifications</description>
      <display-name>CacheNotificationsMDB</display-name>
      <ejb-name>CacheNotificationsMDB</ejb-name>
      <ejb-class>com.cache.CacheNotificationsMDB</ejb-class>
      <transaction-type>Bean</transaction-type>   
      <activation-config>
        <activation-config-property>
          <activation-config-property-name>destinationType</activation-config-property-name>
          <activation-config-property-value>javax.jms.Topic</activation-config-property-value>
        </activation-config-property>
        <activation-config-property>
          <activation-config-property-name>subscriptionDurability</activation-config-property-name>
          <activation-config-property-value>NonDurable</activation-config-property-value>
        </activation-config-property>
      </activation-config>    
    </message-driven>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
      <method>
        <ejb-name>CacheNotificationsMDB</ejb-name>
        <method-name>*</method-name>
      </method>
      <trans-attribute>NotSupported</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
</ejb-jar>

允许的属性名称为:acknowledgeMode,messageSelector,destinationType,subscriptionDurability,destinationLookup,connectionFactoryLookup,subscriptionName和clientId。订阅持久性是不允许的。

© www.soinside.com 2019 - 2024. All rights reserved.