Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3276560
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T19:16:17+00:00 2026-05-17T19:16:17+00:00

i was following the guide http://appfuse.org/display/APF/Using+Struts+2 to make a simple appfuse site, but i

  • 0

i was following the guide http://appfuse.org/display/APF/Using+Struts+2 to make a simple appfuse site, but i got an error while compiling with Maven, which is reporting org.appfuse.webapp.action.BaseAction does not exist.

I searched a lot from the google with no luck, can anyone give me a hints, appreciate for any help, idea or advise. Thankyou

both maven 2.2.1 and 3 produced same error:
using archetype: appfuse-basic-struts-archetype, v.2.1.0-M1

maven command:

mvn archetype:generate -B -DarchetypeGroupId=org.appfuse.archetypes -
DarchetypeArtifactId=appfuse-basic-struts-archetype -DarchetypeVersion=2.1.0-M1 
-DgroupId=com.mycompany -DartifactId=myproject

at this pt, mvn test or jetty:run-war have not raise a error.

however, when i add 2 classes (PersonActionTest and PersonAction) as below, it fail to compile

PersonActionTest: src\test\java\com\mycompany\webapp\webapp\action

package com.mycompany.webapp.action;


import com.opensymphony.xwork2.ActionSupport;
import org.apache.struts2.ServletActionContext;
import org.appfuse.service.GenericManager;
import org.appfuse.tutorial.model.Person;  \\this fails to compile
import org.appfuse.webapp.action.BaseActionTestCase;    \\this fails to compile
import org.springframework.mock.web.MockHttpServletRequest;

public class PersonActionTest extends BaseActionTestCase {
    private PersonAction action;

    @Override
    protected void onSetUpBeforeTransaction() throws Exception {
        super.onSetUpBeforeTransaction();
        action = new PersonAction();
        GenericManager personManager = (GenericManager) applicationContext
                .getBean("personManager");
        action.setPersonManager(personManager);

        // add a test person to the database
        Person person = new Person();
        person.setFirstName("Jack");
        person.setLastName("Raible");
        personManager.save(person);
    }

    public void testSearch() throws Exception {
        assertEquals(action.list(), ActionSupport.SUCCESS);
        assertTrue(action.getPersons().size() >= 1);
    }
}

PersonAction: src\main\java\com\mycompany\webapp\webapp\action

package com.mycompany.webapp.action;


import org.appfuse.webapp.action.BaseAction; \\this fails to compile
import org.appfuse.tutorial.model.Person;  \\this fails to compile
import org.appfuse.service.GenericManager;

import java.util.List;

public class PersonAction extends BaseAction {
    private GenericManager<Person, Long> personManager;
    private List persons;

    public void setPersonManager(GenericManager<Person, Long> personManager) {
        this.personManager = personManager;
    }

    public List getPersons() {
        return persons;
    }

    public String list() {
        persons = personManager.getAll();
        return SUCCESS;
    }
}

Error Message:

[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building AppFuse Struts 2 Application 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- aspectj-maven-plugin:1.2:compile (default) @ realtest ---
[ERROR] The import org.appfuse.webapp cannot be resolved
[ERROR] The import org.appfuse.tutorial cannot be resolved
[ERROR] Person cannot be resolved to a type
[ERROR] Person cannot be resolved to a type
[ERROR] personManager cannot be resolved or is not a field
[ERROR] personManager cannot be resolved
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.285s
[INFO] Finished at: Thu Oct 21 09:35:56 CST 2010
[INFO] Final Memory: 6M/27M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:aspectj-maven-plugin:1.2:compil
e (default) on project realtest: Compiler errors :
[ERROR] error at import org.appfuse.webapp.action.BaseAction;
[ERROR] ^^^^^^^^^^^^^^^^^

truncated as the rest of msg is similar

Thanks~

steven

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T19:16:18+00:00Added an answer on May 17, 2026 at 7:16 pm

    I’m not an Appfuse expert (by this, I mean that I’m not aware of all the details of changes and existing issues) but the project generated using the version 2.1.0-M1 of the archetype misses the appfuse-struts artifact (which provides o.a.w.a.BaseAction).

    I tried to add it manually but then ran into some other artifact resolution issue (a transitive dependency not found) and just gave up.

    However, the project you’d get using the previous version of the archetype (i.e. version 2.0.2) looks ok and my recommendation would be to use this version instead:

    mvn archetype:generate -B -DarchetypeGroupId=org.appfuse.archetypes \
        -DarchetypeArtifactId=appfuse-basic-struts \
        -DarchetypeVersion=2.0.2 \
        -DgroupId=com.mycompany \
        -DartifactId=myproject
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm installing Apache on Ubuntu following this install guide http://httpd.apache.org/docs/trunk/install.html but get an error
I have been following the simple guide at http://www.atinfinity.info/wiki/index.php?OpenCV/Using%20OpenCV%202.2%20on%20iOS%20SDK%204.2 (which uses the older guide
I'm using the following step by step guide to connect to Facebook Connect: http://msdn.microsoft.com/en-us/windows/ee702803.aspx
I'm following this guide (http://www.igniterealtime.org/builds/openfire/docs/latest/documentation/db-integration-guide.html) to integrate the Openfire server with and Sql Server
I am following the guide http://edgeguides.rubyonrails.org/plugins.html and it seems to be slightly outdated. Could
I followed the following guide to the letter: http://www.scons.org/wiki/ToolsIndex I tried checking out lp:scons-qt4
I am following the guide from http://guides.rubyonrails.org/i18n.html to add several translation to my page,
So I am following this guide: http://technotes.1000lines.net/?p=23 and I am going through the steps.
I'm following this guide: http://www.math.umd.edu/~dcarrera/ruby/0.3/chp_01/programs.html and I'm trying to create my first ruby program.
I have read the following rails guide : http://guides.rails.info/active_record_querying.html in there exemple a client

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.