Tapestry5:没有服务实现接口 org.springframework.context.ApplicationContext

发布于 2024-11-27 14:04:21 字数 5055 浏览 3 评论 0原文

我使用带有 spring 和 hibernate 的 Tapestry 5,我尝试构建我的应用程序,但抛出了这个异常???!!!???有什么问题,任何建议都会如此缓解????

[WARNING] Some problems were encountered while building the effective model for com.fit:rent-a-car:war:1.0.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 194, column 18
[WARNING] 'reporting.plugins.plugin.version' for org.apache.maven.plugins:maven-surefire-plugin is missing. @ line 235, column 17
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
.....
.....

[ERROR] ioc.Registry No service implements the interface org.springframework.context.ApplicationContext.
[ERROR] ioc.Registry Operations trace:

[ERROR] ioc.Registry [ 1] Realizing service ApplicationInitializer

[ERROR] ioc.Registry [ 2] Invoking org.apache.tapestry5.services.TapestryModule.buildApplicationInitializer(Logger, List) (at TapestryModule.java:1458)

[ERROR] ioc.Registry [ 3] Determining injection value for parameter #2 (java.util.List)

[ERROR] ioc.Registry [ 4] Collecting ordered configuration for service ApplicationInitializer

[ERROR] ioc.Registry [ 5] Invoking method org.apache.tapestry5.spring.SpringModule.contributeApplicationInitializer(OrderedConfiguration, ApplicationContext) (at SpringModule.java:54).

[ERROR] ioc.Registry [ 6] Determining injection value for parameter #2 (org.springframework.context.ApplicationContext)

[ERROR] ioc.Registry [ 7] Resolving object of type org.springframework.context.ApplicationContext using MasterObjectProvider
[ERROR] TapestryModule.ApplicationInitializer Construction of service ApplicationInitializer failed: Error invoking service builder method org.apache.tapestry5.services.TapestryModule.buildApplicationInitializer(Logger, List) (at TapestryModule.java:1458) (for service 'ApplicationInitializer'): Error invoking service contribution method org.apache.tapestry5.spring.SpringModule.contributeApplicationInitializer(OrderedConfiguration, ApplicationContext): No service implements the interface org.springframework.context.ApplicationContext.
java.lang.RuntimeException: Error invoking service builder method org.apache.tapestry5.services.TapestryModule.buildApplicationInitializer(Logger, List) (at TapestryModule.java:1458) (for service 'ApplicationInitializer'): Error invoking service contribution method org.apache.tapestry5.spring.SpringModule.contributeApplicationInitializer(OrderedConfiguration, ApplicationContext): No service implements the interface org.springframework.context.ApplicationContext.
    at org.apache.tapestry5.ioc.internal.ServiceBuilderMethodInvoker.createObject(ServiceBuilderMethodInvoker.java:76)
    at org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator$1.invoke(OperationTrackingObjectCreator.java:45)
    at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:65)
    at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
    at org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1063)
    at ......

    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: java.lang.RuntimeException: Error invoking service contribution method org.apache.tapestry5.spring.SpringModule.contributeApplicationInitializer(OrderedConfiguration, ApplicationContext): No service implements the interface org.springframework.context.ApplicationContext.
    at org.apache.tapestry5.ioc.internal.ContributionDefImpl.invokeMethod(ContributionDefImpl.java:139)
    at org.apache.tapestry5.ioc.internal.ContributionDefImpl.contribute(ContributionDefImpl.java:82)
    at org.apache.tapestry5.ioc.internal.RegistryImpl$9.run(RegistryImpl.java:651)
    at org.apache.tapestry5.ioc.internal.OperationTrackerImpl$1.invoke(OperationTrackerImpl.java:50)org.apache.tapestry5.ioc.internal.ServiceBuilderMethodInvoker.createObject(ServiceBuilderMethodInvoker.java:56)
    ... 65 more
Caused by: org.apache.tapestry5.ioc.internal.OperationException: No service implements the interface org.springframework.context.ApplicationContext.
    at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.logAndRethrow(OperationTrackerImpl.java:102)
    at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:69)
    at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
    ....
    ... 93 more
Caused by: java.lang.RuntimeException: No service implements the interface org.springframework.context.ApplicationContext.
    at org.apache.tapestry5.ioc.internal.RegistryImpl.getService(RegistryImpl.java:670)
    at org.apache.tapestry5.ioc.internal.ObjectLocatorImpl.getService(ObjectLocatorImpl.java:45)...)

i using tapestry 5 with spring and hibernate,i try to build my application throw's me this exception???!!!???what is problem ,any suggesyion will be such a relif????

[WARNING] Some problems were encountered while building the effective model for com.fit:rent-a-car:war:1.0.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 194, column 18
[WARNING] 'reporting.plugins.plugin.version' for org.apache.maven.plugins:maven-surefire-plugin is missing. @ line 235, column 17
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
.....
.....

[ERROR] ioc.Registry No service implements the interface org.springframework.context.ApplicationContext.
[ERROR] ioc.Registry Operations trace:

