Page 1 of 1

How to set value for thymeleaf.threadLocalCleanup.enabled

Posted: Thu Apr 17, 2014 5:20 pm
by nairvvin
Hi All,

When setting the environment as production for building and deployment, i am getting below error while starting the application.

Anyboday knows how to set value for the BroadleafRequestProcessor.thymeleafThreadLocalCleanupEnabled? It uses the annotation @Value("${thymeleaf.threadLocalCleanup.enabled}").

Error creating bean with name 'blRequestFilter': Injection of resource dependencies failed;
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'blRequestProcessor': Injection of autowired dependencies failed;
nested exception is org.springframework.beans.factory.BeanCreationException:
Could not autowire field: protected boolean org.broadleafcommerce.common.web.BroadleafRequestProcessor.thymeleafThreadLocalCleanupEnabled;
nested exception is org.springframework.beans.TypeMismatchException: Failed to convert value of type 'java.lang.String'
to required type 'boolean'; nested exception is java.lang.IllegalArgumentException: Invalid boolean value
[${thymeleaf.threadLocalCleanup.enabled}]
org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:306)


Thanks in advance

Re: How to set value for thymeleaf.threadLocalCleanup.enabled

Posted: Tue Apr 22, 2014 12:09 pm
by phillipuniverse
Doesn't make sense to me that you're not getting that property; this is already declared in Broadleaf.

To fix your issue in common-shared.properties put thymeleaf.threadLocalCleanup.enabled=true.

What version of Broadleaf are you using? Did you potentially create a file in your site called common.properties?

Re: How to set value for thymeleaf.threadLocalCleanup.enabled

Posted: Sat Apr 26, 2014 2:51 pm
by nairvvin
I am using version 3.1
I have added the property thymelIeaf.threadLocalCleanup.enabled=true in common.properties. I am not having any common.shared.properties file in the war files. Even I tried to load the property file through java opts, -Dproperty-shared-override=""

Still i am getting same error.

Re: How to set value for thymeleaf.threadLocalCleanup.enabled

Posted: Sun May 11, 2014 1:51 pm
by nairvvin
Hi All

I am vey disappointed with the broadleaf ecom paltform. It is not at all feasible to use this in production without the help of broadleaf support team. I am really wondering anyboday using free version in production. Demo site will be eady to deploy and everybody can spent time on that.