テスト時にエラー
□jdbc.dicon
<component name="xaDataSource" class="org.seasar.extension.dbcp.impl.XADataSourceImpl"> <property name="driverClassName"> "org.postgresql.Driver" </property> <property name="URL"> "jdbc:postgresql://localhost/testdb" </property> <property name="user">"postgres"</property> <property name="password">"postgres"</property> </component>
□s2jdbc.dicon
<components> <include path="jdbc.dicon"/> <include path="s2jdbc-internal.dicon"/> <component name="jdbcManager" class="org.seasar.extension.jdbc.manager.JdbcManagerImpl"> <property name="maxRows">0</property> <property name="fetchSize">0</property> <property name="queryTimeout">0</property> <property name="dialect">postgre81Dialect</property> </component> </components>
□User
@Entity public class User { /** id */ @Id @GeneratedValue public Long id; /** 名前 */ public String name; /** バージョン */ @Version public Integer version; }
□UserServiceTest
private UserService userService; @Override protected void setUp() throws Exception { include("app.dicon"); } /** * findAll()のテスト. */ public void testFindAll() { List<User> userList = userService.findAll(); System.out.println(userList.size()); for (User user : userList) { System.out.println(user.name); } }
上記テストクラスを実行すると下記のエラーメッセージが出て来てしまう。
どなたかご教授いただけないでしょうか?
org.seasar.extension.jdbc.manager.JdbcManagerImplのプロパティ(dataSource)が見つからないので設定をスキップします