[Seasar-user:16547] [sa-struts-1.0.4-sp3][s2jdbc][Help]複数のデータソース利用時のS2AbstractService<T>内でjdbcManagerのNullPointerException対応法をご教授下さい。
小野田信之
[E-MAIL ADDRESS DELETED]
2008年 12月 24日 (水) 19:17:35 JST
$B>.LnED$H?=$7$^$9!#(B
$B$*@$OC$K$J$j$^$9!#(B
sa-struts-1.0.4-sp3$B$K$*$$$F!"(B
$B$=$NB>$N5!G=!'J#?t$N%G!<%?%=!<%9(B
http://s2container.seasar.org/2.4/ja/s2jdbc_other.html
$B$N;X<($K=>$$(Bjdbc.dicon$B!"(Bs2jdbc.dicon$B$r=`Hw$7$F(B
Service$B%/%i%9$r;H$C$F(BselectBySqlFile()$B%a%=%C%I$r<B9T%F%9%H(B
$B$7$?$H$3$m!"2<5-%L%kNc30$+$iH4$1=P$;$J$$$G$$$^$9!#(B
$BBP=hJ}K!$r$465<x$$$?$@$-$?$$!#(B
$B$J$*!"C1FH$G$N(BmySql(v5.1)$B%G!<%?%=!<%9;~$OLdBj$J$/=PMh$F$$$^$9!#(B
================================================
Service$B%/%i%9$NCf$G(B
@Binding("mysqlJbcManager")
protected JdbcManager jdbcManager;
$B$r%/%i%9F,$[E-MAIL ADDRESS DELETED]@$7$F$b(B
S2AbstractService<ENTITY>$B%/%i%9Cf$N(B
selectBySqlFile()$B%a%=%C%IFb$G(B
jdbcManager$B$N%$%s%9%?%s%9$,%L%k$K$h$k(B
NullPointerException$B$,H/@8!#(B
java.lang.NullPointerException
at org.seasar.extension.jdbc.service.S2AbstractService.selectBySqlFile(S2AbstractService.java:207)
at tutorial.service.MysqlAbstractService.selectBySqlFile(MysqlAbstractService.java:61)
at tutorial.service.EmployeeService$$EnhancedByS2AOP$$ae1393.$$selectBySqlFile$$invokeSuperMethod$$(EmployeeService$$EnhancedByS2AOP$$ae1393.java)
at tutorial.service.EmployeeService$$EnhancedByS2AOP$$ae1393$$MethodInvocation$$selectBySqlFile3.proceed(MethodInvocationClassGenerator.java)
================================================
$B;29M>pJs!'(B
$B-!(Bjdbc-mysql.dicon$BCf$N(BDataSource$BL>$N;XDj!'(B
<component name="mysqlDataSource"
class="org.seasar.extension.dbcp.impl.DataSourceImpl"
/>
$B-"(Bs2jdbc-mysql.dicon$BCf$N(BJdbcManager$BL>$N;XDj!'(B
<components>
<include path="jdbc-mysql.dicon"/>
<include path="s2jdbc-internal.dicon"/>
<component name="mysqlJbcManager"
class="org.seasar.extension.jdbc.manager.JdbcManagerImpl">
$B-#(BAbstractService<ENTITY>$BCf$N([E-MAIL ADDRESS DELETED]$B;XDj!'(B
public abstract class MysqlAbstractService<ENTITY> extends S2AbstractService<ENTITY> {
@Binding("mysqlJbcManager")
protected JdbcManager jdbcManager;
$B>e5--!!A-#$O#2$D$N%G!<%?%=!<%9$NFb$N(B1$B$D(BMySQL$BItJ,$rBeI=$7$F5-=R!#(B
Seasar-user メーリングリストの案内