JBOSS 5.1.0.GA と Hibernate を使用しています
データベースに接続しようとすると、次のエラーが表示されます
10:21:03,042 INFO [Version] Hibernate Commons Annotations 3.1.0.GA
10:21:03,049 INFO [Configuration] configuring from resource: /hibernate.cfg.xml
10:21:03,049 INFO [Configuration] Configuration resource: /hibernate.cfg.xml
10:21:03,077 INFO [STDOUT] Warning: Caught exception attempting to use SAX to load a SAX XMLReader
10:21:03,077 INFO [STDOUT] Warning: Exception was: java.lang.ClassCastException: org.apache.xerces.parsers.SAXParser cannot be cast to org.xml.sax.XMLReader
10:21:03,077 INFO [STDOUT] Warning: I will print the stack trace then carry on using the default SAX parser
10:21:03,077 ERROR [STDERR] java.lang.ClassCastException: org.apache.xerces.parsers.SAXParser cannot be cast to org.xml.sax.XMLReader
10:21:03,078 ERROR [STDERR] at org.xml.sax.helpers.XMLReaderFactory.loadClass(Unknown Source)
10:21:03,078 ERROR [STDERR] at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(Unknown Source)
10:21:03,078 ERROR [STDERR] at org.dom4j.io.SAXHelper.createXMLReader(SAXHelper.java:83)
10:21:03,078 ERROR [STDERR] at org.dom4j.io.SAXReader.createXMLReader(SAXReader.java:894)
10:21:03,078 ERROR [STDERR] at org.dom4j.io.SAXReader.getXMLReader(SAXReader.java:715)
10:21:03,078 ERROR [STDERR] at org.dom4j.io.SAXReader.read(SAXReader.java:435)
10:21:03,078 ERROR [STDERR] at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1518)
それから
10:21:03,386 INFO [STDOUT] 10:21:03,382 ERROR [DatabaseManager] Error intialising Hibernate
org.hibernate.HibernateException: Could not parse configuration: /hibernate.cfg.xml
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1528)
at org.hibernate.cfg.AnnotationConfiguration.doConfigure(AnnotationConfiguration.java:1035)
at org.hibernate.cfg.AnnotationConfiguration.doConfigure(AnnotationConfiguration.java:64)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1462)
at org.hibernate.cfg.AnnotationConfiguration.configure(AnnotationConfiguration.java:1017)
at org.hibernate.cfg.AnnotationConfiguration.configure(AnnotationConfiguration.java:64)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1448)
Caused by: org.dom4j.DocumentException: SAX2 driver class org.apache.xerces.parsers.SAXParser does not implement XMLReader Nested exception: SAX2 driver class org.apache.xerces.parsers.SAXParser does not implement XMLReader
at org.dom4j.io.SAXReader.read(SAXReader.java:484)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1518)
私は次の依存関係を持っています:-
hibernate-annotations 3.4.0.GA hibernate-commons-annotations 3.1.0.GA hibernate-core 3.3.0.SP1
jboss lib 内の jar と依存関係内の jar の間に競合があると思われます。誰かがそれが何であるかを提案できますか?