This week's book giveaways are in the Cloud and AI/ML forums.
We're giving away four copies each of Cloud Native Patterns and Natural Language Processing and have the authors on-line!
See this thread and this one for details.
Win a copy of Cloud Native PatternsE this week in the Cloud forum
or Natural Language Processing in the AI/ML forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

[Spring Security] No bean named 'springSecurityFilterChain' is defined

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone !

I'm new on Spring Security, and I'm trying to communicate with a LDAP server. But I have a very weird message, believing Google who only found one result. I have :

No bean named 'springSecurityFilterChain' is defined


I've searched a lot, in the fucking manual too, and I didn't find a solution.

I'm using ubuntu 11.04,
Spring and Spring Security 3.0.2.RELEASE
Spring-LDAP 1.3.1.RELEASE
Maven 2.2.1

Here are the config files :

web.xml :



springConfiguration.xml :



application-context.xml :


Thank you.
 
ranger
Posts: 17344
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't see you loading the application-context.xml file anywhere. And that is where you Spring Security beans are defined. So if it doesn't load it, it doesn't create any beans for it.

I actually would have called that file security-config.xml or security-context.xml since all the beans in that xml file are all for Spring Security.

Try this in your web.xml



Now, I am using your file naming there. But I would recommend making it more concise and understandable which config file has what and where to find them.

Mark
 
Jack Rackham
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks. I followed your advice, and I've also made it all again. But I've a new error at login. So I get access to the application, but when I try to log in I've this error :

Your login attempt was not successful, try again.

Reason: [LDAP: error code 32 - 0000208D: NameErr: DSID-031001E4, problem 2001 (NO_OBJECT), data 0, best match of: 'DC=xxx,DC=net' ]; nested exception is javax.naming.NameNotFoundException: [LDAP: error code 32 - 0000208D: NameErr: DSID-031001E4, problem 2001 (NO_OBJECT), data 0, best match of: 'DC=xxx,DC=net' ]; remaining name 'cn=users,dc=xxxx,dc=net'



Here are my new config files :

web.xml



springConfiguration.xml :



and springSecuritySettings.xml :
 
Mark Spritzler
ranger
Posts: 17344
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
At this point, it doesn't seem to be a Spring issue, but an issue with your LDAP. Meaning either incorrect values for finding LDAP values, or your LDAP isn't available.

Unfortunately, I have no experience with LDAP, so I can't help further.

Good Luck

Mark
 
Jack Rackham
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK thanks. haven't ruled the matter yet, but i've tried with a real LDAP (this is for Active Directory). And still got this fucking error code 32.
I give you more details when it's ok ;)
 
Jack Rackham
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found a source saying that the matter indeed comes from LDAP. It says that LDAP tries to create an object in an OU that doesn't exist. But in the example he's trying to create an object, whereas I try to get one back !

http://books.google.com/books?id=ASyevTgBK0AC&pg=PT12&lpg=PT12&dq=ldap+%22error+code+32%22&source=bl&ots=Y0wcBeVja-&sig=oGNHrJSCUlnVUctQR_k7TcP9PVQ&hl=en&ei=7N8_TtrVK4Ow8gPa05DmAg&sa=X&oi=book_result&ct=result&resnum=2&ved=0CDQQ6AEwATgK#v=onepage&q=ldap%20%22error%20code%2032%22&f=false

And I had forgotten to give you the LDAP error message :

Your login attempt was not successful, try again.

Reason: [LDAP: error code 32 - No Such Object]; nested exception is javax.naming.NameNotFoundException: [LDAP: error code 32 - No Such Object]; remaining name 'ou=people,dc=example,dc=com'

 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!