java - Less4j Compiler NullPointerException on ASTManipulator -


i have styles.less parent files has references less modules. first have less file variables , furthermore making couple of module less files have overview.

the problem have less compile throws nullpointer exception while compiling less files. when use validator or grunt, less files ok.

the following situation fails.

styles.less

@import "core/_settings"; @import "shared-components/_messages"; 

_settings.less

@breakpoint-two: ~"only screen , (min-width: 767px)"; @breakpoint-three: ~"only screen , (min-width: 960px)"; 

_messages.less

.message {     text-align: center;     list-style: none;     margin: 0 0 @spacing 0;     a{         color: @color-black;         &:hover {opacity: .5}     } }  .message--include {     display: block;     font-weight: 600;     line-height: 1.5rem;     margin-bottom: 0.25rem;     padding: 0.75rem;     vertical-align: baseline;      @media @breakpoint-three {         padding: 1rem 1.5rem;     }      p { margin: 0; } } 

the compiler throws error on media query.

java.lang.nullpointerexception     @ com.github.sommeri.less4j.core.compiler.stages.astmanipulator.replace(astmanipulator.java:38)     @ com.github.sommeri.less4j.core.compiler.stages.referencessolver.solveifvariablereference(referencessolver.java:169)     @ com.github.sommeri.less4j.core.compiler.stages.referencessolver.solvenonmixinreferences(referencessolver.java:103)     @ com.github.sommeri.less4j.core.compiler.stages.referencessolver.unsafedosolvereferences(referencessolver.java:85)     @ com.github.sommeri.less4j.core.compiler.stages.referencessolver.solvenonmixinreferences(referencessolver.java:105)     @ com.github.sommeri.less4j.core.compiler.stages.referencessolver.unsafedosolvereferences(referencessolver.java:85)     @ com.github.sommeri.less4j.core.compiler.stages.referencessolver.solvenonmixinreferences(referencessolver.java:105)     @ com.github.sommeri.less4j.core.compiler.stages.referencessolver.unsafedosolvereferences(referencessolver.java:85)     @ com.github.sommeri.less4j.core.compiler.stages.referencessolver.access$000(referencessolver.java:35)     @ com.github.sommeri.less4j.core.compiler.stages.referencessolver$1.run(referencessolver.java:59)     @ com.github.sommeri.less4j.core.compiler.scopes.inscopesnapshotrunner.runinlocaldatasnapshot(inscopesnapshotrunner.java:44)     @ com.github.sommeri.less4j.core.compiler.scopes.inscopesnapshotrunner.runinlocaldatasnapshot(inscopesnapshotrunner.java:24)     @ com.github.sommeri.less4j.core.compiler.scopes.inscopesnapshotrunner.runinlocaldatasnapshot(inscopesnapshotrunner.java:15)     @ com.github.sommeri.less4j.core.compiler.stages.referencessolver.dosolvereferences(referencessolver.java:55)     @ com.github.sommeri.less4j.core.compiler.stages.referencessolver.solvenonmixinreferences(referencessolver.java:101)     @ com.github.sommeri.less4j.core.compiler.stages.referencessolver.unsafedosolvereferences(referencessolver.java:85)     @ com.github.sommeri.less4j.core.compiler.stages.referencessolver.unsafedosolvereferences(referencessolver.java:66)     @ com.github.sommeri.less4j.core.compiler.stages.mixinssolver.compilereferencedmixin(mixinssolver.java:72)     @ com.github.sommeri.less4j.core.compiler.stages.mixinssolver.access$000(mixinssolver.java:30)     @ com.github.sommeri.less4j.core.compiler.stages.mixinssolver$1.run(mixinssolver.java:52)     @ com.github.sommeri.less4j.core.compiler.stages.mixinssolver$1.run(mixinssolver.java:47)     @ com.github.sommeri.less4j.core.compiler.scopes.inscopesnapshotrunner.runinoriginaldatasnapshot(inscopesnapshotrunner.java:104)     @ com.github.sommeri.less4j.core.compiler.scopes.inscopesnapshotrunner.runinoriginaldatasnapshot(inscopesnapshotrunner.java:79)     @ com.github.sommeri.less4j.core.compiler.stages.mixinssolver.resolvemixinreference(mixinssolver.java:47)     @ com.github.sommeri.less4j.core.compiler.stages.mixinssolver.access$500(mixinssolver.java:30)     @ com.github.sommeri.less4j.core.compiler.stages.mixinssolver$2.run(mixinssolver.java:143)     @ com.github.sommeri.less4j.core.compiler.scopes.inscopesnapshotrunner.runinlocaldatasnapshot(inscopesnapshotrunner.java:44)     @ com.github.sommeri.less4j.core.compiler.scopes.inscopesnapshotrunner.runinlocaldatasnapshot(inscopesnapshotrunner.java:24)     @ com.github.sommeri.less4j.core.compiler.stages.mixinssolver.buildmixinreferencereplacement(mixinssolver.java:127)     @ com.github.sommeri.less4j.core.compiler.stages.referencessolver.solvemixinreferences(referencessolver.java:130)     @ com.github.sommeri.less4j.core.compiler.stages.referencessolver.unsafedosolvereferences(referencessolver.java:82)     @ com.github.sommeri.less4j.core.compiler.stages.referencessolver.access$000(referencessolver.java:35)     @ com.github.sommeri.less4j.core.compiler.stages.referencessolver$1.run(referencessolver.java:59)     @ com.github.sommeri.less4j.core.compiler.scopes.inscopesnapshotrunner.runinlocaldatasnapshot(inscopesnapshotrunner.java:44)     @ com.github.sommeri.less4j.core.compiler.scopes.inscopesnapshotrunner.runinlocaldatasnapshot(inscopesnapshotrunner.java:24)     @ com.github.sommeri.less4j.core.compiler.scopes.inscopesnapshotrunner.runinlocaldatasnapshot(inscopesnapshotrunner.java:15)     @ com.github.sommeri.less4j.core.compiler.stages.referencessolver.dosolvereferences(referencessolver.java:55)     @ com.github.sommeri.less4j.core.compiler.stages.referencessolver.solvenonmixinreferences(referencessolver.java:101)     @ com.github.sommeri.less4j.core.compiler.stages.referencessolver.unsafedosolvereferences(referencessolver.java:85)     @ com.github.sommeri.less4j.core.compiler.stages.referencessolver.access$000(referencessolver.java:35)     @ com.github.sommeri.less4j.core.compiler.stages.referencessolver$1.run(referencessolver.java:59)     @ com.github.sommeri.less4j.core.compiler.scopes.inscopesnapshotrunner.runinlocaldatasnapshot(inscopesnapshotrunner.java:44)     @ com.github.sommeri.less4j.core.compiler.scopes.inscopesnapshotrunner.runinlocaldatasnapshot(inscopesnapshotrunner.java:24)     @ com.github.sommeri.less4j.core.compiler.scopes.inscopesnapshotrunner.runinlocaldatasnapshot(inscopesnapshotrunner.java:15)     @ com.github.sommeri.less4j.core.compiler.stages.referencessolver.dosolvereferences(referencessolver.java:55)     @ com.github.sommeri.less4j.core.compiler.stages.referencessolver.solvenonmixinreferences(referencessolver.java:101)     @ com.github.sommeri.less4j.core.compiler.stages.referencessolver.unsafedosolvereferences(referencessolver.java:85)     @ com.github.sommeri.less4j.core.compiler.stages.referencessolver.access$000(referencessolver.java:35)     @ com.github.sommeri.less4j.core.compiler.stages.referencessolver$1.run(referencessolver.java:59)     @ com.github.sommeri.less4j.core.compiler.scopes.inscopesnapshotrunner.runinlocaldatasnapshot(inscopesnapshotrunner.java:44)     @ com.github.sommeri.less4j.core.compiler.scopes.inscopesnapshotrunner.runinlocaldatasnapshot(inscopesnapshotrunner.java:24)     @ com.github.sommeri.less4j.core.compiler.scopes.inscopesnapshotrunner.runinlocaldatasnapshot(inscopesnapshotrunner.java:15)     @ com.github.sommeri.less4j.core.compiler.stages.referencessolver.dosolvereferences(referencessolver.java:55)     @ com.github.sommeri.less4j.core.compiler.stages.referencessolver.solvenonmixinreferences(referencessolver.java:101)     @ com.github.sommeri.less4j.core.compiler.stages.referencessolver.unsafedosolvereferences(referencessolver.java:85)     @ com.github.sommeri.less4j.core.compiler.stages.referencessolver.access$000(referencessolver.java:35)     @ com.github.sommeri.less4j.core.compiler.stages.referencessolver$1.run(referencessolver.java:59)     @ com.github.sommeri.less4j.core.compiler.scopes.inscopesnapshotrunner.runinlocaldatasnapshot(inscopesnapshotrunner.java:44)     @ com.github.sommeri.less4j.core.compiler.scopes.inscopesnapshotrunner.runinlocaldatasnapshot(inscopesnapshotrunner.java:24)     @ com.github.sommeri.less4j.core.compiler.scopes.inscopesnapshotrunner.runinlocaldatasnapshot(inscopesnapshotrunner.java:15)     @ com.github.sommeri.less4j.core.compiler.stages.referencessolver.dosolvereferences(referencessolver.java:55)     @ com.github.sommeri.less4j.core.compiler.stages.referencessolver.solvenonmixinreferences(referencessolver.java:101)     @ com.github.sommeri.less4j.core.compiler.stages.referencessolver.unsafedosolvereferences(referencessolver.java:85)     @ com.github.sommeri.less4j.core.compiler.stages.referencessolver.access$000(referencessolver.java:35)     @ com.github.sommeri.less4j.core.compiler.stages.referencessolver$1.run(referencessolver.java:59)     @ com.github.sommeri.less4j.core.compiler.scopes.inscopesnapshotrunner.runinlocaldatasnapshot(inscopesnapshotrunner.java:44)     @ com.github.sommeri.less4j.core.compiler.scopes.inscopesnapshotrunner.runinlocaldatasnapshot(inscopesnapshotrunner.java:24)     @ com.github.sommeri.less4j.core.compiler.scopes.inscopesnapshotrunner.runinlocaldatasnapshot(inscopesnapshotrunner.java:15)     @ com.github.sommeri.less4j.core.compiler.stages.referencessolver.dosolvereferences(referencessolver.java:55)     @ com.github.sommeri.less4j.core.compiler.stages.referencessolver.solvereferences(referencessolver.java:50)     @ com.github.sommeri.less4j.core.compiler.lesstocsscompiler.resolvereferences(lesstocsscompiler.java:126)     @ com.github.sommeri.less4j.core.compiler.lesstocsscompiler.compiletocss(lesstocsscompiler.java:47)     @ com.github.sommeri.less4j.core.threadunsafelesscompiler.docompile(threadunsafelesscompiler.java:84)     @ com.github.sommeri.less4j.core.threadunsafelesscompiler.compile(threadunsafelesscompiler.java:71)     @ com.github.sommeri.less4j.core.threadunsafelesscompiler.compile(threadunsafelesscompiler.java:63)     @ de.agilecoders.wicket.less.lesscachemanager.getcss(lesscachemanager.java:93)     @ de.agilecoders.wicket.less.lessresourcestream.getstring(lessresourcestream.java:70)     @ org.apache.wicket.util.resource.abstractstringresourcestream.getinputstream(abstractstringresourcestream.java:172)     @ org.apache.wicket.request.resource.packageresource.newresourceresponse(packageresource.java:303)     @ org.apache.wicket.request.resource.abstractresource.respond(abstractresource.java:498)     @ org.apache.wicket.request.handler.resource.resourcerequesthandler.respond(resourcerequesthandler.java:75)     @ org.apache.wicket.request.handler.resource.resourcereferencerequesthandler.respond(resourcereferencerequesthandler.java:108)     @ org.apache.wicket.request.cycle.requestcycle$handlerexecutor.respond(requestcycle.java:861)     @ org.apache.wicket.request.requesthandlerstack.execute(requesthandlerstack.java:64)     @ org.apache.wicket.request.cycle.requestcycle.execute(requestcycle.java:261)     @ org.apache.wicket.request.cycle.requestcycle.processrequest(requestcycle.java:218)     @ org.apache.wicket.request.cycle.requestcycle.processrequestanddetach(requestcycle.java:289)     @ org.apache.wicket.protocol.http.wicketfilter.processrequestcycle(wicketfilter.java:259)     @ org.apache.wicket.protocol.http.wicketfilter.processrequest(wicketfilter.java:201)     @ org.apache.wicket.protocol.http.wicketfilter.dofilter(wicketfilter.java:282)     @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:241)     @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:208)     @ org.apache.tomcat.websocket.server.wsfilter.dofilter(wsfilter.java:52)     @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:241)     @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:208)     @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:330)     @ org.springframework.security.web.access.exceptiontranslationfilter.dofilter(exceptiontranslationfilter.java:113)     @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:342)     @ org.springframework.security.web.session.sessionmanagementfilter.dofilter(sessionmanagementfilter.java:103)     @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:342)     @ org.springframework.security.web.authentication.anonymousauthenticationfilter.dofilter(anonymousauthenticationfilter.java:113)     @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:342)     @ org.springframework.security.web.servletapi.securitycontextholderawarerequestfilter.dofilter(securitycontextholderawarerequestfilter.java:154)     @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:342)     @ org.springframework.security.web.savedrequest.requestcacheawarefilter.dofilter(requestcacheawarefilter.java:45)     @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:342)     @ org.springframework.security.web.authentication.logout.logoutfilter.dofilter(logoutfilter.java:110)     @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:342)     @ org.springframework.security.web.header.headerwriterfilter.dofilterinternal(headerwriterfilter.java:57)     @ org.springframework.web.filter.onceperrequestfilter.dofilter(onceperrequestfilter.java:108)     @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:342)     @ org.springframework.security.web.context.securitycontextpersistencefilter.dofilter(securitycontextpersistencefilter.java:87)     @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:342)     @ org.springframework.security.web.context.request.async.webasyncmanagerintegrationfilter.dofilterinternal(webasyncmanagerintegrationfilter.java:50)     @ org.springframework.web.filter.onceperrequestfilter.dofilter(onceperrequestfilter.java:108)     @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:342)     @ org.springframework.security.web.filterchainproxy.dofilterinternal(filterchainproxy.java:192)     @ org.springframework.security.web.filterchainproxy.dofilter(filterchainproxy.java:160)     @ org.springframework.web.filter.delegatingfilterproxy.invokedelegate(delegatingfilterproxy.java:344)     @ org.springframework.web.filter.delegatingfilterproxy.dofilter(delegatingfilterproxy.java:261)     @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:241)     @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:208)     @ org.apache.catalina.core.standardwrappervalve.invoke(standardwrappervalve.java:220)     @ org.apache.catalina.core.standardcontextvalve.invoke(standardcontextvalve.java:122)     @ org.apache.catalina.authenticator.authenticatorbase.invoke(authenticatorbase.java:501)     @ org.apache.catalina.core.standardhostvalve.invoke(standardhostvalve.java:170)     @ org.apache.catalina.valves.errorreportvalve.invoke(errorreportvalve.java:98)     @ org.apache.catalina.valves.accesslogvalve.invoke(accesslogvalve.java:950)     @ org.apache.catalina.core.standardenginevalve.invoke(standardenginevalve.java:116)     @ org.apache.catalina.connector.coyoteadapter.service(coyoteadapter.java:408)     @ org.apache.coyote.http11.abstracthttp11processor.process(abstracthttp11processor.java:1040)     @ org.apache.coyote.abstractprotocol$abstractconnectionhandler.process(abstractprotocol.java:607)     @ org.apache.tomcat.util.net.jioendpoint$socketprocessor.run(jioendpoint.java:315)     @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1110)     @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:603)     @ java.lang.thread.run(thread.java:722) 

i tried commandline version of less4j, have same result. can point out why happening?

thanks in advance.

the author of less4j acknowledged issue , resolved in 1.4.1. see https://github.com/sommeri/less4j/issues/196 more details.


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -