Ok, I hate to even post this here because, at least on the surface, it
doesn't actually appear to be a gradle-related problem, except that when I
do the same build with the same dependency list (versions and everything)
using maven ant tasks, it works, while the gradle-built war does not.  This
is going to be a bit long between the stack trace and my build.gradle file
but I am completely stumped, and I've been trying to figure this out for 3
days now.  Any advice, pointers, or links to solutions or pieces of
solutions are all welcome.

Running jdk1.5 r22, tomcat 6.0.29, and gradle 0.9.1.

So starting with the stack trace of the exception I get in Tomcat when I try
to access my application (this is a runtime exception, it only appears when
I try to hit the URL of my project):


java.lang.ClassCastException: org.apache.taglibs.standard.tlv.JstlCoreTLV
cannot be cast to javax.servlet.jsp.tagext.TagLibraryValidator
        at
org.apache.jasper.compiler.TagLibraryInfoImpl.createValidator(TagLibraryInfoImpl.java:667)
        at
org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.java:248)
        at
org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:163)
        at 
org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:386)
        at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:449)
        at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1396)
        at org.apache.jasper.compiler.Parser.parse(Parser.java:130)
        at
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:255)
        at
org.apache.jasper.compiler.ParserController.parse(ParserController.java:103)
        at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:185)
        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:347)
        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:327)
        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:314)
        at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:592)
        at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
        at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:65)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)
        at
org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
        at
org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
        at
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
        at
org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
        at
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
        at
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
        at
org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:278)
        at
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
        at
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
        at
org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)
        at
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
        at
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
        at
org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:175)
        at
org.springframework.security.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:99)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
        at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Unknown Source)



Relevant portions of my build.gradle:

subprojects {
        apply plugin: 'java'
        apply plugin: 'eclipse'
        apply plugin: 'maven'
        sourceCompatibility = 1.5

        sourceSets {
                main {
                        java {
                                srcDirs = ['src']  // replaces 'src/main/java' 
with 'src'
                        }
                }
        }

        def localMavenRepo = new
File('C:/Users/BrianTrezise/.m2/repository').toURL().toString()

        repositories {
                mavenCentral()
                mavenRepo(urls: 'http://download.java.net/maven/glassfish')
                mavenRepo(urls:
'https://repository.jboss.org/nexus/content/groups/public/')
                mavenRepo urls: localMavenRepo
        }
}


project(':app:DPU2') {
        apply plugin: 'war'
        apply plugin: 'tomcat'
        version = 2.0

        sourceSets {
                main {
                        java {
                                srcDirs = ['src/web']  // replaces 
'src/main/java' with 'src/web'
                        }
                }
        }
        sourceSets.main.classesDir = new File('WebRoot/WEB-INF/classes')        
        sourceSets.main.webapp = new File('WebRoot')
        webAppDirName = 'WebRoot'

        war {
                println 'Copying DPU/' + datasource + '.xml into
WebRoot/WEB-INF/dpu-datasource.xml'
                copy {
                        from('WebRoot/WEB-INF/datasource/')
                        into('WebRoot/WEB-INF/')
                        include(datasource + '.xml')
                        rename(datasource + '.xml', 'dpu-datasource.xml')
                }
                exclude 'WEB-INF/datasource/*'
                exclude 'WEB-INF/lib/*'
                baseName = 'dpu2'
        }

        dependencies {
                compile project(':api:util')
                compile project(':api:schema')
                compile project(':api:core')
                compile project(':api:intellispec')

                providedCompile 'javax.servlet:servlet-api:2...@jar'
                providedCompile 'javax.servlet:jsp-api:2...@jar'
                providedCompile 'mysql:mysql-connector-java:5.1...@jar'

                compile 'org.apache.geronimo.specs:geronimo-jta_1.1_spec:1.1'
                compile 'org.hibernate:hibernate-annotations:3.4.0.GA'
                compile 'com.sun.jmx:jmxri:1.2.1'
                compile 'org.springframework:spring:2.5.6.SEC01'
                compile 'org.slf4j:slf4j-log4j12:1.5.6'
                compile 
'org.springframework.security:spring-security-core:2.0.5.RELEASE'
                compile
'org.springframework.security:spring-security-taglibs:2.0.5.RELEASE'
                compile 'org.springframework:spring-webmvc:2.5.6'
                compile 'opensymphony:sitemesh:2.4.2'
                compile 'javax.servlet.jsp.jstl:jstl-api:1.2'
                compile 'taglibs:standard:1.1.2'
                compile 
'org.springframework.ldap:spring-ldap-core:1.3.0.RELEASE'
                compile 'commons-lang:commons-lang:2.4'
                compile 'commons-fileupload:commons-fileupload:1.2.1'
                compile 'jaxen:jaxen:1....@jar'
                compile 'xom:xom:1...@jar'
                compile 'xml-apis:xml-apis:1.3.02'
                compile 'net.sf.spring-json:spring-json:1.2'
                compile 'commons-dbcp:commons-dbcp:1.3'

                //runtime
'org.springframework.security:spring-security-cas-client:3.0.3.RELEASE'
        }
}

project(':api:util') {
        version = 1.0
        dependencies {
                compile 'commons-collections:commons-collections:2.1.1'
                compile 'log4j:log4j:1.2.16'
                compile('javax.mail:mail:1.4.3') {
                        transitive = true
                }
                compile 'org.apache.poi:poi:3.7'
                compile 'org.apache.poi:poi-ooxml:3.7'
                compile 'commons-digester:commons-digester:2.0'
                compile 'org.jdom:jdom:1.1'
                compile 'commons-net:commons-net:2.0'
                compile 'commons-cli:commons-cli:1.1'
                compile 'org.hibernate:hibernate:3.2.7.ga'
                compile 'commons-vfs:commons-vfs:1.0'
                compile 'commons-io:commons-io:1.4'
                compile  'junit:junit:4.7'
        }
}

Again, I'm really not sure about posting this here, but gradle is the only
common denominator that I can see.  If you need more information please let
me know.

~Brian
-- 
View this message in context: 
http://gradle.1045684.n5.nabble.com/ant-gradle-build-inconsistencies-tp3326100p3326100.html
Sent from the gradle-user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to