Sharing PostgresSQL db with more than one WebAPI instance
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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