When we upgrade JasperReportsServer from version 7.1 to 7.2 the application started with the following errors:
2019-06-05 07:28:16,583 INFO [stdout] (ServerService Thread Pool -- 90) 2019-06-05 07:28:16,578 ERROR ContextLoader,ServerService Thread Pool -- 90:350 - Context initialization failed
2019-06-05 07:28:16,583 INFO [stdout] (ServerService Thread Pool -- 90) org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'proxyBasicProcessingFilter' defined in ServletContext resource [/WEB-INF/applicationContext-externalAuth-LDAP.
xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'authenticationManager' of bean class [com.jaspersoft.jasperserver.api.security.externalAuth.ExternalAuthBasicProcessingFilter]: Bean property 'authenticationManager' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
The WEB-INF/applicationContext-externalAuth-LDAP.xml file seems to be different in 7.1 and 7.2.
in 7.2, they upgraded Spring Security to a new version. It is suggested that you reimplement your external auth using the new files as a base. An overview is here:
I have the same problem here after upgrade from 6.3 to 7.2.
I used the new sample file from 7.2 sample-applicationContext-externalAuth-LDAP.xml and reimplemented our settings.
But after server restart I got the same error like @roger.mirror
See also this bug report : [#11866] - ldap integration breaks jasperserver
Any help is appreciated.
I just started working on LDAP authenticaiton for our Jasper setup. We're running 7.2. It appears that the suppled example file "sample-applicationContext-externalAuth-LDAP.xml" that ships with Jasper 7.2 does not work, and causes the error above (Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'authenticationManager' of bean class ).
this is kind of a show-stopper for us.
It looks like Spring Security was upgraded in JR v7.2 up to 4.2. Which led to change in ExternalAuthBasicProcessingFilter.
So you need to use constructor arg for authenticationManager bean instead of setter:
<constructor-arg index="0" ref="ldapAuthenticationManager"/>
<property name="externalDataSynchronizer" ref="externalDataSynchronizer"/>