jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 2.x Ear Plugin
  • MEAR-146

Expose parameter to not write library-directory element in application.xml

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Improvement Improvement
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 2.8
  • Fix Version/s: None
  • Labels:
    None
  • Environment:
    Oracle WebLogic
  • Testcase included:
    yes
  • Patch Submitted:
    Yes

Description

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.

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Text File
    ear-remove-librarydirectory.patch
    24/Jan/12 3:31 PM
    4 kB
    Alex Halovanic
  2. Text File
    ear-remove-librarydirectory-IT.patch
    24/Jan/12 3:31 PM
    5 kB
    Alex Halovanic

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Stéphane Nicoll added a comment - 24/Jan/12 11:21 PM

I am confused. library-directory is only written if you set the defaultLibDirectory. If I understand you well, you're saying you must use it (to use the magic APP-INF/lib thing) but we should not write the value in that case?

I believe you're asking here to workaround a bug in Weblogic, right. Has this been reported by any chance?

Show
Stéphane Nicoll added a comment - 24/Jan/12 11:21 PM I am confused. library-directory is only written if you set the defaultLibDirectory. If I understand you well, you're saying you must use it (to use the magic APP-INF/lib thing) but we should not write the value in that case? I believe you're asking here to workaround a bug in Weblogic, right. Has this been reported by any chance?
Hide
Permalink
Alex Halovanic added a comment - 25/Jan/12 8:13 AM

You've got it exactly. Definitely a bug in WebLogic. I am working on putting together a bug report with Oracle, but from past experience, if they don't first tell me this is intended behavior, they won't release a fix to others since it's not a security flaw.

Show
Alex Halovanic added a comment - 25/Jan/12 8:13 AM You've got it exactly. Definitely a bug in WebLogic. I am working on putting together a bug report with Oracle, but from past experience, if they don't first tell me this is intended behavior, they won't release a fix to others since it's not a security flaw.
Hide
Permalink
Stéphane Nicoll added a comment - 25/Jan/12 9:43 AM

In that case, I prefer a weblogic configuration option, like we've done for JBoss. Your patch is a too wide option that sole purpose is to workaround a bug.

Something like

<configuration>
  <weblogic>
    <write-library-directory>false</write-library-directory>
  </weblogic>
</configuration>
Show
Stéphane Nicoll added a comment - 25/Jan/12 9:43 AM In that case, I prefer a weblogic configuration option, like we've done for JBoss. Your patch is a too wide option that sole purpose is to workaround a bug. Something like
<configuration>
  <weblogic>
    <write-library-directory>false</write-library-directory>
  </weblogic>
</configuration>
Hide
Permalink
Alex Halovanic added a comment - 25/Jan/12 9:17 PM

Well, fair enough, I'm not too happy about an option just for working around a bug.

But you did bring up the point that library-directory would only get written if defaultLibDirectory is set. Can I ask, is there a reason why JARs are written to the root by default? From http://java.sun.com/xml/ns/javaee/application_5.xsd:
"If this element [library-directory] isn't specified, the directory named "lib" is searched."

Should jars be written to lib/ by default instead of the root? It seems to be the expected location according to the spec and would seem to eliminate the need for defining defaultLibDirectory in most cases.

Show
Alex Halovanic added a comment - 25/Jan/12 9:17 PM Well, fair enough, I'm not too happy about an option just for working around a bug. But you did bring up the point that library-directory would only get written if defaultLibDirectory is set. Can I ask, is there a reason why JARs are written to the root by default? From http://java.sun.com/xml/ns/javaee/application_5.xsd: "If this element [library-directory] isn't specified, the directory named "lib" is searched." Should jars be written to lib/ by default instead of the root? It seems to be the expected location according to the spec and would seem to eliminate the need for defining defaultLibDirectory in most cases.
Hide
Permalink
Stéphane Nicoll added a comment - 26/Jan/12 2:02 AM

Well, I think you got it wrong or I am missing something. Your request IS about working around a bug!

The answer is backward compatibility. This option was present way before JavaEE5 came out (actually it was mostly used on old weblogic version and the magic APP-INF/lib thing). Changing the behavior of an existing option according the version of the spec you use is a bit tricky.

The other reason is that users (for mysterious reasons) keep on willing to put libs in the root. If you change the default, it's harder to justify the behavior breakage.

Show
Stéphane Nicoll added a comment - 26/Jan/12 2:02 AM Well, I think you got it wrong or I am missing something. Your request IS about working around a bug! The answer is backward compatibility. This option was present way before JavaEE5 came out (actually it was mostly used on old weblogic version and the magic APP-INF/lib thing). Changing the behavior of an existing option according the version of the spec you use is a bit tricky. The other reason is that users (for mysterious reasons) keep on willing to put libs in the root. If you change the default, it's harder to justify the behavior breakage.
Hide
Permalink
Alex Halovanic added a comment - 26/Jan/12 8:10 AM

I was agreeing with you about it being a workaround for a bug; I'm fine with rewriting the patch to make it be listed as for WebLogic only. I think I should just wait for Oracle to get back to me about this before I do, in case they have a more appropriate fix.

Show
Alex Halovanic added a comment - 26/Jan/12 8:10 AM I was agreeing with you about it being a workaround for a bug; I'm fine with rewriting the patch to make it be listed as for WebLogic only. I think I should just wait for Oracle to get back to me about this before I do, in case they have a more appropriate fix.
Hide
Permalink
Stéphane Nicoll added a comment - 26/Jan/12 8:40 AM

k

Show
Stéphane Nicoll added a comment - 26/Jan/12 8:40 AM k

People

  • Assignee:
    Unassigned
    Reporter:
    Alex Halovanic
Vote (0)
Watch (1)

Dates

  • Created:
    24/Jan/12 3:31 PM
    Updated:
    26/Jan/12 8:40 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.