简体   繁体   English

weblogic.utils.compiler.ToolFailureException Weblogic 12.2.1

[英]weblogic.utils.compiler.ToolFailureException Weblogic 12.2.1

When deploying my application to Weblogic 12.2.1, I get this error:将我的应用程序部署到 Weblogic 12.2.1 时,出现此错误:

weblogic.application.ModuleException:
weblogic.utils.compiler.ToolFailureException: Neither prefer-application-packages  
nor prefer-application-resources can be specified when prefer-web-inf-classes  
is turned on in weblogic.xml

In weblogic.xml , I have set prefer-web-inf-classes to true.weblogic.xml ,我已将 preferred-web-inf-classes 设置为 true。

I use JDeveloper to deploy the application.我使用 JDeveloper 来部署应用程序。 Nowhere in my application's deployment descriptors ( web.xml and weblogic-application.xml ) do I use prefer-application-packages or prefer-application-resources .在我的应用程序的部署描述符( web.xmlweblogic-application.xml )中,我没有使用prefer-application-packagesprefer-application-resources Why is Weblogic showing this error?为什么 Weblogic 会显示此错误?

Regards, Jeroen问候, 杰伦

Check carefully, based on the documentation over here: Deployment Descriptor Elements , A value specified in the Administration Console will take precedence over a value set manually.根据此处的文档仔细检查: 部署描述符元素A value specified in the Administration Console will take precedence over a value set manually. So it must have been set somewhere.所以它一定是在某个地方设置的。

If you have prefer-web-inf-classes to true so you can't use prefer-application-packages.如果你有比 true 更喜欢 web-inf-classes,那么你不能使用 prefer-application-packages。 You have to use one of them but not both....您必须使用其中之一,但不能同时使用....

I had the same issue migrating from WL11 to WL12 :我在从 WL11 迁移到 WL12 时遇到了同样的问题:

Weblogic 12c : Prefer-web-inf-classes and prefer-application-packages for Jersey Weblogic 12c:Jersey 的 Prefer-web-inf-classes 和 preferred-application-packages

After all :毕竟:

  1. Use just prefer-web-inf-classes to true.只使用 prefer-web-inf-classes 到 true。
  2. If you use this, you don't need to use prefer-application-packages ....BUT ENSURE that you have the correct libraries at war /ear level.如果你使用它,你不需要使用prefer-application-packages ....但确保你在war /ear级别拥有正确的库。

can you export your application to an ear file and there verify if there is no weblogic-application.xml with prefer-application-packages or prefer-application-resources tags ?您可以将您的应用程序导出到一个ear 文件,然后验证是否没有带有prefer-application-packages 或prefer-application-resources 标签的weblogic-application.xml 吗?

Jdeveloper creates automatically those files when there are any shared libraries, and could be the case.当有任何共享库时,Jdeveloper 会自动创建这些文件,可能是这种情况。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM