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 6975829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:25:09+00:00 2026-05-27T17:25:09+00:00

I had a custom interceptor in hand and I want it to be associated

  • 0

I had a custom interceptor in hand and I want it to be associated to an Action class using annotation. I had added interceptor-ref using the one declared in struts.xml but am getting exception as,

 "SEVERE: Exception starting filter Struts2
Unable to load configuration. - [unknown location]" 

My Action class is as follows,

@Action(value = "/login", results = {
            @Result(name = "success", location = "/Welcome.jsp"),
            @Result(name = "error", location = "/Login.jsp") },
            interceptorRefs = {
                @InterceptorRef("defaultStack"),
                 @InterceptorRef("myLogging")}
    )
    public String validateCredentials() {
        if (this.userName.equals("Raj") && this.password.equals("aspire")) {
            return "success";
        } else {
            // addActionError(getText("error.login"));
            return "error";
        }
    }

My struts.xml is as follows,

<package name="default" extends="struts-default" namespace="/">
        <interceptors>
            <interceptor name="myLogging" class="org.struts.hello.MyLoggingInterceptor"/>
        </interceptors>
    </package>

Error Stack:

SEVERE: Exception starting filter Struts2
Unable to load configuration. - [unknown location]
    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58)
    at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:360)
    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:403)
    at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:190)
    at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295)
    at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422)
    at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:115)
    at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3838)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4488)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    at org.apache.catalina.core.StandardService.start(StandardService.java:519)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: Unable to find interceptor class referenced by ref-name loggingStack - [unknown location]
    at com.opensymphony.xwork2.config.providers.InterceptorBuilder.constructInterceptorReference(InterceptorBuilder.java:52)
    at org.apache.struts2.convention.DefaultInterceptorMapBuilder.buildInterceptorList(DefaultInterceptorMapBuilder.java:99)
    at org.apache.struts2.convention.DefaultInterceptorMapBuilder.build(DefaultInterceptorMapBuilder.java:90)
    at org.apache.struts2.convention.DefaultInterceptorMapBuilder.build(DefaultInterceptorMapBuilder.java:74)
    at org.apache.struts2.convention.PackageBasedActionConfigBuilder.createActionConfig(PackageBasedActionConfigBuilder.java:676)
    at org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildConfiguration(PackageBasedActionConfigBuilder.java:493)
    at org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildActionConfigs(PackageBasedActionConfigBuilder.java:278)
    at org.apache.struts2.convention.ClasspathPackageProvider.loadPackages(ClasspathPackageProvider.java:52)
    at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:200)
    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55)
    ... 21 more
Dec 22, 2011 3:30:22 PM org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
Dec 22, 2011 3:30:22 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/StrutsAnnotation] startup failed due to previous errors
  • 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-27T17:25:10+00:00Added an answer on May 27, 2026 at 5:25 pm

    I do not have much exp using annotation with or without struts2 but i believe you are using convention-plugin.Here is a quick shot of what they saying about your problem.

    If you get errors like “Unable to find interceptor class referenced by
    ref-name XYZ”. This means that the package where Convention is placing
    your actions, does not extend the package where the interceptor is
    defined. To fix this problem either

    1. Use @ParentPackage annotation(or struts.convention.default.parent.package)
      passing the name of the package that defines the interceptor.
    2. Create a package in XML that extends the package that defines the interceptor,
      and use @ParentPackage(or Struts.convention.default.parent.package) to point to it.

    For more details refer there documentation

    convention-plugin

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi, I had Generate custom layouts in my screen, i want change color or
I had a custom script programmed and it is using the authors own module
I have a (custom) embedded jetty launcher which I had been using to develop/test
Hi i am writing a custom http server. At first i had only one
If I had a custom class that inherits from Collection called LookUpValueCollection that handle
previously i had custom tableviewcell and was loading from Nib.in that i have specified
Back in MVC3, I had a custom ControllerFactory which would use my own container
I had implemented a custom Gallery with custom Adapter. My Requirement is that however
We had our own custom logger in a C# program and now are trying
I had to overwrite a tag from a custom Tag library due to a

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.