OHDSI / OHDSI/WebAPI

Sharing PostgresSQL db with more than one WebAPI instance

Open
#2,285 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
151
Forks
183
Avg merge
14m
Merged PRs (30d)
2

Description

Expected behavior

2 Web API instances of same Docker image share same PostgresSQL database instance.

Actual behavior

java.lang.ClassNotFoundException: Unable to load class: jdbc:postgresql://{host}/{databasename} from ClassLoader:java.net.URLClassLoader@3d299393;ClassLoader:ParallelWebappClassLoader
context: WebAPI

Steps to reproduce behavior

Share same postgresSql instance from two different WebAPI, meaning host 2 different webapi instance on tomcat and connect to one PostgresSQL database. Share one database for more than one Appservice.

Note: Upon setting up 2nd WebAPI instance with existing database causing this error. the First WebApi instance working well against this DB.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reproduction details and inspect the database/JDBC configuration used when a second WebAPI instance starts; no source files or tests are named. Reproduce two WebAPI instances on Tomcat sharing one PostgreSQL database, and consider the issue done when both start and connect without the reported ClassNotFoundException.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, java, postgres
Domain
api, backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.