gpt4 book ai didi

java - WebLogic 部署成功,但有错误

转载 作者:行者123 更新时间:2023-12-02 10:52:01 27 4
gpt4 key购买 nike

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

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

java weblogic.DDConverter -d . "WEB_APPLICATION".ear

准确地说,我已经更新了所有“message-driven-destination”标签,以与新版本的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' for queue: '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) is configured with unknown activation-config-property name subscription-durability>

<**********> <******> <[STANDBY] ExecuteThread: '1' for queue: '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, does not conform to the JSR 303 specifications.>

<**********> <******> <[STANDBY] ExecuteThread: '1' for queue: '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/app/oracle/config/domains/Domainlab/servers/********/tmp/_WL_user//kuy712/war/WEB-INF/dtds

我是 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>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。不允许订阅持久性。

关于java - WebLogic 部署成功,但有错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52100094/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com