[Seasar-user:14040] [teeda] JarファイルのDaoを自動登録しようとしているのですがうまく行きません
Mitsutaka Sato
[E-MAIL ADDRESS DELETED]
2008年 5月 1日 (木) 17:31:19 JST
佐藤と申します。
いつもお世話になっております。
TeedaアプリケーションにJarファイル内のDaoを自動登録しようとして、以下のようにComponentAutoRegister、AspectAutoRegisterを
app.diconの最後に定義しました。
<component
class="org.seasar.framework.container.autoregister.JarComponentAutoRegister">
<property name="jarFileNames">"vd_core-1.0"</property>
<property name="instanceDef">
@[E-MAIL ADDRESS DELETED]
</property>
<property name="autoNaming">
<component
class="org.seasar.framework.container.autoregister.DefaultAutoNaming" />
</property>
<initMethod name="addClassPattern">
<arg>"com.hoge.dao"</arg>
<arg>".*Dao"</arg>
</initMethod>
</component>
<component
class="org.seasar.framework.container.autoregister.AspectAutoRegister">
<property name="interceptor">dao.interceptor</property>
<initMethod name="addClassPattern">
<arg>"com.hoge.dao"</arg>
<arg>".*Dao"</arg>
</initMethod>
</component>
これで、cool-deployで実行してみたのですが、起動時に以下のエラーとなります。
ERROR 2008-05-01 17:16:33,687 [main] StandardWrapper.Throwable
org.seasar.framework.beans.IllegalPropertyRuntimeException:
[ESSR0059]クラス(org.seasar.framework.container.autoregister.JarComponentAutoRegister)のプロパティ(customizer)の設定に失敗しました。理由はorg.seasar.framework.container.TooManyRegistrationRuntimeException:
[ESSR0045]interface
org.seasar.framework.container.ComponentCustomizerに複数のコンポーネント(org.seasar.framework.container.customizer.AspectCustomizer,
org.seasar.framework.container.customizer.CustomizerChain,
org.seasar.framework.container.customizer.CustomizerChain,
org.seasar.framework.container.customizer.CustomizerChain,
org.seasar.framework.container.customizer.CustomizerChain,
org.seasar.framework.container.customizer.CustomizerChain)が登録されています
at
org.seasar.framework.container.assembler.AbstractBindingTypeDef.getValue(AbstractBindingTypeDef.java:284)
at
org.seasar.framework.container.assembler.AbstractBindingTypeDef.bindAuto(AbstractBindingTypeDef.java:223)
at
org.seasar.framework.container.assembler.BindingTypeMayDef.doBind(BindingTypeMayDef.java:49)
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:55)
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.factory.SingletonS2ContainerFactory.init(SingletonS2ContainerFactory.java:150)
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.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(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:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Caused by:
org.seasar.framework.container.TooManyRegistrationRuntimeException:
[ESSR0045]interface
org.seasar.framework.container.ComponentCustomizerに複数のコンポーネント(org.seasar.framework.container.customizer.AspectCustomizer,
org.seasar.framework.container.customizer.CustomizerChain,
org.seasar.framework.container.customizer.CustomizerChain,
org.seasar.framework.container.customizer.CustomizerChain,
org.seasar.framework.container.customizer.CustomizerChain,
org.seasar.framework.container.customizer.CustomizerChain)が登録されています
at
org.seasar.framework.container.impl.TooManyRegistrationComponentDefImpl.getComponent(TooManyRegistrationComponentDefImpl.java:52)
at
org.seasar.framework.container.impl.S2ContainerImpl.getComponent(S2ContainerImpl.java:129)
at
org.seasar.framework.container.assembler.AbstractBindingTypeDef.getValue(AbstractBindingTypeDef.java:282)
... 34 more
なにかおわかりになりましたら教えてください。
また、DaoCreatorだけ Baseのパスを変えるといったことは可能なんでしょうか?
-------------- next part --------------
HTMLの添付ファイルを保管しました...
URL: http://ml.seasar.org/archives/seasar-user/attachments/20080501/7fd3968a/attachment.html
Seasar-user メーリングリストの案内