[MAGNOLIA-2716] Invalid JDOM/JAXEN distribution included Created: 06/May/09 Updated: 27/Nov/13 Resolved: 07/Oct/13 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | build |
| Affects Version/s: | 4.0.1 |
| Fix Version/s: | 4.0.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Egor Kolesnikov | Assignee: | Magnolia International |
| Resolution: | Outdated | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
ubuntu 9.04, JBoss 5.0.1, MySQL 5.0 |
||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Template: |
|
||||||||
| Acceptance criteria: |
Empty
|
||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||||||
| Date of First Response: | |||||||||
| Description |
|
After changing DERBY repository to MYSQL one, the following error appears while deploying to JBoss 5.0.1: java.lang.NoSuchMethodError: org.jdom.Element.getParent()Lorg/jdom/Element; However, after replacing WEB-INF/lib/jaxen-1.0-FCS.jar and WEB-INF/lib/jdom-1.0.jar with jdom.jar, jaxen-core.jar and jaxen-jdom.jar from JDOM1.0 distribution obtained from jdom.org, everything started working properly. |
| Comments |
| Comment by Magnolia International [ 06/May/09 ] |
|
Did this really only start happening after changing the repo config? I'm probably missing something, but I don't really see the connection ... Could you also please attach a more complete stacktrace ? |
| Comment by Magnolia International [ 06/May/09 ] |
|
Note that the jdom-1.0.jar we bundle (from central maven repo) is identical to the jdom.jar found in the jdom distrib. $ cat ./lib/jaxen.readme The Jaxen libraries included here are based on Jaxen 1.0-FCS. Jaxen 1.0-FCS was written against JDOM Beta 9, and for Jaxen to support JDOM Beta 10+, we had to make the following change to org.jaxen.jdom.DocumentNavigator. The jaxen-jdom.jar provided here includes this change, and it's the only difference between the JARs here and the Jaxen 1.0-FCS JARs. |
| Comment by Egor Kolesnikov [ 06/May/09 ] |
|
Exactly. Steps to reproduce issue: 1. unpack magnolia-4.0.1 to m.war (or whatever); <code> </code> (full log file attached) |
| Comment by Egor Kolesnikov [ 06/May/09 ] |
|
By the way, it now seems to me like STK problem, because this exception does not happen if you either: 1) do not run jboss with derby config before changing repo to mysql; in case (2), by the way, there are lot of "workspace invalid" exceptions, but everything looks like working: Additionally, it seems now that proposed workaround (replace JARs) does not work: |
| Comment by Egor Kolesnikov [ 06/May/09 ] |
|
full log file (wrong one has been attached initially) |
| Comment by Magnolia International [ 06/May/09 ] |
|
Thanks. From the stacktrace, I don't think it's related directly to stk. Sounds to me like another instance of |
| Comment by Egor Kolesnikov [ 06/May/09 ] |
|
Checking JBoss classloaders was the first thing I've done At the moment, I've deployed both author and public instances by configuring mysql repository BEFORE first deployment of Magnolia. I guess "workspace invalid" comes up because Magnolia tries to find some files in deleted repo. Will send you the stacktrace tomorrow, I'm out of the office now. |
| Comment by Philipp Bärfuss [ 07/May/09 ] |
|
Side note: I have seen this exception several times I run magnolia directly in eclipse (tomcat). |
| Comment by Philipp Bärfuss [ 12/May/09 ] |
|
Updating the dependencies to jdom 1.1 and jaxen 1.1.1 solves the issue but this is only an option for the new 4.1 release. We could update the 4.0.1 jaxen dependency to the ones org.jdom provides. <dependency>
<!-- This is a version of jaxen:jaxen:1.0-FCS patched by jdom,
which is provided in the jdom 1.0 distribution,
and is NOT the same as jaxen:jaxen:1.0-FCS -->
<groupId>org.jdom</groupId>
<artifactId>jaxen-jdom</artifactId>
<version>1.0-FCS</version>
</dependency>
|
| Comment by Philipp Bärfuss [ 12/May/09 ] |
|
For Magnolia 4.1 the issue has been solved by |
| Comment by Magnolia International [ 02/Jul/09 ] |
|
Unfortunately, the org.jdom:jaxen-jdom:1.0-FCS jar only provides the 3 classes that have been patched for JDom 1.0. These classes are also present in the jaxen:jaxen:1.0-FCS jar. Since, afaik, we can't enforce classpath order, the only way to solve this would be to either repackage jaxen ourselves (unless someone has done it? .. or to update to JDom 1.1 and Jaxen 1.1.1, which is what we did for Magnolia 4.1 As far as I can tell, we currently only need Jaxen for xpath in WebXmlUtil. Hopefully, if we do a 4.0.x release after 4.0.2, we'll have time to investigate and potentially fix this. In the meantime, one could update jdom/jaxen in case of issues, or add the jaxen-jdom jar and pray for the classloader to load it first. |