When deploying my application to Weblogic 12.2.1, I get this error:
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.
I use JDeveloper to deploy the application. Nowhere in my application's deployment descriptors ( web.xml
and weblogic-application.xml
) do I use prefer-application-packages
or prefer-application-resources
. Why is Weblogic showing this error?
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.
So it must have been set somewhere.
If you have prefer-web-inf-classes to true so you can't use prefer-application-packages. You have to use one of them but not both....
I had the same issue migrating from WL11 to WL12 :
Weblogic 12c : Prefer-web-inf-classes and prefer-application-packages for Jersey
After all :
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 ?
Jdeveloper creates automatically those files when there are any shared libraries, and could be the case.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.