You need to use "mvn jetty:run-war", not "jetty:run". This is explained at the bottom of the QuickStart Guide:

<quote>
# To view your application run mvn jetty:run-war from your project's directory (for a modular project, you'll need to run mvn jetty:run- war from your project's web directory). Maven will start Jetty and you should be able to view your application in your browser at http:// localhost:8080.

The default username/password for an admin user is admin/admin. For a regular user, use user/user.

# To override files from AppFuse, run mvn war:inplace. This will extract the dependent WARs into src/main/webapp, where you can change files to your heart's content. When you have the war expanded in your source tree, you can run mvn jetty:run. This will allow you to change files on-the-fly and Jetty will reload them as needed. The only problem with this approach is you end up with an "exploded AppFuse" in your project, which won't bode well for upgrading. We recommend you check your project into source control before running mvn war:inplace. That way, it'll be easier for you to decide what needs to be checked in (over written) and what can be deleted.
</quote>

Matt

On Dec 5, 2007, at 12:55 PM, Łukasz Bachman wrote:

Hello!

I'm starting with AppFuse 2.0.1 (used to work on 1.9.8) and I've encountered following error while trying to create basic Spring MVC web-app (error occured during executing mvn jetty:run goal) :

(...) ERROR [main] ContextLoader.initWebApplicationContext(206) | Context initialization failed org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from ServletContext resource [/WEB- INF/xfir e-servlet.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/xfire-servlet.xml] at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBean Definitions (XmlBeanDefinitionReader.java:320) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBean Definitions(XmlBeanDefinitionReader.java:290) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader .loadBeanDefinitions (AbstractBeanDefinitionReader.java:142)

Well, I tried to find out the solution to my problem on the web, but I couldn't. I've found somewhere "xfire-servlet.xml" and successfully placed it into appropriate directory, but then I had similar problem with " security.xml" file. This one was harder to find and even harder to make work. So in the end I gave up, cause I think I must have been doing something wrong, since this is totally basic thing, and according to tutorial - everything should work right. Any ideas what shall I do? Where can I find info about creating those two files by myself?

One remark:
I used following command to create my app's skeleton :

mvn archetype:create -DarchetypeGroupId=org.appfuse.archetypes - DarchetypeArtifactId=appfuse-basic-spring -DremoteRepositories= http://static.appfuse.org/releases -DarchetypeVersion=2.0.1 - DgroupId=PackageName -DartifactId=MyAppsName

where of course PackageName and MyAppsName where properly provided.

This is the content of my src/main/webapp/WEB-INF directory right after the error occured (before digging through the web and downloading missing *.xmls):

2007-12-05  20:26    <DIR>          .
2007-12-05  20:26    <DIR>          ..
2007-12-05  20:26               905 applicationContext-validation.xml
2007-12-05  20:26               406 applicationContext.xml
2007-12-05  20:26             4 630 dispatcher-servlet.xml
2007-12-05  20:26             1 242 menu-config.xml
2007-12-05  20:26               549 urlrewrite.xml
2007-12-05  20:26             4 947 validation.xml
2007-12-05  20:26             2 659 validator-rules-custom.xml
2007-12-05  20:26            41 584 validator-rules.xml
2007-12-05  20:26             9 635 web.xml
               9 plik(ów)          66 557 bajtów
               2 katalog(ów)     455 462 912 bajtów wolnych

Best regards to all AppFuse Users!

Cheers.

Reply via email to