OHDSI Home | Forums | Wiki | Github

Issue compiling circe-be repository

Hi I’m new to OHDSI, and I’m having issues compiling the circe-be repository

repo: https://github.com/OHDSI/circe-be
master branch / tag: v1.9.5

$ mvn --version
Apache Maven 3.8.5 (3599d3414f046de2324203b78ddcf9b5e4388aa0)
Maven home: /usr/local/Cellar/maven/3.8.5/libexec
Java version: 18.0.1, vendor: Homebrew, runtime: /usr/local/Cellar/openjdk/18.0.1/libexec/openjdk.jdk/Contents/Home
Default locale: en_US, platform encoding: UTF-8
OS name: “mac os x”, version: “12.5”, arch: “x86_64”, family: “mac”

Running mvn compile gave me this error

$ mvn clean compile

[INFO] Scanning for projects…

[INFO]

[INFO] --------------------------< org.ohdsi:circe >---------------------------

[INFO] Building circe 1.9.5-SNAPSHOT

[INFO] --------------------------------[ jar ]---------------------------------

Downloading from central: https]://repo.maven.apache.org/maven2/org/ohdsi/standardized-analysis-utils/1.3.0/standardized-analysis-utils-1.3.0.pom

Downloading from central: https]://repo.maven.apache.org/maven2/org/ohdsi/sql/SqlRender/1.6.8/SqlRender-1.6.8.pom

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 1.820 s

[INFO] Finished at: 2022-08-17T14:44:19-07:00

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal on project circe: Could not resolve dependencies for project org.ohdsi:circe:jar:1.9.5-SNAPSHOT: Failed to collect dependencies at org.ohdsi:standardized-analysis-utils:jar:1.3.0: Failed to read artifact descriptor for org.ohdsi:standardized-analysis-utils:jar:1.3.0: Could not transfer artifact org.ohdsi:standardized-analysis-utils:pom:1.3.0 from/to maven-default-http-blocker (http]://0.0.0.0/): Blocked mirror for repositories: [ohdsi (http://repo.ohdsi.org:8085/nexus/content/repositories/releases, default, releases+snapshots), ohdsi.thirdparty (http]://repo.ohdsi.org:8085/nexus/content/repositories/thirdparty, default, releases+snapshots), ohdsi.snapshots (http]://repo.ohdsi.org:8085/nexus/content/repositories/snapshots, default, snapshots)] → [Help 1]

From what I understand mvn requires ‘https’ for the repository url for security reasons. Anyone else have this issue? Any insight is appreciated.

Current versions of maven have a default http blocker for downloading from insecure repositories. You can either configure a specific mirror exception for the ohdsi repository or in the main maven settings remove the default blocker mirror which looks like this:

<mirror>
  <id>maven-default-http-blocker</id>
  <mirrorOf>external:http:*</mirrorOf>
  <name>Pseudo repository to mirror external repositories initially using HTTP.</name>
  <url>http://0.0.0.0/</url>
  <blocked>true</blocked>
</mirror>

Either solution should allow you to build the library.

Thanks for the reply. I was able to get past the error using the mirror trick.

However I got errors from the test suite while trying to build the project

Results :

Tests in error:
CohortGeneration_5_2_0_Test.org.ohdsi.circe.cohortdefinition.CohortGeneration_5_2_0_Test » IllegalState
WindowCriteria_5_0_0_Test.org.ohdsi.circe.cohortdefinition.builders.WindowCriteria_5_0_0_Test » IllegalState
CorelatedCriteria_5_0_0_Test.org.ohdsi.circe.cohortdefinition.builders.CorelatedCriteria_5_0_0_Test » IllegalState

In my case it looks like there’s some failure setting up the embedded postgres server

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.016 sec <<< FAILURE! - in org.ohdsi.circe.cohortdefinition.CohortGeneration_5_0_0_Test
org.ohdsi.circe.cohortdefinition.CohortGeneration_5_0_0_Test Time elapsed: 0.016 sec <<< ERROR!
java.lang.IllegalStateException: Process [/var/folders/lb/hlcdhxzd5bx2pctsmrs5p6dw0000gq/T/embedded-pg/PG-73dc0043fe7bdb624d5e8726bc457b7e/bin/initdb, -A, trust, -U, postgres, -D, /var/folders/lb/hlcdhxzd5bx2pctsmrs5p6dw0000gq/T/epg14979164187153190101, -E, UTF-8] failed

at com.opentable.db.postgres.embedded.EmbeddedPostgres.system(EmbeddedPostgres.java:602)
at com.opentable.db.postgres.embedded.EmbeddedPostgres.initdb(EmbeddedPostgres.java:221)
at com.opentable.db.postgres.embedded.EmbeddedPostgres.(EmbeddedPostgres.java:142)
at com.opentable.db.postgres.embedded.EmbeddedPostgres$Builder.start(EmbeddedPostgres.java:554)
at org.ohdsi.circe.PostgresSingletonRule.pg(PostgresSingletonRule.java:67)
at org.ohdsi.circe.PostgresSingletonRule.before(PostgresSingletonRule.java:59)
at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:50)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)

It’s not blocking me at the moment, but out of curiosity I’m wondering if there’s some setup steps I’m missing.

Hi, sorry for the problems.

On the note of the maven problem, we’ll update the repository references to be compatible with Maven 3.6+

As far as your problem with the embedded postgresql instance, there shouldn’t be any setup necessary (it works out of the box on my windows box, but I think you’re running under linux). We were running on TravisCI for a while, but I just found out that TravisCI was disconnected from the circe repo, and I will have to invoke the tests and codecov via git actions. I’ll put that on my to-do to get that running.

I did some searching and if you’re actually on MacOs and not linux, you may find some guidance here: java - Tests using embedded postgres fail with Illegal State Exception - Stack Overflow.

1 Like
t