[Seasar-user:8232] Re: 複数データソースの設定

r.m [E-MAIL ADDRESS DELETED]
2007年 6月 12日 (火) 10:38:09 JST


水澤です。

小林 (koichik)様
ご返信ありがとうございます。


> どのコンポーネントの何というプロパティに DataSource を
> 設定しようとしているかログが出ていないでしょうか?

出力されているログは以下のとおりです。
------------------------------------------------------------------------------------------------------------------------
StandardContext[/MultiDatasource]StandardWrapper.Throwable
org.seasar.framework.beans.IllegalPropertyRuntimeException:
[ESSR0059]クラス(org.seasar.dao.impl.DaoMetaDataFactoryImpl)のプロパティ(beanMetaDataFactory)の設定に失敗しました。理由は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(AbstractBindingTypeDef.java:218)
	at org.seasar.framework.container.assembler.AbstractBindingTypeDef.bindAuto(AbstractBindingTypeDef.java:180)
	at org.seasar.framework.container.assembler.BindingTypeMustDef.doBind(BindingTypeMustDef.java:50)
	at org.seasar.framework.container.assembler.AbstractBindingTypeDef.bind(AbstractBindingTypeDef.java:73)
	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:53)
	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:299)
	at org.seasar.framework.container.impl.S2ContainerImpl.init(S2ContainerImpl.java:499)
	at org.seasar.framework.container.impl.S2ContainerImpl.init(S2ContainerImpl.java:496)
	at org.seasar.framework.container.factory.SingletonS2ContainerFactory.init(SingletonS2ContainerFactory.java:150)
	at org.seasar.framework.container.servlet.SingletonS2ContainerInitializer.initialize(SingletonS2ContainerInitializer.java:50)
	at org.seasar.framework.container.servlet.S2ContainerServlet.initializeContainer(S2ContainerServlet.java:99)
	at org.seasar.framework.container.servlet.S2ContainerServlet.init(S2ContainerServlet.java:92)
	at org.seasar.teeda.core.webapp.TeedaServlet.init(TeedaServlet.java:41)
	at javax.servlet.GenericServlet.init(GenericServlet.java:211)
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1029)
	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:862)
	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4017)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
	at org.apache.catalina.core.StandardService.start(StandardService.java:480)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
Caused by: 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(AbstractBindingTypeDef.java:218)
	at org.seasar.framework.container.assembler.AbstractBindingTypeDef.bindAuto(AbstractBindingTypeDef.java:180)
	at org.seasar.framework.container.assembler.BindingTypeMustDef.doBind(BindingTypeMustDef.java:50)
	at org.seasar.framework.container.assembler.AbstractBindingTypeDef.bind(AbstractBindingTypeDef.java:73)
	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:53)
	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:98)
	at org.seasar.framework.container.impl.S2ContainerImpl.getComponent(S2ContainerImpl.java:124)
	at org.seasar.framework.container.assembler.AbstractBindingTypeDef.getValue(AbstractBindingTypeDef.java:216)
	... 35 more
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.getComponent(TooManyRegistrationComponentDefImpl.java:45)
	at org.seasar.framework.container.impl.S2ContainerImpl.getComponent(S2ContainerImpl.java:124)
	at org.seasar.framework.container.assembler.AbstractBindingTypeDef.getValue(AbstractBindingTypeDef.java:216)
	... 46 more

StandardContext[/MultiDatasource]サーブレット /MultiDatasource がload()例外を投げました
javax.servlet.ServletException: サーブレット teedaServlet のServlet.init()が例外を投げました
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1071)
	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:862)
	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4017)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
	at org.apache.catalina.core.StandardService.start(StandardService.java:480)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
