Home Exception while creating war in Grails 3.2.7
Reply: 0

Exception while creating war in Grails 3.2.7

Happy Mathew
1#
Happy Mathew Published in 2018-01-04 14:04:16Z

I'm getting the following error when I try to build a war in Grails. Any thoughts on what could be the reason for this issue?

Processing File 96 of 194 - datatable/jquery.dataTables.min.js    
Processing File 97 of 194 - jquery/easyNotify.js    
Processing File 98 of 194 - jquery/jquery-3.1.0.min.js    
Processing File 99 of 194 - jquery/jquery-mask.js    
Error Processing GString Template Engine groovy.lang.MissingPropertyException: No such property: grails for class: groovy.lang.Binding    
Error Processing GString Template Engine    
groovy.lang.MissingPropertyException: No such property: grails for class: groovy.lang.Binding
    at groovy.lang.Binding.getVariable(Binding.java:58)
    at groovy.lang.Binding.getProperty(Binding.java:105)
    at org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:172)
    at groovy.lang.Closure.getPropertyTryThese(Closure.java:312)
    at groovy.lang.Closure.getPropertyDelegateFirst(Closure.java:302)
    at groovy.lang.Closure.getProperty(Closure.java:287)
    at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:50)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:307)
    at groovy.tmp.templates.GStringTemplateScript1$_getTemplate_closure1.doCall(GStringTemplateScript1.groovy:2)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1024)
    at groovy.lang.Closure.call(Closure.java:414)
    at groovy.lang.Closure$WritableClosure.writeTo(Closure.java:844)
    at groovy.lang.Closure$WritableClosure.toString(Closure.java:970)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:210)
    at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.call(PogoMetaMethodSite.java:71)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
    at asset.pipeline.DirectiveProcessor.directiveArgumentsFromGString(DirectiveProcessor.groovy:183)
    at asset.pipeline.DirectiveProcessor.findDirectives(DirectiveProcessor.groovy:167)
    at asset.pipeline.DirectiveProcessor.getDependencyTree(DirectiveProcessor.groovy:141)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:210)
    at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:59)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:166)
    at asset.pipeline.DirectiveProcessor.requireFileDirective(DirectiveProcessor.groovy:273)
    at asset.pipeline.DirectiveProcessor$requireFileDirective$2.callCurrent(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:182)
    at asset.pipeline.DirectiveProcessor.requireFileDirective(DirectiveProcessor.groovy:278)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1215)
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrentN(ScriptBytecodeAdapter.java:82)
    at asset.pipeline.DirectiveProcessor.callDirective(DirectiveProcessor.groovy:192)
    at asset.pipeline.DirectiveProcessor.findDirectives(DirectiveProcessor.groovy:171)
    at asset.pipeline.DirectiveProcessor.getDependencyTree(DirectiveProcessor.groovy:141)
    at asset.pipeline.DirectiveProcessor.compile(DirectiveProcessor.groovy:65)
    at asset.pipeline.DirectiveProcessor$compile.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
    at asset.pipeline.AssetCompiler$_compile_closure3.doCall(AssetCompiler.groovy:159)
    at sun.reflect.GeneratedMethodAccessor113.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1024)
    at groovy.lang.Closure.call(Closure.java:414)
    at groovy.lang.Closure.call(Closure.java:408)
    at groovy.lang.Closure.run(Closure.java:495)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:748)    
Unable to Locate Asset: /e    
Processing File 100 of 194 - jquery/jquery-ui.js
Processing File 101 of 194 - jquery/jquery-validation.js
Processing File 102 of 194 - jquery/jquery-validationMethods.js

After searching for hours I understand its due to the asset-pipline. So I tried changing the asset-pipline version, classpath and url in build.gradle. But, still no escape from this.

I noticed that, this mostely happens while processing the JS and CSS files.

Below given is my build.gradle.

build.gradle

buildscript {
    repositories {
        mavenLocal()
        maven { url "https://repo.grails.org/grails/core" }
        maven { url 'http://repo.grails.org/grails/repo' }
    }
    dependencies {
        classpath "org.grails:grails-gradle-plugin:$grailsVersion"
        classpath 'com.bertramlabs.plugins:asset-pipeline-gradle:2.14.7'
        classpath "org.grails.plugins:hibernate5:${gormVersion-".RELEASE"}"
    }
}

version "0.1"
group "***"

apply plugin:"eclipse"
apply plugin:"idea"
apply plugin:"war"
apply plugin:"org.grails.grails-web"
apply plugin:"org.grails.grails-gsp"
//apply plugin: "com.bertramlabs.plugins.asset-pipeline"
apply plugin: "com.bertramlabs.asset-pipeline"

repositories {
    mavenLocal()
    maven { url "https://repo.grails.org/grails/core" }
    maven { url 'http://repo.grails.org/grails/repo' }
}

dependencies {
    compile "org.springframework.boot:spring-boot-starter-logging"
    compile "org.springframework.boot:spring-boot-autoconfigure"
    compile "org.grails:grails-core"
    compile "org.springframework.boot:spring-boot-starter-actuator"
    compile "org.springframework.boot:spring-boot-starter-tomcat"
    compile "org.grails:grails-dependencies"
    compile "org.grails:grails-web-boot"
    compile "org.grails.plugins:cache"
    compile "org.grails.plugins:scaffolding"
    compile "org.grails.plugins:hibernate5"
    compile "org.hibernate:hibernate-core:5.1.3.Final"
    compile "org.hibernate:hibernate-ehcache:5.1.3.Final"
    console "org.grails:grails-console"
    profile "org.grails.profiles:web"

//    runtime "com.bertramlabs.plugins:asset-pipeline-grails:2.11.6"
//    runtime "gradle.plugin.com.bertramlabs.plugins:asset-pipeline-gradle:2.4.2"
    runtime 'com.bertramlabs.plugins:asset-pipeline-grails:2.14.7'

    runtime "com.h2database:h2"
    testCompile "org.grails:grails-plugin-testing"
    testCompile "org.grails.plugins:geb"
    testRuntime "org.seleniumhq.selenium:selenium-htmlunit-driver:2.47.1"
    testRuntime "net.sourceforge.htmlunit:htmlunit:2.18"
    // ---------------------Custom Dependencies-----------------------------

    compile "org.grails.plugins:spring-security-core:3.1.1"
    compile "org.grails.plugins:spring-security-ui:3.0.0.M2"
    compile "org.grails.plugins:jasypt-encryption:2.0.2"
    compile "commons-io:commons-io:2.5"
    runtime "mysql:mysql-connector-java:5.1.29"
    runtime "org.grails.plugins:ajax-tags:1.0.0.RC1"
    compile "commons-fileupload:commons-fileupload:1.3.3"
    compile 'org.grails.plugins:mail:2.0.0.RC6'
    compile 'org.grails:grails-datastore-rest-client'
    compile 'org.grails.plugins:postgresql-extensions:5.2.0'
    runtime 'org.postgresql:postgresql:9.4.1208.jre7'
    runtime "org.postgresql:postgresql:9.4.1212"
    runtime "org.postgresql:postgresql:9.3-1100-jdbc41"
}

bootRun {
    jvmArgs('-Dspring.output.ansi.enabled=always')
    addResources = true
}


assets {
    minifyJs = true
    minifyCss = true
}

Any suggestion would be much appreciated. Thank you in advance!

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.359633 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO