[Seasar-user:18628] S2Dao複数データソースでの起動時エラー

Ikemoto Hiroki [E-MAIL ADDRESS DELETED]
2009年 10月 12日 (月) 17:55:27 JST


池本と申します。
はじめて投稿させていただきます。
よろしくお願いいたします。

Teeda+S2Daoで、下記FAQを参考にしてOraclewpPostgreSQLの
複数データソースへの接続を行おうとしています。
http://www.seasar.org/wiki/index.php?FAQ%2FS2DAO

Tomcat起動時にエラーが発生してしまうのですが
どのような理由が考えられますでしょうか?

(環境)
Dolteng 0.38.0
S2Dao 1.0.49

(ログ)
org.seasar.framework.beans.IllegalPropertyRuntimeException:
[ESSR0059]クラス(org.seasar.dao.impl.DaoMetaDataFactoryImpl)のプロパティ(beanMetaDataFactory)の設定に失敗しました。理由はorg.seasar.framework.container.IllegalAutoBindingPropertyRuntimeException:
[ESSR0080]クラス(org.seasar.dao.impl.BeanMetaDataFactoryImpl)のプロパティ(dataSource)の自動設定に失敗しました
	at org.seasar.framework.container.assembler.AbstractBindingTypeDef.getValue(AbstractBindingTypeDef.java:297)
	at org.seasar.framework.container.assembler.AbstractBindingTypeDef.bindAuto(AbstractBindingTypeDef.java:217)
	at org.seasar.framework.container.assembler.BindingTypeMustDef.doBind(BindingTypeMustDef.java:55)
	at org.seasar.framework.container.assembler.AbstractBindingTypeDef.bind(AbstractBindingTypeDef.java:78)
	at org.seasar.framework.container.assembler.AccessTypePropertyDef.bind(AccessTypePropertyDef.java:50)
	at org.seasar.framework.container.assembler.AccessTypePropertyDef.bind(AccessTypePropertyDef.java:41)
	at org.seasar.framework.container.assembler.AutoPropertyAssembler.assemble(AutoPropertyAssembler.java:56)
	at org.seasar.framework.container.deployer.SingletonComponentDeployer.assemble(SingletonComponentDeployer.java:68)
	at org.seasar.framework.container.deployer.SingletonComponentDeployer.deploy(SingletonComponentDeployer.java:48)
	at org.seasar.framework.container.deployer.SingletonComponentDeployer.init(SingletonComponentDeployer.java:76)
	at org.seasar.framework.container.impl.ComponentDefImpl.init(ComponentDefImpl.java:236)
	at org.seasar.framework.container.impl.S2ContainerImpl.init(S2ContainerImpl.java:563)
	at org.seasar.framework.container.impl.S2ContainerImpl.init(S2ContainerImpl.java:560)
	at org.seasar.framework.container.impl.S2ContainerImpl.init(S2ContainerImpl.java:560)
	at org.seasar.framework.container.factory.SingletonS2ContainerFactory.init(SingletonS2ContainerFactory.java:165)
	at org.seasar.framework.container.servlet.SingletonS2ContainerInitializer.initialize(SingletonS2ContainerInitializer.java:55)
	at org.seasar.framework.container.servlet.S2ContainerServlet.initializeContainer(S2ContainerServlet.java:139)
	at org.seasar.framework.container.servlet.S2ContainerServlet.init(S2ContainerServlet.java:127)
	at org.seasar.teeda.core.webapp.TeedaServlet.init(TeedaServlet.java:41)
	at javax.servlet.GenericServlet.init(GenericServlet.java:212)
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139)
	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3956)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4230)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
	at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1150)
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
	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:597)
	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.IllegalAutoBindingPropertyRuntimeException:
