Exception starting filter springSecurityFilterChain

Today I was adding JasperReports reports into our Spring Roo application. And at some point I started getting the following exception during application initialization:
SEVERE: Exception starting filter springSecurityFilterChain
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named ‘springSecurityFilterChain’ is defined
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:549)
at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1096)
All of the links I saw were talking about contexts, servlets and other stuff. None of this really helped me. And finally I found my stupidity in an absolutely different place. In my pom.xml file I’ve put:

<resources>
  <resource>
    <directory>src/main/jasperreports</directory>
    <includes>
      <include>*.jrtx</include>
    </includes>
  </resource>
</resources>

As a result XML files required for Spring initialization were just not copied into the WAR file. Interestingly I didn’t see any warnings or error regarding it before. So the fix is as easy as:

<resources>
  <resource>
    <directory>src/main/resources</directory>
  </resource>
  <resource>
    <directory>src/main/jasperreports</directory>
    <includes>
      <include>*.jrtx</include>
    </includes>
  </resource>
</resources>
Advertisements
This entry was posted in Development, Rants and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s