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 file compiles if I import org.apache.struts2.config.Resultand
org.apache.struts2.dispatcher.ServletDispatcherResult (both suggested by
Eclipse). But both these classes are in the Struts2 core jar which is in the
Maven repository. File ownership and permissions are set correctly as well.

Bob

On Nov 29, 2007 1:01 PM, Ian Roughley <[EMAIL PROTECTED]> wrote:

> 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 * Agile Process * Open Source
> web: http://www.fdar.com - email: [EMAIL PROTECTED]
>
>
>
> Robert Harrison wrote:
> > 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
> >
> >
> /home/rharri/workspace/app/src/main/java/com/fdar/apress/s2/ZCAction.java:[5,1]
> > cannot find symbol
> >
> > symbol: class Result
> >
> > @Result(name="success",value="/jsp/success.jsp",type=
> > ServletDispatcherResult.class)
> >
> > at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
> > DefaultLifecycleExecutor.java:560)
> >
> > at
> >
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle
> > (DefaultLifecycleExecutor.java:480)
> >
> > at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
> > DefaultLifecycleExecutor.java:459)
> >
> > at
> >
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
> > (DefaultLifecycleExecutor.java:311)
> >
> > at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
> > DefaultLifecycleExecutor.java:278)
> >
> > at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
> > DefaultLifecycleExecutor.java:143)
> >
> > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
> >
> > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
> >
> > at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
> >
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >
> > at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java
> > :39)
> >
> > at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> > DelegatingMethodAccessorImpl.java:25)
> >
> > at java.lang.reflect.Method.invoke(Method.java:585)
> >
> > at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> >
> > at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> >
> > at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> >
> > at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> >
> > Caused by: org.apache.maven.plugin.CompilationFailureException:
> Compilation
> > failure
> >
> >
> /home/rharri/workspace/app/src/main/java/com/fdar/apress/s2/ZCAction.java:[5,1]
> > cannot find symbol
> >
> > symbol: class Result
> >
> > @Result(name="success",value="/jsp/success.jsp",type=
> > ServletDispatcherResult.class)
> >
> > at org.apache.maven.plugin.AbstractCompilerMojo.execute(
> > AbstractCompilerMojo.java:516)
> >
> > at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:114)
> >
> > at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
> > DefaultPluginManager.java:443)
> >
> > at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
> > DefaultLifecycleExecutor.java:539)
> >
> > ... 16 more
> >
> >
> > Here is the relevant portion of web.xml:
> >
> >     <filter-name>struts2</filter-name>
> >     <filter-class>org.apache.struts2.dispatcher.FilterDispatcher
> > </filter-class>
> >     <init-param>
> >       <param-name>actionPackages</param-name>
> >       <param-value>com.fdar.apress.s2,com.apress.s2</param-value>
> >     </init-param>
> >   </filter>
> >
> > (there is no filter mapping for struts2)
> >
> >
> > I can't find any setup differences in the Struts Wiki. The only similar
> > error I found using Google suggested  deleting the Struts and
> openSymphony
> > jars. I did and Maven re-installed the jars and gave the same error.
> >
> >
> > Please, what simple/stupid thing am I missing?
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to