简体   繁体   English

将jspresso helloworld Web应用程序(5分钟教程)部署到tomcat6 / tomcat7失败

[英]Deploying jspresso helloworld webapp (5min tutorial) to tomcat6/tomcat7 fails

After the Jspresso 10min tutorial went fine i start trying the 5min tutorial but cannnot get it to work. 在Jspresso 10分钟教程运行良好之后,我开始尝试5分钟教程,但无法使其正常工作。 I'm always getting the following exception when deploying the webapp to tomcat6/tomcat7. 将Web应用程序部署到tomcat6 / tomcat7时,总是出现以下异常。

**** MessageBrokerServlet in application 'Example Application' failed to initialize due to runtime exception:   Exception: flex.messaging.config.ConfigurationException: Please specify a valid 'services.configuration.file' in web.xml.  You specified '/WEB-INF/flex/services-config.xml'.  This is not a valid file system path reachable via the app server and is also not a path to a resource in your J2EE application archive.
at flex.messaging.config.ServletResourceResolver.isAvailable(ServletResourceResolver.java:54)
at flex.messaging.config.FlexConfigurationManager.setupConfigurationPathAndResolver(FlexConfigurationManager.java:202)
at flex.messaging.config.FlexConfigurationManager.getMessagingConfiguration(FlexConfigurationManager.java:78)
at flex.messaging.MessageBrokerServlet.init(MessageBrokerServlet.java:109)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1213)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1026)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4421)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4734)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)

My setup: Win7, jdk1.7.0_55, Eclipse Luna Service Release 2 (4.4.2), Jspresso Developer Studio from www.jspresso.org/external/updates/e44/ 我的设置:Win7,jdk1.7.0_55,Eclipse Luna Service Release 2(4.4.2),来自www.jspresso.org/external/updates/e44/的Jspresso Developer Studio

I'm new to Jspresso and unfortunately not very used to maven. 我是Jspresso的新手,但很不习惯Maven。 Any hints for me? 对我有什么提示吗?

UPDATE: The answer from Vincent was right and fixed the deployment problem but now there is an empty page when i open localhost:8080/helloworld-webapp/flex/index.html and when i try localhost:8080/helloworld-webapp/html5/index.html i get a 404. @Vincent: Any ideas for that problem, too? 更新:文森特的答案是正确的,并解决了部署问题,但是当我打开localhost:8080 / helloworld-webapp / flex / index.html时,当我尝试localhost:8080 / helloworld-webapp / html5 /时,页面空白index.html我得到404。@Vincent:对这个问题有什么想法吗?

UPDATE2: I did a mvn package on console (in eclipse i was not successful) and somehow i had to start the applicaiton once with mvn jetty:run-exploded. UPDATE2:我在控制台上做了一个mvn软件包(在eclipse中我没有成功),所以我不得不以某种方式使用mvn jetty:run-exploded启动应用程序。 After that the deployment to tomcat6 from inside eclipse was successful and now it's working. 之后,从eclipse内部成功部署到tomcat6的工作现在可以进行了。

There is a problem on Jspresso 4.0.7 regarding the Eclipse project import that didn't map correctly the flex config directory on the webapp WEB-INF/flex. 关于Eclipse项目导入,Jspresso 4.0.7上存在一个问题,该问题未能正确映射webapp WEB-INF / flex上的flex config目录。

This bug has been fixed in 4.0.8 but the online Jspresso archetype catalog still points to 4.0.7 . 该错误已在4.0.8修复,但在线Jspresso原型目录仍指向4.0.7 I've updated the online archetype catalog and it is now pointing to 4.0.8 , so the problem should be fixed by now. 我已经更新了在线原型目录,现在它指向4.0.8 ,所以现在应该解决此问题。
Just restart the project generation and you should be fine. 只需重新启动项目生成,就可以了。

UPDATE : Eclipse won't trigger flex nor qooxdoo compilation in its build; 更新 :Eclipse不会在其构建中触发flex或qooxdoo编译; so you have to do it once either from the command line ( mvn package from the project root directory) or from Eclipse (right-click on the project root, run as > Maven build... > package). 因此,您必须从命令行(项目根目录的mvn package )或Eclipse(右键单击项目根,以> Maven build ...>包运行)执行一次。 Since the flex / qooxdoo client does not depend on your application server code, you won't have to do it again during development (unless you want to customize the client UI to integrate custom components for instance, but this is advanced usage). 由于flex / qooxdoo客户端不依赖于您的应用程序服务器代码,因此在开发过程中无需再次执行此操作(除非您要自定义客户端UI以集成例如自定义组件,但这是高级用法)。

Once done, refresh your Eclipse project and restart Tomcat. 完成后,刷新您的Eclipse项目并重新启动Tomcat。

UPDATE 2 : You can also test-drive the bleeding-edge Jspresso version (4.1-SNAPSHOT includes new theme, mongoDB support, ...) by generating your project from the snapshot maven repository, ie : 更新2 :您还可以通过从快照maven存储库生成项目来测试驱动最新的Jspresso版本(4.1-SNAPSHOT包括新主题,mongoDB支持...),即:
mvn archetype:generate -DarchetypeCatalog=http://repository.jspresso.org/maven2-snapshots/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM