Hi.

We are using Wicket Bootstap Less in our project and have an issue with the
Less compilation.
>From time to time the compilation fails for some of the Less files in our
project, usually we see this in our Selenium Grid but it have happened
locally as well.

When the compilation fails we get this stacktrace:

java.lang.NullPointerException: null
at
de.agilecoders.wicket.less.LessCacheManager.findLastModified(LessCacheManager.java:159)
~[wicket-bootstrap-less-0.9.16.jar:0.9.16]
at
de.agilecoders.wicket.less.LessCacheManager.findLastModified(LessCacheManager.java:165)
~[wicket-bootstrap-less-0.9.16.jar:0.9.16]
at
de.agilecoders.wicket.less.LessCacheManager.getLastModifiedTime(LessCacheManager.java:145)
~[wicket-bootstrap-less-0.9.16.jar:0.9.16]
at
de.agilecoders.wicket.less.LessResourceStream.lastModifiedTime(LessResourceStream.java:65)
~[wicket-bootstrap-less-0.9.16.jar:0.9.16]
at
org.apache.wicket.request.resource.PackageResource.newResourceResponse(PackageResource.java:295)
~[wicket-core-6.22.0.jar:6.22.0]
at
org.apache.wicket.request.resource.AbstractResource.respond(AbstractResource.java:498)
~[wicket-core-6.22.0.jar:6.22.0]
at
org.apache.wicket.request.handler.resource.ResourceRequestHandler.respond(ResourceRequestHandler.java:75)
~[wicket-core-6.22.0.jar:6.22.0]
at
org.apache.wicket.request.handler.resource.ResourceReferenceRequestHandler.respond(ResourceReferenceRequestHandler.java:108)
~[wicket-core-6.22.0.jar:6.22.0]
at
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:890)
~[wicket-core-6.22.0.jar:6.22.0]
at
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
~[wicket-request-6.22.0.jar:6.22.0]
at
org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261)
[wicket-core-6.22.0.jar:6.22.0]
at
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:218)
[wicket-core-6.22.0.jar:6.22.0]
at
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289)
[wicket-core-6.22.0.jar:6.22.0]
at
org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259)
[wicket-core-6.22.0.jar:6.22.0]
at
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201)
[wicket-core-6.22.0.jar:6.22.0]
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:282)
[wicket-core-6.22.0.jar:6.22.0]
at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
[jetty-servlet-9.2.15.v20160210.jar:9.2.15.v20160210]
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:369)
[spring-security-web-3.0.7.RELEASE.jar:3.0.7.RELEASE]
at
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
[spring-security-web-3.0.7.RELEASE.jar:3.0.7.RELEASE]
at
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
[spring-security-web-3.0.7.RELEASE.jar:3.0.7.RELEASE]
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
[spring-security-web-3.0.7.RELEASE.jar:3.0.7.RELEASE]
at
org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)
[spring-security-web-3.0.7.RELEASE.jar:3.0.7.RELEASE]
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
[spring-security-web-3.0.7.RELEASE.jar:3.0.7.RELEASE]
at
org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100)
[spring-security-web-3.0.7.RELEASE.jar:3.0.7.RELEASE]
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
[spring-security-web-3.0.7.RELEASE.jar:3.0.7.RELEASE]
at
org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78)
[spring-security-web-3.0.7.RELEASE.jar:3.0.7.RELEASE]

I have been able do see what is happening when we get the problem locally,
it is the importedSources for the file currently compiled that contains
null.
And from what I have seen (if I'm remembering correctly) it has been the
first element in the list that is null and the other items in the list
contains the correct imports. We are using "classpath!" imports for usually
one or two imports.

I cannot see any point where it is possible to add null to the list of
imported sources from reviewing the code that adds the imports in the Less
files.

Furthermore we are adding Less a variable using
LessCompilerConfigurationFactory and clear the LessCacheManager upon
changes to this variable, however during the tests in our Selenium Grid
this shouldn't happen.

My problem is that I'm not able to reproduce the issue.
Have someone encountered this problem before? Or does someone have hints on
how to proceed with the troubleshooting?

Regards
Erik Strid

Reply via email to