[Seasar-user:19437] Re: dataSourceNameはnullあるいは空であってはいけません
吉村 実
[E-MAIL ADDRESS DELETED]
2010年 3月 3日 (水) 10:16:29 JST
小林様
お世話になっております。
参考になるか分かりませんが、
Jdbc.diconのdatasource名を以下のように変更したところ
Tomcat起動時にエラーとなりました。
「jdbc.dicon」
<components namespace="jdbc">
‥‥
<component name="dataSource"
class="org.seasar.extension.dbcp.impl.DataSourceImpl">
<arg>connectionPool</arg>
</component>
‥‥
<component name="dataSourceForOp"
class="org.seasar.extension.dbcp.impl.DataSourceImpl">
<arg>connectionPoolForOp</arg>
</component>
</components>
↓↓↓
<components namespace="jdbc">
‥‥
<component name="forCoDataSource"
class="org.seasar.extension.dbcp.impl.DataSourceImpl">
<arg>connectionPool</arg>
</component>
‥‥
<component name="forOpDataSource"
class="org.seasar.extension.dbcp.impl.DataSourceImpl">
<arg>connectionPoolForOp</arg>
</component>
</components>
「dao_tt.dicon」
<components namespace="dao_tt">
‥‥
<component
name="daoMetaDataFactory"
class="org.seasar.dao.impl.DaoMetaDataFactoryImpl">
<arg>jdbc.dataSource</arg>
<arg>
<component
class="org.seasar.dao.pager.PagerStatementFactory"/>
</arg>
<arg>resultSetFactory</arg>
<arg>annotationReaderFactory</arg>
<property
name="statementFactory">statementFactory</property>
</component>
‥‥
<component
name="daoMetaDataFactoryForOp"
class="org.seasar.dao.impl.DaoMetaDataFactoryImpl">
<arg>jdbc.dataSourceForOp</arg>
<arg>
<component
class="org.seasar.dao.pager.PagerStatementFactory"/>
</arg>
<arg>resultSetFactory</arg>
<arg>annotationReaderFactory</arg>
<property
name="statementFactory">statementFactoryForOp</property>
</component>
‥‥
</components>
↓↓↓
<components namespace="dao_tt">
‥‥
<component
name="daoMetaDataFactory"
class="org.seasar.dao.impl.DaoMetaDataFactoryImpl">
<arg>jdbc.forCoDataSource</arg>
<arg>
<component
class="org.seasar.dao.pager.PagerStatementFactory"/>
</arg>
<arg>resultSetFactory</arg>
<arg>annotationReaderFactory</arg>
<property
name="statementFactory">statementFactory</property>
</component>
‥‥
<component
name="daoMetaDataFactoryForOp"
class="org.seasar.dao.impl.DaoMetaDataFactoryImpl">
<arg>jdbc.forOpDataSource</arg>
<arg>
<component
class="org.seasar.dao.pager.PagerStatementFactory"/>
</arg>
<arg>resultSetFactory</arg>
<arg>annotationReaderFactory</arg>
<property
name="statementFactory">statementFactoryForOp</property>
</component>
‥‥
</components>
「起動時のログ」
ERROR 2010-03-03 10:05:35,406 [main] StandardWrapper.Throwable
org.seasar.framework.beans.IllegalPropertyRuntimeException: [ESSR0059]クラス
(org.seasar.dao.impl.BeanMetaDataFactoryImpl)のプロパティ(dataSource)の設定
に失敗しました。理由は
org.seasar.framework.container.TooManyRegistrationRuntimeException:
[ESSR0045]interface javax.sql.DataSourceに複数のコンポーネント
(org.seasar.extension.dbcp.impl.DataSourceImpl,
org.seasar.extension.dbcp.impl.DataSourceImpl)が登録されています
at
org.seasar.framework.container.assembler.AbstractBindingTypeDef.getValue(Abs
tractBindingTypeDef.java:297)
at
org.seasar.framework.container.assembler.AbstractBindingTypeDef.bindAuto(Abs
tractBindingTypeDef.java:217)
at
org.seasar.framework.container.assembler.BindingTypeMustDef.doBind(BindingTy
peMustDef.java:55)
at
org.seasar.framework.container.assembler.AbstractBindingTypeDef.bind(Abstrac
tBindingTypeDef.java:78)
at
org.seasar.framework.container.assembler.AccessTypePropertyDef.bind(AccessTy
pePropertyDef.java:50)
at
org.seasar.framework.container.assembler.AccessTypePropertyDef.bind(AccessTy
pePropertyDef.java:41)
at
org.seasar.framework.container.assembler.AutoPropertyAssembler.assemble(Auto
PropertyAssembler.java:56)
at
org.seasar.framework.container.deployer.SingletonComponentDeployer.assemble(
SingletonComponentDeployer.java:68)
at
org.seasar.framework.container.deployer.SingletonComponentDeployer.deploy(Si
ngletonComponentDeployer.java:48)
at
org.seasar.framework.container.deployer.SingletonComponentDeployer.init(Sing
letonComponentDeployer.java:76)
at
org.seasar.framework.container.impl.ComponentDefImpl.init(ComponentDefImpl.j
ava:236)
at
org.seasar.framework.container.impl.S2ContainerImpl.init(S2ContainerImpl.jav
a:563)
at
org.seasar.framework.container.impl.S2ContainerImpl.init(S2ContainerImpl.jav
a:560)
at
org.seasar.framework.container.impl.S2ContainerImpl.init(S2ContainerImpl.jav
a:560)
at
org.seasar.framework.container.impl.S2ContainerImpl.init(S2ContainerImpl.jav
a:560)
at
org.seasar.framework.container.impl.S2ContainerImpl.init(S2ContainerImpl.jav
a:560)
at
org.seasar.framework.container.factory.SingletonS2ContainerFactory.init(Sing
letonS2ContainerFactory.java:150)
at
org.seasar.framework.container.servlet.SingletonS2ContainerInitializer.initi
alize(SingletonS2ContainerInitializer.java:55)
at
org.seasar.framework.container.servlet.S2ContainerServlet.initializeContaine
r(S2ContainerServlet.java:139)
at
org.seasar.framework.container.servlet.S2ContainerServlet.init(S2ContainerSe
rvlet.java:127)
at javax.servlet.GenericServlet.init(GenericServlet.java:212)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:11
39)
at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:
3996)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4266)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at
org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at
org.apache.catalina.core.StandardService.start(StandardService.java:448)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
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:592)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Caused by:
org.seasar.framework.container.TooManyRegistrationRuntimeException:
[ESSR0045]interface javax.sql.DataSourceに複数のコンポーネント
(org.seasar.extension.dbcp.impl.DataSourceImpl,
org.seasar.extension.dbcp.impl.DataSourceImpl)が登録されています
at
org.seasar.framework.container.impl.TooManyRegistrationComponentDefImpl.getC
omponent(TooManyRegistrationComponentDefImpl.java:52)
at
org.seasar.framework.container.impl.S2ContainerImpl.getComponent(S2Container
Impl.java:129)
at
org.seasar.framework.container.assembler.AbstractBindingTypeDef.getValue(Abs
tractBindingTypeDef.java:295)
... 37 more
Seasar-user メーリングリストの案内