[
http://jira.jboss.com/jira/browse/JBAS-3736?page=all ]
Dimitris Andreadis reassigned JBAS-3736:
----------------------------------------
Assignee: Emmanuel Bernard (was: Scott M Stark)
Emmanuel, can you check out this case.
I've removed jaxen from the AS build, since there was no compile time dependency, plus
we had a problem before with dom4j loaded at boot time, using jaxen.
With the dom4j dependency removed from the jboss core libs (see JBAS-3666) I can now put
dom4j and jaxen in the server/default|all/lib directory, where they can be normally
upgraded, if necessary.
We now at dom4j v1.6.1
Is jaxen really needed by hibernate, as the case describes, and if so, which is the proper
version to include with the build.
Thanks
JBoss AS 4.0.5.CR1 does not include jaxen, which is required for
using Hibernate XML mapping
--------------------------------------------------------------------------------------------
Key: JBAS-3736
URL:
http://jira.jboss.com/jira/browse/JBAS-3736
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: ClassLoading
Affects Versions: JBossAS-4.0.5.CR1
Environment: SUSE Linux 10.0, Sun JRE 1.5.0_05-b05
Reporter: Don Smith
Assigned To: Emmanuel Bernard
Fix For: JBossAS-4.0.5.GA
Hibernate XML mapping requires using the org.dom4j.Document, as shown in this example:
org.dom4j.Document document = saxReader.read(inputXML);
List users = document.selectNodes("//product");
try {
Session session = HibernateUtil.sessionFactory.openSession();
Transaction transaction = session.beginTransaction();
Session dom4jSession = session.openSession(EntityMode.DOM4J);
Iterator iter = users.iterator();
while (iter.hasNext()) {
Object next = iter.next();
dom4jSession.saveOrUpdate("demo.Product", next );
}// end while
transaction.commit();
session.close();
If any other type of Document is used for the dom4jSession.saveOrUpdate() call, it throws
an exception.
Using SAXReader.read() throws a NoClassDefFound error using JBoss 4.0.5.CR1, unless jaxen
(jaxen-1.1-beta-7.jar from the Hibernate 3.2.cr4 download) is added the the server
configuration's lib directory.
I submit that jaxen is required to use the XML Mapping facility of Hibernate, and that
it's missing from JBoss 4.0.5.CR1.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira