- - PR -
Hibernateでjavax/transaction/Synchronizationが見つからない
1
投稿者 | 投稿内容 |
---|---|
|
投稿日時: 2004-05-30 10:38
こんにちは。
まず、環境。 JDK J2SDK1.4.2_03 Hibernate Hibernate2.1.2 xdoclet xdoclet1.2 ant ant1.6.1 DB MySQL4.0.18 あるサイトの手順どおり進めているのですがxdocletを実行し、schemaexportを実行しDBにテーブルができていることを確認したのですが、実行時にエラーで実行できません。何か足りないのでしょうか? ------------------------------------------------ 実行時のログ 2004/05/30 10:09:42 net.sf.hibernate.cfg.Environment <clinit> 情報: Hibernate 2.1.2 2004/05/30 10:09:42 net.sf.hibernate.cfg.Environment <clinit> 情報: hibernate.properties not found 2004/05/30 10:09:42 net.sf.hibernate.cfg.Environment <clinit> 情報: using CGLIB reflection optimizer 2004/05/30 10:09:42 net.sf.hibernate.cfg.Configuration configure 情報: configuring from resource: /hibernate.cfg.xml 2004/05/30 10:09:42 net.sf.hibernate.cfg.Configuration getConfigurationInputStre am 情報: Configuration resource: /hibernate.cfg.xml 2004/05/30 10:09:43 net.sf.hibernate.cfg.Configuration addResource 情報: Mapping resource: Customer.hbm.xml 2004/05/30 10:09:43 net.sf.hibernate.cfg.Binder bindRootClass 情報: Mapping class: Customer -> customer 2004/05/30 10:09:43 net.sf.hibernate.cfg.Configuration doConfigure 情報: Configured SessionFactory: null 2004/05/30 10:09:43 net.sf.hibernate.cfg.Configuration secondPassCompile 情報: processing one-to-many association mappings 2004/05/30 10:09:43 net.sf.hibernate.cfg.Configuration secondPassCompile 情報: processing one-to-one association property references 2004/05/30 10:09:43 net.sf.hibernate.cfg.Configuration secondPassCompile 情報: processing foreign key constraints 2004/05/30 10:09:43 net.sf.hibernate.dialect.Dialect <init> 情報: Using dialect: net.sf.hibernate.dialect.MySQLDialect 2004/05/30 10:09:43 net.sf.hibernate.cfg.SettingsFactory buildSettings 情報: Use outer join fetching: true 2004/05/30 10:09:43 net.sf.hibernate.connection.DriverManagerConnectionProvider configure 情報: Using Hibernate built-in connection pool (not for production use!) 2004/05/30 10:09:43 net.sf.hibernate.connection.DriverManagerConnectionProvider configure 情報: Hibernate connection pool size: 20 2004/05/30 10:09:43 net.sf.hibernate.connection.DriverManagerConnectionProvider configure 情報: using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://localhost/test2?u seUnicode=true& characterEncoding=Windows-31J 2004/05/30 10:09:43 net.sf.hibernate.connection.DriverManagerConnectionProvider configure 情報: connection properties: {user=root, password=} 2004/05/30 10:09:43 net.sf.hibernate.transaction.TransactionManagerLookupFactory getTransactionManagerLookup 情報: No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended) 2004/05/30 10:09:44 net.sf.hibernate.cfg.SettingsFactory buildSettings 情報: Use scrollable result sets: true 2004/05/30 10:09:44 net.sf.hibernate.cfg.SettingsFactory buildSettings 情報: Use JDBC3 getGeneratedKeys(): true 2004/05/30 10:09:44 net.sf.hibernate.cfg.SettingsFactory buildSettings 情報: Optimize cache for minimal puts: false 2004/05/30 10:09:44 net.sf.hibernate.cfg.SettingsFactory buildSettings 情報: echoing all SQL to stdout 2004/05/30 10:09:44 net.sf.hibernate.cfg.SettingsFactory buildSettings 情報: Query language substitutions: {} 2004/05/30 10:09:44 net.sf.hibernate.cfg.SettingsFactory buildSettings 情報: cache provider: net.sf.ehcache.hibernate.Provider 2004/05/30 10:09:44 net.sf.hibernate.cfg.Configuration configureCaches 情報: instantiating and configuring caches 2004/05/30 10:09:44 net.sf.hibernate.impl.SessionFactoryImpl <init> 情報: building session factory 2004/05/30 10:09:44 net.sf.hibernate.impl.SessionFactoryObjectFactory addInstanc e 情報: no JNDI name configured Exception in thread "main" java.lang.NoClassDefFoundError: javax/transaction/Syn chronization at net.sf.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryIm pl.java:312) at net.sf.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryIm pl.java:325) at net.sf.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryIm pl.java:333) at CustomerDAO.getSession(Unknown Source) at CustomerDAO.create(Unknown Source) at Main.main(Unknown Source) ------------------------------------------------ javax/transaction/Synchronizationを検索するとJ2EEのAPIのようなのですが、J2EEは必要なのでしょうか? とりあえずJ2EEをインストールしてみようと思いますが・・・。 何か変化があったら随時更新していきます。 分かる方がおりましたらぜひ解決策をお願いいたします。 |
|
投稿日時: 2004-05-30 12:24
だいさん、こんにちは。
Hibernateは使ったことが無いのですが、 Downloadして .zipファイルを展開してみましたら、 libディレクトリの下に jta.jar と言うファイルがあり、 この中に javax/transaction/Synchronization.class がありました。 jta.jarにクラスパスを通せば良いかも知れません。 本当はドキュメントで確認するべきですが、時間がなくて申し訳け ありません。 |
|
投稿日時: 2004-05-30 12:30
Kissingerさん、こんにちは。
ありがとうございます、解決しました。 jarの中身を確認したつもりだったのですが・・・見落としていたみたいです。 |
1