Practical Apache Struts2 - compile fails on annotation

2007-11-29 Thread Robert Harrison
Dear All, I am working through Roughley's book (Struts-2.0.9) and am having trouble with the first example using annotations. The stack trace I get is: December 10, 2007 December 10, 2007 org.apache.maven.BuildFailureException: Compilation failure

Re: Practical Apache Struts2 - compile fails on annotation

2007-11-29 Thread Dave Newton
\*Compilation\* failure? Did you import the annotation it's giving you the error for? web.xml won't affect compilation, but I don't understand why you don't have a mapping for the S2 dispatcher (does it default to /* or something? I'd map it explicitly anyway, if that's the case.) d. ---

Re: Practical Apache Struts2 - compile fails on annotation

2007-11-29 Thread Ian Roughley
This is chapter 3, right? I just ran the command mvn clean compile from my local copy and everything compiles correctly. Are you compiling from an IDE? If so, do you have all the JAR files in the project? /Ian -- Ian Roughley From Down Around, Inc. Consulting * Training / Mentoring *

Re: Practical Apache Struts2 - compile fails on annotation

2007-11-29 Thread Robert Harrison
Ian/Dave, Thanks for the advice. I constructed the project from the command line using Maven2 (First time). My OS is Suse10.0. I have imported the project into Eclipse but I've just used the IDE for editing and hints and have still used the command line for compilation. The ZCAction.java

Re: Practical Apache Struts2 - compile fails on annotation

2007-11-29 Thread Ian Roughley
Weird. I opened the ZCAction.java file, and I can see the imports right there :-) -- Ian Roughley From Down Around, Inc. Consulting * Training / Mentoring * Agile Process * Open Source web: http://www.fdar.com - email: [EMAIL PROTECTED] Robert Harrison wrote: Ian/Dave, Thanks for the

Re: Practical Apache Struts2 - compile fails on annotation

2007-11-29 Thread Dave Newton
If you Organize Importsed it may have removed the imports it couldn't find. I'd try using one of the Maven plugins and allowing Maven dependency management and either turning off automatic project building or set up appropriate output directories for all the relevant source directories. d. ---

Re: Practical Apache Struts2 - compile fails on annotation

2007-11-29 Thread Robert Harrison
Okay. Problem solved. My confusion was that, in the book, the imports are not shown. Eclipse suggested the correct imports and, when included in the file, the file compiles. My error was in assuming that the filter in web.xmlwas all that was needed. Thanks. Bob On Nov 29, 2007 1:55 PM, Dave