----- Root Cause -----
org.seasar.framework.beans.IllegalPropertyRuntimeException:
[ESSR0059]クラス(org.seasar.dao.impl.DaoMetaDataFactoryImpl)のプロパティ(beanMetaDataFactory)の設定に失敗しました。理由は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(AbstractBindingTypeDef.java:218)
	at org.seasar.framework.container.assembler.AbstractBindingTypeDef.bindAuto(AbstractBindingTypeDef.java:180)
	at org.seasar.framework.container.assembler.BindingTypeMustDef.doBind(BindingTypeMustDef.java:50)
	at org.seasar.framework.container.assembler.AbstractBindingTypeDef.bind(AbstractBindingTypeDef.java:73)
	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:53)
	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:299)
	at org.seasar.framework.container.impl.S2ContainerImpl.init(S2ContainerImpl.java:499)
	at org.seasar.framework.container.impl.S2ContainerImpl.init(S2ContainerImpl.java:496)
	at org.seasar.framework.container.factory.SingletonS2ContainerFactory.init(SingletonS2ContainerFactory.java:150)
	at org.seasar.framework.container.servlet.SingletonS2ContainerInitializer.initialize(SingletonS2ContainerInitializer.java:50)
	at org.seasar.framework.container.servlet.S2ContainerServlet.initializeContainer(S2ContainerServlet.java:99)
	at org.seasar.framework.container.servlet.S2ContainerServlet.init(S2ContainerServlet.java:92)
	at org.seasar.teeda.core.webapp.TeedaServlet.init(TeedaServlet.java:41)
	at javax.servlet.GenericServlet.init(GenericServlet.java:211)
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1029)
	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:862)
	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4017)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
	at org.apache.catalina.core.StandardService.start(StandardService.java:480)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
Caused by: 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(AbstractBindingTypeDef.java:218)
	at org.seasar.framework.container.assembler.AbstractBindingTypeDef.bindAuto(AbstractBindingTypeDef.java:180)
	at org.seasar.framework.container.assembler.BindingTypeMustDef.doBind(BindingTypeMustDef.java:50)
	at org.seasar.framework.container.assembler.AbstractBindingTypeDef.bind(AbstractBindingTypeDef.java:73)
	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:53)
	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:98)
	at org.seasar.framework.container.impl.S2ContainerImpl.getComponent(S2ContainerImpl.java:124)
	at org.seasar.framework.container.assembler.AbstractBindingTypeDef.getValue(AbstractBindingTypeDef.java:216)
	... 35 more
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.getComponent(TooManyRegistrationComponentDefImpl.java:45)
	at org.seasar.framework.container.impl.S2ContainerImpl.getComponent(S2ContainerImpl.java:124)
	at org.seasar.framework.container.assembler.AbstractBindingTypeDef.getValue(AbstractBindingTypeDef.java:216)
	... 46 more

StandardContext[/MultiDatasource]StandardWrapper.Throwable
java.lang.IllegalStateException: no factory
javax.faces.context.FacesContextFactory configured for this appliction
	at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:48)
	at javax.faces.internal.WebAppUtil.getFactory(WebAppUtil.java:142)
	at javax.faces.webapp.FacesServlet.init(FacesServlet.java:67)
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1029)
	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:862)
	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4017)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
	at org.apache.catalina.core.StandardService.start(StandardService.java:480)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)

StandardContext[/MultiDatasource]サーブレット /MultiDatasource がload()例外を投げました
javax.servlet.ServletException: サーブレット facesServlet のServlet.init()が例外を投げました
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1071)
	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:862)
	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4017)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
	at org.apache.catalina.core.StandardService.start(StandardService.java:480)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
----- Root Cause -----
java.lang.IllegalStateException: no factory
javax.faces.context.FacesContextFactory configured for this appliction
	at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:48)
	at javax.faces.internal.WebAppUtil.getFactory(WebAppUtil.java:142)
	at javax.faces.webapp.FacesServlet.init(FacesServlet.java:67)
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1029)
	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:862)
	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4017)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
	at org.apache.catalina.core.StandardService.start(StandardService.java:480)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)

------------------------------------------------------------------------------------------------------------------------

S2のバージョンは最新の2.4.13にしました。
S2のコアな部分の動作がイマイチ分かっておりません。。。
こちらでも、試行錯誤・調査していますが、何卒宜しくお願いいたします。



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