[ESSR0080]クラス(org.seasar.dao.impl.BeanMetaDataFactoryImpl)のプロパティ(dataSource)の自動設定に失敗しました
	at org.seasar.framework.container.assembler.BindingTypeMustDef.doBind(BindingTypeMustDef.java:56)
	at org.seasar.framework.container.assembler.AbstractBindingTypeDef.bind(AbstractBindingTypeDef.java:78)
	at org.seasar.framework.container.assembler.AccessTypePropertyDef.bind(AccessTypePropertyDef.java:50)
	at org.seasar.framework.container.assembler.AccessTypePropertyDef.bind(AccessTypePropertyDef.java:41)
	at org.seasar.framework.container.assembler.AutoPropertyAssembler.assemble(AutoPropertyAssembler.java:56)
	at org.seasar.framework.container.deployer.SingletonComponentDeployer.assemble(SingletonComponentDeployer.java:68)
	at org.seasar.framework.container.deployer.SingletonComponentDeployer.deploy(SingletonComponentDeployer.java:48)
	at org.seasar.framework.container.impl.ComponentDefImpl.getComponent(ComponentDefImpl.java:111)
	at org.seasar.framework.container.impl.S2ContainerImpl.getComponent(S2ContainerImpl.java:129)
	at org.seasar.framework.container.assembler.AbstractBindingTypeDef.getValue(AbstractBindingTypeDef.java:295)
	... 45 more

(dao.dicon)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE components PUBLIC "-//SEASAR//DTD S2Container 2.3//EN"
	"http://www.seasar.org/dtd/components23.dtd">
<components namespace="dao">
    <include path="dao1.dicon"/>
    <include path="dao2.dicon"/>
</components>

(dao1.dicon)
<?xml version="1.0" encoding="Shift_JIS"?>
<!DOCTYPE components PUBLIC "-//SEASAR2.1//DTD S2Container//EN"
  "http://www.seasar.org/dtd/components21.dtd">
<components namespace="daoIntegral">
    <include path="jdbc1.dicon"/>
    <component class="org.seasar.dao.impl.AnnotationReaderFactoryImpl"/>
    <component class="org.seasar.dao.impl.DaoMetaDataFactoryImpl"/>
    <component name="interceptor"
class="org.seasar.dao.interceptors.S2DaoInterceptor"/>
    <component class="org.seasar.dao.impl.ValueTypeFactoryImpl"/>
    <component name="stringClobType">
        @[E-MAIL ADDRESS DELETED]
    </component>
    <component class="org.seasar.dao.impl.BeanMetaDataFactoryImpl"/>
    <component class="org.seasar.dao.impl.DaoNamingConventionImpl"/>
    <component class="org.seasar.dao.impl.NullBeanEnhancer"/>
    <component class="org.seasar.dao.impl.ResultSetHandlerFactorySelector"/>
    <component class="org.seasar.dao.impl.DtoMetaDataFactoryImpl"/>
    <component class="org.seasar.dao.impl.PropertyTypeFactoryBuilderImpl"/>
    <component class="org.seasar.dao.impl.RelationPropertyTypeFactoryBuilderImpl"/>
    <component class="org.seasar.dao.impl.DefaultTableNaming"/>
    <component class="org.seasar.dao.impl.DefaultColumnNaming"/>
    <component class="org.seasar.dao.impl.ProcedureMetaDataFactoryImpl"/>
</components>

(dao2.dicon)
<?xml version="1.0" encoding="Shift_JIS"?>
<!DOCTYPE components PUBLIC "-//SEASAR2.1//DTD S2Container//EN"
  "http://www.seasar.org/dtd/components21.dtd">
<components namespace="daoIntegral">
    <include path="jdbc2.dicon"/>
    <component class="org.seasar.dao.impl.AnnotationReaderFactoryImpl"/>
    <component class="org.seasar.dao.impl.DaoMetaDataFactoryImpl"/>
    <component name="interceptor"
