-
Notifications
You must be signed in to change notification settings - Fork 993
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to connect to MySQL #21
Comments
This StackOverflow post seems to suggest that there may be unwanted characters in the URL: https://stackoverflow.com/questions/50311481/malformed-database-url-failed-to-parse-the-main-url-sections It might be worth attaching a debugger and looking at the string that's being passed to the JDBC driver if nothing obvious is there. |
Thanks for taking a look at this @jamesagnew. I found the issue - the static initializers in the ExampleServerDstu3IT/ExampleServerDstu2IT/ExampleServerR4IT test files are setting the DATASOURCE_URL to the hard coded I tried setting the
|
Ahhh of course. That makes sense. This is a bit of a quandry- The integration tests for this project are all there to make sure that the demo project is in a good state, but in all honesty I wouldn't expect people to keep them if they are customizing the project to their own needs and environment (as you are doing). The quick workaround for you is probably to just delete the integration tests on your own fork of this project. The better solution here is probably to make them not run automatically without a build flag, or maybe to just update the README to reflect that you need to delete them? I'm not sure... |
Following the README, I clone the project and then perform the following steps:
mvn install
- no issues heremvn jetty:run
- no issues; I'm able to access the web UI as expected. This is using Derby as indicated in the README.docker run --name hapi-mysql -e MYSQL_ROOT_PASSWORD=mypassword -p 3306:3306 -d mysql:5
Success! Everything looks good thus far.
hapi.properties
file as indicated in the READMESave and
mvn install
....[ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.21.0:verify (default) on project hapi-fhir-jpaserver-starter: There are test failures.
Retrieve log from
target/classes/failsafe-reports
. Here's the critical error message in the log file that I'm seeing (happy to provide the entire file contents if helpful):java.sql.SQLException: Cannot create PoolableConnectionFactory (Cannot load connection class because of underlying exception: com.mysql.cj.core.exceptions.WrongArgumentException: Malformed database URL, failed to parse the main URL sections.)
I've reviewed the database URL ad nauseam and have been unable to identify any apparent issues. I've also attempted to connect to an RDS MySQL instance to no avail. I'm able to connect to the DB instance without issue using both the CLI and a SQL client. Additionally, I had a developer colleague attempt to connect this to MySQL following the README instructions as a sanity check and encountered the same error.
The text was updated successfully, but these errors were encountered: