こんにちは、mysql で休止状態を設定しようとしています。
依存関係を取得するために IntelliJ で Maven を使用しています。
私の休止状態の設定ファイルは
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="connection.url">jdbc:mysql://localhost:3306/test</property>
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="connection.username">root</property>
<property name="connection.password">SYS</property>
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="transaction.factory_class">org.hibernate.engine.transaction.internal.jdbc.JdbcTransactionFactory</property>
<mapping resource="Person.hdm.xml"></mapping>
</session-factory>
</hibernate-configuration>
マッピングクラス Person.hdm.xml があります
<hibernate-mapping>
<class name="Person">
<id name="FirstName"/>
</class>
</hibernate-mapping>
私は次のスタックを取得しています..
222 [main] INFO org.hibernate.cfg.Configuration - HHH000221: Reading mappings from resource: hibernate.cfg.xml
Exception in thread "main" java.lang.ExceptionInInitializerError
at Main.<clinit>(Main.java:24)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:113)
Caused by: java.lang.NoSuchFieldError: TRACE
at org.jboss.logging.Log4jLogger.translate(Log4jLogger.java:64)
at org.jboss.logging.Log4jLogger.isEnabled(Log4jLogger.java:39)
at org.jboss.logging.Logger.logv(Logger.java:1953)
at org.hibernate.internal.CoreMessageLogger_$logger.tracev(CoreMessageLogger_$logger.java:443)
at org.hibernate.cfg.EJB3DTDEntityResolver.resolveEntity(EJB3DTDEntityResolver.java:58)
at org.apache.xerces.util.EntityResolverWrapper.resolveEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.resolveEntity(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.dom4j.io.SAXReader.read(SAXReader.java:465)
at org.hibernate.internal.util.xml.MappingReader.readMappingDocument(MappingReader.java:76)
at org.hibernate.cfg.Configuration.add(Configuration.java:477)
at org.hibernate.cfg.Configuration.add(Configuration.java:473)
at org.hibernate.cfg.Configuration.add(Configuration.java:646)
at org.hibernate.cfg.Configuration.addResource(Configuration.java:729)
at Main.<clinit>(Main.java:22)
... 3 more
どんな助けでも大歓迎です、
ありがとう、マーク