[
https://jira.codehaus.org/browse/MEAR-146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=300502#comment-300502
]
Alex Halovanic commented on MEAR-146:
-------------------------------------
I have the response back from Oracle:
{quote}
You can either use AppFileOverrides directory (and let the container do the
classloading discovery), or you can use <library-directory> and you decide
where you want the files to come from. You should not use both.
By default, library-directory will be loaded from APP-INF/lib of the EAR
anyways, rendering the explicit <library-directory> inside the application.xml
is redundant.
When no <library-directory>, you're delegating the classloading to the
container (ie. WLS), and the documented behavior below will suffix :
http://docs.oracle.com/cd/E12839_01/web.1111/e13702/config.htm#i1066493
However, if you explicitly define <library-directory> in application.xml, this
would take precedence, and since you specify the following -
...
<library-directory>APP-INF/lib</library-directory>
...
.
in which you have the following file in APP-INF/lib in
classloader-ear-libdir.ear -
.
classloader-jse-1.0-SNAPSHOT.ear
.
In such case, you're essentially overriding the AppFileOverrides directory.
So you can either use <library-directory> or AppFileOverrides, but not both. If
both are specified, <library-directory> will take precedence.
{quote}
So in their opinion, this is not a bug, but intended behavior and always
defining <library-directory> to the default EAR lib folder has side-effects.
However, unless there's another product that has special classloading overrides
like this, it's almost certainly still WebLogic-specific.
> Expose parameter to not write library-directory element in application.xml
> --------------------------------------------------------------------------
>
> Key: MEAR-146
> URL: https://jira.codehaus.org/browse/MEAR-146
> Project: Maven 2.x Ear Plugin
> Issue Type: Improvement
> Affects Versions: 2.8
> Environment: Oracle WebLogic
> Reporter: Alex Halovanic
> Priority: Minor
> Attachments: ear-remove-librarydirectory-IT.patch,
> ear-remove-librarydirectory.patch
>
>
> The current handling of defaultLibBundleDir leads to some issues on Oracle
> Weblogic 10+. The Ear plugin currently sets library-directory to the value
> of defaultLibBundleDir in the application.xml for EARs v5+. Some of Oracle's
> classloading features break (specifically "Generic File Loading") when this
> element is set. defaultLibBundleDir has to be set to APP-INF/lib since this
> is the magic library folder for WebLogic.
> The patch adds a parameter to prevent setting library-directory for cases
> like this.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira