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

  • Home
  • SEARCH
  • 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 7184829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T18:16:55+00:00 2026-05-28T18:16:55+00:00

I have a spring beans configuration file where I define the following jackson classes

  • 0

I have a spring beans configuration file where I define the following jackson classes as spring beans.
For some reason on run-time the filterProvider bean is instantiated without the map argument.
You can see from the docs that the SimpleFilterProvider does have such a constructor and that SimpleBeanPropertyFilter implements BeanPropertyFilter.

<bean id="productAttributesAndAdvertiserNameFilter" class="org.codehaus.jackson.map.ser.impl.SimpleBeanPropertyFilter" factory-method="filterOutAllExcept">
        <constructor-arg value="name"/>
    </bean>
    <bean id="offerIdFilter" class="org.codehaus.jackson.map.ser.impl.SimpleBeanPropertyFilter" factory-method="filterOutAllExcept">
        <constructor-arg value="id"/>
    </bean>
    <bean id="filterProvider" class="org.codehaus.jackson.map.ser.impl.SimpleFilterProvider">
        <constructor-arg>
            <util:map value-type="org.codehaus.jackson.map.ser.BeanPropertyFilter">
                <entry key="onlyNameFilter" value-ref="productAttributesAndAdvertiserNameFilter" />
                <entry key="onlyIdFilter" value-ref="offerIdFilter" />
            </util:map>
        </constructor-arg>
    </bean>

Update:
As of Jackson 1.9.5 this issue is fixed (thanks Tatu)

Any help would be appreciated.

  • 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-28T18:16:56+00:00Added an answer on May 28, 2026 at 6:16 pm

    Looks like you’ve found a bug in SimpleFilterProvider.

    I just downloaded the latest sources (1.9.4) and the constructors are defined as such:

    public SimpleFilterProvider() {
        _filtersById = new HashMap<String,BeanPropertyFilter>();
    }
    
    /**
     * @param mapping Mapping from id to filter; used as is, no copy is made.
     */
    public SimpleFilterProvider(Map<String,BeanPropertyFilter> mapping) {
        _filtersById = new HashMap<String,BeanPropertyFilter>();
    }
    

    The constructor which takes the mapping ignores it… (i.e. javadoc is incorrect)

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

Sidebar

Related Questions

I have the following spring bean configuration <bean id=fileBean class=java.io.File> <constructor-arg type=java.lang.String value=$prop{file.path.property} />
We have a Hibernate/Spring application that have the following Spring beans: <bean id=transactionManager class=org.springframework.orm.hibernate3.HibernateTransactionManager
I have just broken up a Spring bean configuration file into smaller external files
In my configuration's spring/resources.xml file, I define a bean like this : <bean id=myService
I have many cookie-cutter spring beans and don't want to explicitly define each one
I am using spring to initialise my beans. I have configured a bean which
in common, hibernate sessionfactory is created in spring configuration file (eg spring-dao.xml) like; <bean
I have a String value in a Spring configuration file that comes to be
I have a spring configuration file for spring security. At beginning my file is
i have a JSF web application. I use Beans as Spring Beans (not JSF

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.