Getting stackoverflow in large multi-module repo:
Caused by: java.lang.StackOverflowError at org.eclipse.jgit.internal.storage.file.PackFile.readFully(PackFile.java:614) at org.eclipse.jgit.internal.storage.file.PackFile.load(PackFile.java:797) at org.eclipse.jgit.internal.storage.file.PackFile.get(PackFile.java:284) at org.eclipse.jgit.internal.storage.file.ObjectDirectory.openPackedObject(ObjectDirectory.java:455) at org.eclipse.jgit.internal.storage.file.ObjectDirectory.openPackedFromSelfOrAlternate(ObjectDirectory.java:413) at org.eclipse.jgit.internal.storage.file.ObjectDirectory.openObject(ObjectDirectory.java:404) at org.eclipse.jgit.internal.storage.file.WindowCursor.open(WindowCursor.java:132) at org.eclipse.jgit.revwalk.RevWalk.getCachedBytes(RevWalk.java:961) at org.eclipse.jgit.revwalk.RevCommit.parseHeaders(RevCommit.java:126) at org.eclipse.jgit.revwalk.RevWalk.parseHeaders(RevWalk.java:1074) at git.semver.plugin.scm.GitProvider$getCommit$1.invokeSuspend(GitProvider.kt:117) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlin.sequences.SequenceBuilderIterator.hasNext(SequenceBuilder.kt:140) at kotlin.sequences.TransformingSequence$iterator$1.hasNext(Sequences.kt:214) at kotlin.sequences.FilteringSequence$iterator$1.calcNext(Sequences.kt:169) at kotlin.sequences.FilteringSequence$iterator$1.hasNext(Sequences.kt:194) at kotlin.sequences.SequencesKt___SequencesKt.toCollection(_Sequences.kt:752) at kotlin.sequences.SequencesKt___SequencesKt.toMutableList(_Sequences.kt:782) at kotlin.sequences.SequencesKt___SequencesKt.toList(_Sequences.kt:773) at git.semver.plugin.semver.VersionFinder.getSemVersion(VersionFinder.kt:49) at git.semver.plugin.semver.VersionFinder.access$getSemVersion(VersionFinder.kt:7) at git.semver.plugin.semver.VersionFinder$getSemVersion$parentSemVersions$1.invoke(VersionFinder.kt:49) at git.semver.plugin.semver.VersionFinder$getSemVersion$parentSemVersions$1.invoke(VersionFinder.kt:7) at kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:210) at kotlin.sequences.FilteringSequence$iterator$1.calcNext(Sequences.kt:170) at kotlin.sequences.FilteringSequence$iterator$1.hasNext(Sequences.kt:194) at kotlin.sequences.SequencesKt___SequencesKt.toCollection(_Sequences.kt:752) at kotlin.sequences.SequencesKt___SequencesKt.toMutableList(_Sequences.kt:782) at kotlin.sequences.SequencesKt___SequencesKt.toList(_Sequences.kt:773) at git.semver.plugin.semver.VersionFinder.getSemVersion(VersionFinder.kt:49) at git.semver.plugin.semver.VersionFinder.access$getSemVersion(VersionFinder.kt:7) at git.semver.plugin.semver.VersionFinder$getSemVersion$parentSemVersions$1.invoke(VersionFinder.kt:49) at git.semver.plugin.semver.VersionFinder$getSemVersion$parentSemVersions$1.invoke(VersionFinder.kt:7) at kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:210) at kotlin.sequences.FilteringSequence$iterator$1.calcNext(Sequences.kt:170) at kotlin.sequences.FilteringSequence$iterator$1.hasNext(Sequences.kt:194) at kotlin.sequences.SequencesKt___SequencesKt.toCollection(_Sequences.kt:752) at kotlin.sequences.SequencesKt___SequencesKt.toMutableList(_Sequences.kt:782) at kotlin.sequences.SequencesKt___SequencesKt.toList(_Sequences.kt:773)
The setup:
build.gradle:
`plugins {
id 'java-platform'
id "org.sonarqube" version "3.1.1"
id "com.diffplug.spotless" version "5.11.0"
id "maven-publish"
id "com.jfrog.artifactory"
id "com.github.jmongard.git-semver-plugin" version "0.3.0"
}
apply from: "$rootDir/sonarqube.gradle"
javaPlatform {
allowDependencies()
}
dependencies {
api platform('com.amazonaws:aws-java-sdk-bom:1.11.534')
api platform('org.springframework:spring-framework-bom:3.2.17.RELEASE')
constraints {
api projects.hscsGuidelines
api projects.hscsAcres
api projects.hscsAncillary
api projects.hscsCommon
api projects.hscsJournalMedlineMatch
api projects.hscsMl
api projects.hscsBooks
api projects.hscsBooksandjournals
api projects.hscsEdms
api projects.hscsEsMt
api projects.hscsFirstconsult
api projects.hscsPg
api projects.hscsNice
api projects.hscsPeGoldStandard
api projects.hscsPgec
api projects.hscsPgsy
api projects.hscsWorkflowManager
api projects.hscsJournals
api projects.hscsEwjournals
api projects.hscsCt
api projects.hscsDt
api projects.hscsEpg
api projects.hscsMosbyskills
api projects.hscsHas
api projects.hscsAuDmStatic
api projects.hscsEmc
api projects.hscsBnf
api projects.hscsGenericIngestion
api projects.hscsAuDm
api projects.hscsYearBookMatch
api projects.hscsEmrIngestionManager
api projects.hscsCalculators
api projects.hscsEabstract
api projects.hscsFrDm
api projects.hscsErrataMatch
api projects.hscsEwbooks
api projects.hscsIngestionManager
api projects.hscsPgBreak
api projects.hscsDcos
api projects.hscsEw
api 'cglib:cglib:2.2.2'
api 'com.github.jsonld-java:jsonld-java:0.13.0'
api 'com.github.stefanbirkner:fake-sftp-server-rule:2.0.1'
api 'com.thoughtworks.xstream:xstream:1.4.2'
api 'commons-beanutils:commons-beanutils:1.8.0'
api 'commons-io:commons-io:2.6'
api 'commons-lang:commons-lang:2.6'
api 'commons-validator:commons-validator:1.4.0'
api 'dom4j:dom4j:1.6.1'
api 'net.sourceforge.collections:collections-generic:4.01'
api 'org.apache.commons:commons-collections4:4.1'
api 'commons-collections:commons-collections:3.2.2'
api 'org.apache.commons:commons-compress:1.9'
api 'org.apache.commons:commons-csv:1.2'
api 'org.apache.commons:commons-lang3:3.4'
api 'org.apache.hadoop:hadoop-core:1.0.3-mapr-4.0.2'
api 'org.apache.lucene:lucene-analyzers:3.2.0'
api 'org.apache.poi:poi-ooxml:3.9'
api 'org.slf4j:slf4j-api:1.7.30'
api 'org.codehaus.castor:castor-xml:1.4.1'
// api 'org.codehaus.jackson:jackson-mapper-asl:1.9.13'
api 'org.easymock:easymock:3.1'
api 'org.hamcrest:hamcrest-all:1.3'
api 'org.hsqldb:hsqldb-j5:2.2.4'
api 'org.hibernate:hibernate-core:4.1.4.Final'
api 'org.javassist:javassist:3.27.0-GA'
api 'org.jdom:jdom:1.1'
api 'org.jdom:jdom2:2.0.6'
api 'org.jsoup:jsoup:1.7.3'
api 'org.mockftpserver:MockFtpServer:2.3'
api 'org.powermock:powermock-api-mockito:1.4.9'
api 'org.powermock:powermock-module-junit4:1.4.9'
api 'org.springframework.ws:spring-ws-core:2.3.0.RELEASE'
api 'org.springframework.ws:spring-ws-test:2.3.0.RELEASE'
api 'xmlunit:xmlunit:1.3'
runtime 'com.oracle.database.jdbc:ojdbc8:12.2.0.1'
runtime 'commons-dbcp:commons-dbcp:1.4'
runtime 'commons-httpclient:commons-httpclient:3.1'
runtime 'jaxen:jaxen:1.1.6'
runtime 'org.apache.httpcomponents:httpclient:4.5.9'
runtime 'org.apache.ws.commons.axiom:axiom-api:1.2.19'
runtime 'org.apache.ws.commons.axiom:axiom-impl:1.2.19'
runtime 'org.aspectj:aspectjweaver:1.6.12'
}
}
// Delete sample/stale hooks
delete "$rootDir/.git/hooks"
// If non-CI build, copy fresh hooks in
if (!project.hasProperty("CI")) {
copy {
from "$rootDir/.hooks"
into "$rootDir/.git/hooks"
eachFile { hook ->
logger.info("Copying ${hook.name} to $rootDir/.git/hooks")
}
}
}
defaultTasks 'spotlessApply', 'build'
spotless {
// optional: limit format enforcement to just the files changed by this feature branch
ratchetFrom 'origin/master'
format 'misc', {
target '*.md', '.gitignore', "*.gradle"
trimTrailingWhitespace()
indentWithSpaces()
endWithNewline()
}
java {
target '**/*.java'
targetExclude 'buildSrc/**', '**/src/generated/java/** q'
googleJavaFormat()
removeUnusedImports()
}
groovy {
target "*.groovy", "Jenkinsfile"
greclipse()
}
}
publishing {
publications {
maven(MavenPublication) {
from components.javaPlatform
}
}
}
artifactory {
contextUrl =
publish {
repository {
repoKey = 'maven-clinicalkey-local'
username = "${artifactory_user}"
password = "${artifactory_password}"
}
defaults {
publications('maven')
publishIvy = false
}
}
}
allprojects {
Need this to publish the correct version
version = semver.version
println "${it.name} --> $version"
releaseVersion.dependsOn build
artifactoryPublish.dependsOn releaseVersion
}
`
settings.gradle:
`
/*
- This file was generated by the Gradle 'init' task.
*/
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
rootProject.name = 'hscs-ingestion'
include(':hscs-guidelines')
include(':hscs-acres')
include(':hscs-ancillary')
include(':hscs-common')
include(':hscs-journalMedlineMatch')
include(':hscs-ml')
include(':hscs-books')
include(':hscs-booksandjournals')
include(':hscs-edms')
include(':hscs-es-mt')
include(':hscs-firstconsult')
include(':hscs-pg')
include(':hscs-nice')
include(':hscs-peGoldStandard')
include(':hscs-pgec')
include(':hscs-pgsy')
include(':hscs-workflowManager')
include(':hscs-journals')
include(':hscs-ewjournals')
include(':hscs-ct')
include(':hscs-dt')
include(':hscs-epg')
include(':hscs-mosbyskills')
include(':hscs-has')
include(':hscs-au-dm-static')
include(':hscs-emc')
include(':hscs-bnf')
include(':hscs-genericIngestion')
include(':hscs-au-dm')
include(':hscs-yearBookMatch')
include(':hscs-emrIngestionManager')
include(':hscs-calculators')
include(':hscs-eabstract')
include(':hscs-fr-dm')
include(':hscs-errataMatch')
include(':hscs-ewbooks')
include(':hscs-ingestionManager')
include(':hscs-pgBreak')
include(':hscs-dcos')
include(':hscs-ew')
dependencyResolutionManagement {
repositories {
mavenLocal()
maven {
url = uri()
credentials {
username = "${artifactory_user}"
password = "${artifactory_password}"
}
}
}
}
`