[ERROR] ioc.Registry [ 1] Realizing service ApplicationInitializer

[ERROR] ioc.Registry [ 2] Invoking org.apache.tapestry5.services.TapestryModule.buildApplicationInitializer(Logger, List) (at TapestryModule.java:1458)

[ERROR] ioc.Registry [ 3] Determining injection value for parameter #2 (java.util.List)

[ERROR] ioc.Registry [ 4] Collecting ordered configuration for service ApplicationInitializer

[ERROR] ioc.Registry [ 5] Invoking method org.apache.tapestry5.spring.SpringModule.contributeApplicationInitializer(OrderedConfiguration, ApplicationContext) (at SpringModule.java:54).

[ERROR] ioc.Registry [ 6] Determining injection value for parameter #2 (org.springframework.context.ApplicationContext)

[ERROR] ioc.Registry [ 7] Resolving object of type org.springframework.context.ApplicationContext using MasterObjectProvider
[ERROR] TapestryModule.ApplicationInitializer Construction of service ApplicationInitializer failed: Error invoking service builder method org.apache.tapestry5.services.TapestryModule.buildApplicationInitializer(Logger, List) (at TapestryModule.java:1458) (for service 'ApplicationInitializer'): Error invoking service contribution method org.apache.tapestry5.spring.SpringModule.contributeApplicationInitializer(OrderedConfiguration, ApplicationContext): No service implements the interface org.springframework.context.ApplicationContext.
java.lang.RuntimeException: Error invoking service builder method org.apache.tapestry5.services.TapestryModule.buildApplicationInitializer(Logger, List) (at TapestryModule.java:1458) (for service 'ApplicationInitializer'): Error invoking service contribution method org.apache.tapestry5.spring.SpringModule.contributeApplicationInitializer(OrderedConfiguration, ApplicationContext): No service implements the interface org.springframework.context.ApplicationContext.
    at org.apache.tapestry5.ioc.internal.ServiceBuilderMethodInvoker.createObject(ServiceBuilderMethodInvoker.java:76)
    at org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator$1.invoke(OperationTrackingObjectCreator.java:45)
    at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:65)
    at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
    at org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1063)
    at ......

    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: java.lang.RuntimeException: Error invoking service contribution method org.apache.tapestry5.spring.SpringModule.contributeApplicationInitializer(OrderedConfiguration, ApplicationContext): No service implements the interface org.springframework.context.ApplicationContext.
    at org.apache.tapestry5.ioc.internal.ContributionDefImpl.invokeMethod(ContributionDefImpl.java:139)
    at org.apache.tapestry5.ioc.internal.ContributionDefImpl.contribute(ContributionDefImpl.java:82)
    at org.apache.tapestry5.ioc.internal.RegistryImpl$9.run(RegistryImpl.java:651)
    at org.apache.tapestry5.ioc.internal.OperationTrackerImpl$1.invoke(OperationTrackerImpl.java:50)org.apache.tapestry5.ioc.internal.ServiceBuilderMethodInvoker.createObject(ServiceBuilderMethodInvoker.java:56)
    ... 65 more
Caused by: org.apache.tapestry5.ioc.internal.OperationException: No service implements the interface org.springframework.context.ApplicationContext.
    at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.logAndRethrow(OperationTrackerImpl.java:102)
    at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:69)
    at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
    ....
    ... 93 more
Caused by: java.lang.RuntimeException: No service implements the interface org.springframework.context.ApplicationContext.
    at org.apache.tapestry5.ioc.internal.RegistryImpl.getService(RegistryImpl.java:670)
    at org.apache.tapestry5.ioc.internal.ObjectLocatorImpl.getService(ObjectLocatorImpl.java:45)...)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

花心好男孩 2024-12-04 14:04:21

我不知道 Tapestry,但看起来它只是找不到你的 Spring 上下文。您是否遵循了将 Tapestry 与 Spring 集成的说明?您是否已确认 Spring 确实已启动?

I don't know Tapestry, but it looks like it just can't find your Spring context. Have you followed the instructions for integrating Tapestry with Spring? Have you verified that Spring is actually starting?

蓬勃野心 2024-12-04 14:04:21

您似乎缺少 Tapestry-Spring 依赖项

   <dependency>
     <groupId>org.apache.tapestry</groupId>
     <artifactId>tapestry-spring</artifactId>
     <version>[your-tapestry-version]</version>
   </dependency>

您使用的 Tapestry 版本是什么?我相信 5.0 Tapestry 期望 ApplicationContext 位于 ServletContext 中。除此之外,请像@Ryan Steward 建议的那样检查文档

You seem to be missing the tapestry-spring dependency

   <dependency>
     <groupId>org.apache.tapestry</groupId>
     <artifactId>tapestry-spring</artifactId>
     <version>[your-tapestry-version]</version>
   </dependency>

What tapestry version are you using? I believe in 5.0 tapestry expects the ApplicationContext to be in the ServletContext. Other than that, check the documentation like @Ryan Steward suggested.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文