araik.manukyan25 Posted November 1, 2022 Posted November 1, 2022 Hello dear list. Please to answer anybody in which way we can solve this problem.In Jasperserver community 7.8.0 version I tried to configure Token-based Authentication, according to Token-based Authentication | Jaspersoft Community documentation.When I have copied drome jasperreports-server-cp-7.8.0 sample-applicationContext-externalAuth-preauth.xml to the <js-webapp>/WEB-INF with name applicationContext-externalAuth-preauth.xml and restart the server. I get this error in jasperserver log file.*****************Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'proxyPreAuthenticatedProcessingFilter' defined in ServletContext resource [/WEB-INF/applicationContext-externalAuth-preAuth.xml]: Cannot resolve reference to bean 'preAuthenticatedManager' while setting bean property 'authenticationManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'preAuthenticatedManager' defined in ServletContext resource [/WEB-INF/applicationContext-externalAuth-preAuth.xml]: Cannot create inner bean 'com.jaspersoft.jasperserver.api.security.externalAuth.wrappers.spring.preauth.JSPreAuthenticatedAuthenticationProvider#69ed9b0' of type [com.jaspersoft.jasperserver.api.security.externalAuth.wrappers.spring.preauth.JSPreAuthenticatedAuthenticationProvider] while setting constructor argument with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.jaspersoft.jasperserver.api.security.externalAuth.wrappers.spring.preauth.JSPreAuthenticatedAuthenticationProvider#69ed9b0' defined in ServletContext resource [/WEB-INF/applicationContext-externalAuth-preAuth.xml]: Cannot create inner bean 'com.jaspersoft.jasperserver.api.security.externalAuth.preauth.JSPreAuthenticatedUserDetailsService#aa08994' of type [com.jaspersoft.jasperserver.api.security.externalAuth.preauth.JSPreAuthenticatedUserDetailsService] while setting bean property 'preAuthenticatedUserDetailsService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.jaspersoft.jasperserver.api.security.externalAuth.preauth.JSPreAuthenticatedUserDetailsService#aa08994' defined in ServletContext resource [/WEB-INF/applicationContext-externalAuth-preAuth.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: orgId must be mapped in tokenFormatMapping*******************Dear list how to resolve reference to bean 'preAuthenticatedManager' while setting bean property 'authenticationManager';Why Jasper server dose not start when I copied applicationContext-externalAuth-preauth.xml to the <js-webapp>/WEB-INF with the error mentioned above.Best regards,Arayik Manukyan.
Michael Bielkiewicz Posted February 22, 2023 Posted February 22, 2023 I believe the reason is that the default preAuth file you put into place references orgs and tries to sync orgs. Read the comments of the file as I believe there's a way to swap that out so it does not try to read orgs (which aren't allowed in community editions).
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now