How to track down why my gradle build is failing?

gradle
circle.yml

#1

I have a multi-module gradle Spring Boot build. I have no issues running this locally on an OSX machine running Jenkins.
When I try to run here on Corcle-CI, I keep getting a build falure running my unit tests stating my embedded H2 database is not available. THis error occurs roughly halfway through the 40+ modules this build has, and each of the modules has a small H2 database it starts for testing.

Here is my circle.yml

version: 2
jobs:
  build:
    docker:
      # specify the version you desire here
      - image: circleci/openjdk:8-jdk

      # Specify service dependencies here if necessary
      # CircleCI maintains a library of pre-built images
      # documented at https://circleci.com/docs/2.0/circleci-images/
      # - image: circleci/postgres:9.4

    working_directory: ~/repo

    environment:
      # Customize the JVM maximum heap limit
      _JAVA_OPTIONS: "-Xmx1500m"
#      JAVA_OPTIONS: "-Xmx1500m -XX:ParallelGCThreads=2 -XX:ConcGCThreads=2 -XX:ParallelGCThreads=2 -Djava.util.concurrent.ForkJoinPool.common.parallelism=2"

      # Turn off Gradle Daemon
      GRADLE_OPTS: -Dorg.gradle.daemon=false -Dorg.gradle.parallel=false -Dorg.gradle.configureondemand=false
      TERM: dumb

    parallelism: 1
#    resource_class: large

    steps:
      - checkout

      # Download and cache dependencies
      - restore_cache:
          keys:
          - v1-dependencies-{{ checksum "build.gradle" }}
          # fallback to using the latest cache if no exact match is found
          - v1-dependencies-

      - run: ./gradlew dependencies --no-daemon --max-workers 1

      - save_cache:
          paths:
            - ~/.m2
          key: v1-dependencies-{{ checksum "build.gradle" }}

      # run chapter :check and reports!
      - run: ./gradlew check --no-daemon --stacktrace --max-workers 1

Can someone help me understand how to dig deeper into this issue, as there has to be more than this:

:chapter16:chapter16.00-calendar:testClasses
:chapter16:chapter16.00-calendar:testPicked up _JAVA_OPTIONS: -Xmx1500m