class="org.seasar.dao.interceptors.S2DaoInterceptor"/>
    <component class="org.seasar.dao.impl.ValueTypeFactoryImpl"/>
    <component name="stringClobType">
        @[E-MAIL ADDRESS DELETED]
    </component>
    <component class="org.seasar.dao.impl.BeanMetaDataFactoryImpl"/>
    <component class="org.seasar.dao.impl.DaoNamingConventionImpl"/>
    <component class="org.seasar.dao.impl.NullBeanEnhancer"/>
    <component class="org.seasar.dao.impl.ResultSetHandlerFactorySelector"/>
    <component class="org.seasar.dao.impl.DtoMetaDataFactoryImpl"/>
    <component class="org.seasar.dao.impl.PropertyTypeFactoryBuilderImpl"/>
    <component class="org.seasar.dao.impl.RelationPropertyTypeFactoryBuilderImpl"/>
    <component class="org.seasar.dao.impl.DefaultTableNaming"/>
    <component class="org.seasar.dao.impl.DefaultColumnNaming"/>
    <component class="org.seasar.dao.impl.ProcedureMetaDataFactoryImpl"/>
</components>

(jdbc.dicon)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE components PUBLIC "-//SEASAR//DTD S2Container 2.4//EN"
	"http://www.seasar.org/dtd/components24.dtd">
<components namespace="jdbc">
	<include path ="jdbc1.dicon"/>
	<include path ="jdbc2.dicon"/>
</components>

(jdbc1.dicon)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE components PUBLIC "-//SEASAR//DTD S2Container 2.4//EN"
	"http://www.seasar.org/dtd/components24.dtd">
<components namespace="jdbcIntegral">
	<include path="jta.dicon"/>
	<include path="jdbc-extension.dicon"/>
	<component class="org.seasar.extension.jdbc.impl.BasicResultSetFactory"/>
	<component class="org.seasar.extension.jdbc.impl.ConfigurableStatementFactory">
		<arg>
			<component class="org.seasar.extension.jdbc.impl.BasicStatementFactory"/>
		</arg>
		<property name="fetchSize">100</property>
	</component>
	<!-- for Oracle -->
	<component name="xaDataSource"
		class="org.seasar.extension.dbcp.impl.XADataSourceImpl">
		<property name="driverClassName">
			"oracle.jdbc.driver.OracleDriver"
		</property>
		<property name="URL">
			"jdbc:oracle:thin:@localost:1521:oracle"
		</property>
		<property name="user">"user"</property>
		<property name="password">"***"</property>
	</component>
	<component name="connectionPool"
		class="org.seasar.extension.dbcp.impl.ConnectionPoolImpl">
		<property name="timeout">600</property>
		<property name="maxPoolSize">10</property>
		<property name="allowLocalTx">true</property>
		<destroyMethod name="close"/>
	</component>
	<component name="dataSource"
		class="org.seasar.extension.dbcp.impl.DataSourceImpl"
	/>
</components>

(jdbc2.dicon)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE components PUBLIC "-//SEASAR//DTD S2Container 2.4//EN"
	"http://www.seasar.org/dtd/components24.dtd">
<components namespace="jdbcShushi">
	<include path="jta.dicon"/>
	<include path="jdbc-extension.dicon"/>
	<component class="org.seasar.extension.jdbc.impl.BasicResultSetFactory"/>
	<component class="org.seasar.extension.jdbc.impl.ConfigurableStatementFactory">
		<arg>
			<component class="org.seasar.extension.jdbc.impl.BasicStatementFactory"/>
		</arg>
		<property name="fetchSize">100</property>
	</component>
	<!-- for PostgreSQL -->
	<component name="xaDataSource"
		class="org.seasar.extension.dbcp.impl.XADataSourceImpl">
		<property name="driverClassName">
			"org.postgresql.Driver"
		</property>
		<property name="URL">
		  "jdbc:postgresql://localhost/pg"
		</property>
		<property name="user">"user"</property>
		<property name="password">"*****"</property>
    </component>
	<component name="connectionPool"
		class="org.seasar.extension.dbcp.impl.ConnectionPoolImpl">
		<property name="timeout">600</property>
		<property name="maxPoolSize">10</property>
		<property name="allowLocalTx">true</property>
		<destroyMethod name="close"/>
	</component>
</components>


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