[Seasar-user:7302] Re: [S2Dao]Daoのテスト

satoh [E-MAIL ADDRESS DELETED]
2007年 4月 15日 (日) 15:48:28 JST


佐藤徹太郎です。
お世話になっております。
せとさん、お返事ありがとうございました。
Eclipseの障害トレースには、以下のように表示されました。

java.lang.ClassCastException: java.lang.String
	at
book.chura.dao.RentInfoDao$$EnhancedByS2AOP$$e4bb3c.findRentBooks(RentInfoDa
o$$EnhancedByS2AOP$$e4bb3c.java)
	at book.chura.dao.RentInfoDaoTest.testfindRentBooks(RentInfoDaoTest.
java:37)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at junit.framework.TestCase.runTest(TestCase.java:164)
	at
org.seasar.framework.unit.S2FrameworkTestCase.doRunTest(S2FrameworkTestCase.
java:305)
	at
org.seasar.extension.unit.S2TestCase.doRunTest(S2TestCase.java:92)
	at
org.seasar.framework.unit.S2FrameworkTestCase.runBare(S2FrameworkTestCase.ja
va:190)
	at junit.framework.TestResult$1.protect(TestResult.java:106)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.framework.TestResult.run(TestResult.java:109)
	at junit.framework.TestCase.run(TestCase.java:120)
	at junit.framework.TestSuite.runTest(TestSuite.java:230)
	at junit.framework.TestSuite.run(TestSuite.java:225)
	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.
run(JUnit3TestReference.java:128)
	at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:3
8)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu
nner.java:460)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu
nner.java:673)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.
java:386)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner
.java:196)

Eclipseのコンソールには、以下、のように表示されました。

DEBUG 2007-04-15 15:32:58,218 [main] クラス
(book.chura.dao.RentInfoDao[rentInfoDao])のコンポーネント定義を登録します
DEBUG 2007-04-15 15:32:58,296 [main] クラス(book.chura.dao.BookDao[bookDao])
のコンポーネント定義を登録します
DEBUG 2007-04-15 15:32:58,453 [main] トランザクションを開始しました
DEBUG 2007-04-15 15:32:58,453 [main] BEGIN
book.chura.dao.RentInfoDao#findRentInfoDetail(039911175)
DEBUG 2007-04-15 15:32:58,937 [main] 物理的なコネクションを取得しました
DEBUG 2007-04-15 15:32:58,984 [main] 論理的なコネクションを取得しました
DEBUG 2007-04-15 15:32:59,437 [main] 論理的なコネクションを閉じました
DEBUG 2007-04-15 15:32:59,546 [main] select rentInfo.userId, rentInfoDetail.
bookId
from rentInfo, rentInfoDetail
where rentInfoDetail.bookId='039911175' and
rentInfoDetail.rentInfoId=rentInfo.id
DEBUG 2007-04-15 15:32:59,546 [main] 論理的なコネクションを取得しました
DEBUG 2007-04-15 15:32:59,578 [main] 論理的なコネクションを閉じました
DEBUG 2007-04-15 15:32:59,578 [main] END
book.chura.dao.RentInfoDao#findRentInfoDetail(039911175) :
[E-MAIL ADDRESS DELETED]
DEBUG 2007-04-15 15:32:59,578 [main] BEGIN
book.chura.dao.RentInfoDao#deleteRentDetail(039911175)
DEBUG 2007-04-15 15:32:59,578 [main] delete from rentInfoDetail where
bookId='039911175'
DEBUG 2007-04-15 15:32:59,578 [main] 論理的なコネクションを取得しました
DEBUG 2007-04-15 15:32:59,578 [main] 論理的なコネクションを閉じました
DEBUG 2007-04-15 15:32:59,578 [main] END
book.chura.dao.RentInfoDao#deleteRentDetail(039911175) : 1
DEBUG 2007-04-15 15:32:59,578 [main] BEGIN
book.chura.dao.RentInfoDao#findRentInfoDetail(039911175)
DEBUG 2007-04-15 15:32:59,593 [main] select rentInfo.userId, rentInfoDetail.
bookId
from rentInfo, rentInfoDetail
where rentInfoDetail.bookId='039911175' and
rentInfoDetail.rentInfoId=rentInfo.id
DEBUG 2007-04-15 15:32:59,593 [main] 論理的なコネクションを取得しました
DEBUG 2007-04-15 15:32:59,593 [main] 論理的なコネクションを閉じました
DEBUG 2007-04-15 15:32:59,593 [main] END
book.chura.dao.RentInfoDao#findRentInfoDetail(039911175) : null
DEBUG 2007-04-15 15:32:59,593 [main] トランザクションをロールバックしました
DEBUG 2007-04-15 15:32:59,640 [main] 物理的なコネクションを閉じました
DEBUG 2007-04-15 15:33:01,390 [main] クラス
(book.chura.dao.RentInfoDao[rentInfoDao])のコンポーネント定義を登録します
DEBUG 2007-04-15 15:33:01,453 [main] クラス(book.chura.dao.BookDao[bookDao])
のコンポーネント定義を登録します
DEBUG 2007-04-15 15:33:01,546 [main] BEGIN
book.chura.dao.RentInfoDao#findRentBooks(012)
DEBUG 2007-04-15 15:33:01,703 [main] 物理的なコネクションを取得しました
DEBUG 2007-04-15 15:33:01,703 [main] 論理的なコネクションを取得しました
DEBUG 2007-04-15 15:33:01,796 [main] 論理的なコネクションを閉じました
DEBUG 2007-04-15 15:33:01,812 [main] select bookSpec.title,
rentInfo.limitDate
from rentInfo, rentInfoDetail, book, bookSpec
where rentInfo.userId='012' and
rentInfo.id=rentInfoDetail.rentInfoId and
rentInfoDetail.bookId=book.id and
book.bookSpecId=bookSpec.id
DEBUG 2007-04-15 15:33:01,812 [main] 論理的なコネクションを取得しました
DEBUG 2007-04-15 15:33:01,843 [main] 論理的なコネクションを閉じました
DEBUG 2007-04-15 15:33:01,843 [main] END
book.chura.dao.RentInfoDao#findRentBooks(012) : Seasar入門
DEBUG 2007-04-15 15:33:01,875 [main] 物理的なコネクションを閉じました

以上です。宜しく御願い致します。

-----Original Message-----
From: [E-MAIL ADDRESS DELETED]
[mailto:[E-MAIL ADDRESS DELETED]] On Behalf Of SETO Azusa
Sent: Saturday, April 14, 2007 10:59 PM
To: [E-MAIL ADDRESS DELETED]
Subject: [Seasar-user:7290] Re: [S2Dao]Daoのテスト

せとあずさです。

On Sat, 14 Apr 2007 14:52:25 +0900
"satoh" <[E-MAIL ADDRESS DELETED]> wrote:

> Dolteng 0.17.0(Teeda+S2dao)で開発をしております。
>
> S2DaoでDaoのテストを実行すると、
>
> java.lang.ClassCastException: java.lang.String
>
> がスローされます。
>
> 原因がわかりません。わかる方おられませんでしょうか?

スタックトレースをご提供くださいますでしょうか?


--
せとあずさ
[E-MAIL ADDRESS DELETED]
http://www.fieldnotes.jp/d/

_______________________________________________
Seasar-user mailing list
[E-MAIL ADDRESS DELETED]
https://ml.seasar.org/mailman/listinfo/seasar-user





Seasar-user メーリングリストの案内