2012-01-11 5 views
-1

를 MySQL로 태피스트리 5 데모 (태피스트리 - 호텔 - 예약)의 데이터베이스를 변경하는 방법 :나는 다음과 같은 hibernate.cfg.xml로 변경

<!DOCTYPE hibernate-configuration PUBLIC 
     "-//Hibernate/Hibernate Configuration DTD 3.0//EN" 
     "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> 
<hibernate-configuration> 
    <session-factory> 
     <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property> 
     <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/quickstart</property> 
     <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property> 
     <property name="hibernate.connection.username">root</property> 
     <property name="hibernate.connection.password">aaa</property> 
     <property name="hbm2ddl.auto">update</property> 
     <property name="hibernate.show_sql">true</property> 
     <property name="hibernate.format_sql">true</property> 
    </session-factory> 
</hibernate-configuration> 

하지만 난 실행하고 다음과 같은 오류를 가질 수 없습니다 :

[ERROR] ioc.Registry Error invoking constructor public org.apache.tapestry5.internal.hibernate.HibernateSessionSourceImpl(org.slf4j.Logger,java.util.List): org.slf4j.helpers.MessageFormatter.format(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/String; 
[ERROR] ioc.Registry Operations trace: 
[ERROR] ioc.Registry [ 1] Realizing service RegistryStartup 
[ERROR] ioc.Registry [ 2] Instantiating service RegistryStartup implementation via org.apache.tapestry5.ioc.internal.services.RegistryStartup(Logger, List) (at RegistryStartup.java:36) via org.apache.tapestry5.ioc.services.TapestryIOCModule.bind(ServiceBinder) (at TapestryIOCModule.java:49) 
[ERROR] ioc.Registry [ 3] Creating plan to instantiate org.apache.tapestry5.ioc.internal.services.RegistryStartup via public org.apache.tapestry5.ioc.internal.services.RegistryStartup(org.slf4j.Logger,java.util.List) 
[ERROR] ioc.Registry [ 4] Determining injection value for parameter #2 (java.util.List) 
[ERROR] ioc.Registry [ 5] Collecting ordered configuration for service RegistryStartup 
[ERROR] ioc.Registry [ 6] Invoking www.com.example.forum.dal.DataModule.initialize() (at DataModule.java:37) 
[ERROR] ioc.Registry [ 7] Instantiating service HibernateSessionManager implementation via org.apache.tapestry5.hibernate.HibernateCoreModule.buildHibernateSessionManager(HibernateSessionSource, PerthreadManager) (at HibernateCoreModule.java:96) 
[ERROR] ioc.Registry [ 8] Constructing service implementation via org.apache.tapestry5.hibernate.HibernateCoreModule.buildHibernateSessionManager(HibernateSessionSource, PerthreadManager) (at HibernateCoreModule.java:96) 
[ERROR] ioc.Registry [ 9] Realizing service HibernateSessionSource 
[ERROR] ioc.Registry [10] Instantiating service HibernateSessionSource implementation via org.apache.tapestry5.internal.hibernate.HibernateSessionSourceImpl(Logger, List) (at HibernateSessionSourceImpl.java:36) via org.apache.tapestry5.hibernate.HibernateCoreModule.bind(ServiceBinder) (at HibernateCoreModule.java:45) 

등등.

답변

1

클래스 패스 문제 인 것 같습니다. 필요한 모든 JAR 및 클래스 패스에 불필요한 JARS가 있는지 확인해야합니다. SLF4J (로깅 프레임 워크) JAR의 버전이 일치하지 않을 수도 있습니다.