Я использую 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
Я подозреваю, что яконфликт между jar в jboss lib и jarss в моих зависимостях.Кто-нибудь может подсказать, что это может быть?