After the Jspresso 10min tutorial went fine i start trying the 5min tutorial but cannnot get it to work. I'm always getting the following exception when deploying the webapp to 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/
I'm new to Jspresso and unfortunately not very used to 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?
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. After that the deployment to tomcat6 from inside eclipse was successful and now it's working.
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.This bug has been fixed in
4.0.8
but the online Jspresso archetype catalog still points to4.0.7
. I've updated the online archetype catalog and it is now pointing to4.0.8
, so the problem should be fixed by now.Just restart the project generation and you should be fine.
UPDATE: Eclipse won't trigger flex nor qooxdoo compilation in its build; 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). 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).Once done, refresh your Eclipse project and restart 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, i.e. :
mvn archetype:generate -DarchetypeCatalog=http://repository.jspresso.org/maven2-snapshots/