com.packtpub.springsecurity.core.userdetails.CalendarUserDetailsServiceTests > validateUser_User FAILED
    org.springframework.dao.InvalidDataAccessResourceUsageException: could not prepare statement; SQL [select calendarus0_.id as id1_0_, calendarus0_.email as email2_0_, calendarus0_.first_name as first_na3_0_, calendarus0_.last_name as last_nam4_0_, calendarus0_.password as password5_0_ from calendar_users calendarus0_ where calendarus0_.email=?]; nested exception is org.hibernate.exception.SQLGrammarException: could not prepare statement
        at org.springframework.orm.jpa.vendor.HibernateJpaDialect.convertHibernateAccessException(HibernateJpaDialect.java:261)
        at org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:244)
        at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:488)
        at org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:59)
        at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:213)
        at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:147)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
        at org.springframework.data.jpa.repository.support.CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke(CrudMethodMetadataPostProcessor.java:133)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
        at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
        at org.springframework.data.repository.core.support.SurroundingTransactionDetectorMethodInterceptor.invoke(SurroundingTransactionDetectorMethodInterceptor.java:57)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
        at com.sun.proxy.$Proxy134.findByEmail(Unknown Source)
        at com.packtpub.springsecurity.dataaccess.JpaCalendarUserDao.findUserByEmail(JpaCalendarUserDao.java:67)
        at com.packtpub.springsecurity.dataaccess.JpaCalendarUserDao$$FastClassBySpringCGLIB$$de5d820c.invoke(<generated>)
        at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:738)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
        at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:136)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
        at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
        at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:282)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
        at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:673)
        at com.packtpub.springsecurity.dataaccess.JpaCalendarUserDao$$EnhancerBySpringCGLIB$$d35f432a.findUserByEmail(<generated>)
        at com.packtpub.springsecurity.core.userdetails.CalendarUserDetailsService.loadUserByUsername(CalendarUserDetailsService.java:42)
        at com.packtpub.springsecurity.core.userdetails.CalendarUserDetailsServiceTests.validateUser_User(CalendarUserDetailsServiceTests.java:24)

        Caused by:
        org.hibernate.exception.SQLGrammarException: could not prepare statement
            at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:106)
            at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)
            at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:109)
            at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$StatementPreparationTemplate.prepareStatement(StatementPreparerImpl.java:182)
            at org.hibernate.engine.jdbc.internal.StatementPreparerImpl.prepareQueryStatement(StatementPreparerImpl.java:148)
            at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1929)
            at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1898)
            at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1876)
            at org.hibernate.loader.Loader.doQuery(Loader.java:919)
            at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:336)
            at org.hibernate.loader.Loader.doList(Loader.java:2617)
            at org.hibernate.loader.Loader.doList(Loader.java:2600)
            at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2429)
            at org.hibernate.loader.Loader.list(Loader.java:2424)
            at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:501)
            at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:371)
            at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:216)
            at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1326)
            at org.hibernate.internal.QueryImpl.list(QueryImpl.java:87)
            at org.hibernate.jpa.internal.QueryImpl.list(QueryImpl.java:606)
            at org.hibernate.jpa.internal.QueryImpl.getSingleResult(QueryImpl.java:529)
            at org.hibernate.jpa.criteria.compile.CriteriaQueryTypeQueryAdapter.getSingleResult(CriteriaQueryTypeQueryAdapter.java:54)
            at org.springframework.data.jpa.repository.query.JpaQueryExecution$SingleEntityExecution.doExecute(JpaQueryExecution.java:206)
            at org.springframework.data.jpa.repository.query.JpaQueryExecution.execute(JpaQueryExecution.java:85)
            at org.springframework.data.jpa.repository.query.AbstractJpaQuery.doExecute(AbstractJpaQuery.java:116)
            at org.springframework.data.jpa.repository.query.AbstractJpaQuery.execute(AbstractJpaQuery.java:106)
            at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.doInvoke(RepositoryFactorySupport.java:483)
            at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:461)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
            at org.springframework.data.projection.DefaultMethodInvokingMethodInterceptor.invoke(DefaultMethodInvokingMethodInterceptor.java:56)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
            at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
            at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:282)
            at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
            at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:136)
            ... 24 more

            Caused by:
            org.h2.jdbc.JdbcSQLException: Table "CALENDAR_USERS" not found; SQL statement:
            select calendarus0_.id as id1_0_, calendarus0_.email as email2_0_, calendarus0_.first_name as first_na3_0_, calendarus0_.last_name as last_nam4_0_, calendarus0_.password as password5_0_ from calendar_users calendarus0_ where calendarus0_.email=? [42102-196]
                at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
                at org.h2.message.DbException.get(DbException.java:179)
                at org.h2.message.DbException.get(DbException.java:155)
                at org.h2.command.Parser.readTableOrView(Parser.java:5552)
                at org.h2.command.Parser.readTableFilter(Parser.java:1266)
                at org.h2.command.Parser.parseSelectSimpleFromPart(Parser.java:1946)
                at org.h2.command.Parser.parseSelectSimple(Parser.java:2095)
                at org.h2.command.Parser.parseSelectSub(Parser.java:1940)
                at org.h2.command.Parser.parseSelectUnion(Parser.java:1755)
                at org.h2.command.Parser.parseSelect(Parser.java:1743)
                at org.h2.command.Parser.parsePrepared(Parser.java:449)
                at org.h2.command.Parser.parse(Parser.java:321)
                at org.h2.command.Parser.parse(Parser.java:293)
                at org.h2.command.Parser.prepareCommand(Parser.java:258)
                at org.h2.engine.Session.prepareLocal(Session.java:578)
                at org.h2.engine.Session.prepareCommand(Session.java:519)
                at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1204)
                at org.h2.jdbc.JdbcPreparedStatement.<init>(JdbcPreparedStatement.java:73)
                at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:288)
                at sun.reflect.GeneratedMethodAccessor96.invoke(Unknown Source)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:498)
                at org.apache.tomcat.jdbc.pool.ProxyConnection.invoke(ProxyConnection.java:126)
                at org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:108)
                at org.apache.tomcat.jdbc.pool.interceptor.AbstractCreateStatementInterceptor.invoke(AbstractCreateStatementInterceptor.java:75)
                at org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:108)
                at org.apache.tomcat.jdbc.pool.DisposableConnectionFacade.invoke(DisposableConnectionFacade.java:81)
                at com.sun.proxy.$Proxy102.prepareStatement(Unknown Source)
                at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$5.doPrepare(StatementPreparerImpl.java:146)
                at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$StatementPreparationTemplate.prepareStatement(StatementPreparerImpl.java:172)
                ... 56 more

Thanks in advance for any suggestions.


#2