Skip to content
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

VIVO-1478 mysql driver throws exception #69

Merged

Conversation

j2blake
Copy link
Member

@j2blake j2blake commented Apr 24, 2018

Thank you for submitting a pull request! Title this pull request with a brief description of what the pull request fixes/improves/changes. Please describe the pull request in detail using the template below.


JIRA Issue: https://jira.duraspace.org/browse/VIVO-1478

  • Other Relevant Links (Mailing list discussion, related pull requests, etc.)

What does this pull request do?

Upgrading to a newer MySQL driver caused an exception unless serverTimezone was specified in the JDBC URL. This request causes VIVO to specify serverTimeZone=UTC as a default option on the URL. It also uses the most recent version of the MySQL driver.

What's new?

  • Changes mysql-connector-java artifact from version 6.0.6 (February, 2017) to version 5.1.46 (April, 2018)

How should this be tested?

  • To reproduce the problem,
    • Install VIVO
    • Start VIVO
    • Observe InvalidConnectionAttributeException in the log
    • VIVO presents a fatal error page
  • To test the fix,
    1. user provides no options on JDBC URL
      • Merge the fix, repeat installation and start VIVO
      • Log contains no InvalidConnectionAttributeException
      • VIVO operates normally
    2. user provides options on JDBC URL
      • As above, but add an innocuous option to the JDBC URL in runtime.properties
        • e.g., VitroConnection.DataSource.url = jdbc:mysql://localhost/vitrodb?useUnicode=yes
      • Start VIVO
      • Log contains no InvalidConnectionAttributeException
      • VIVO operates normally

Interested parties

@VIVO-project/vivo-committers

@mconlon17 mconlon17 requested review from mconlon17 and removed request for gneissone April 24, 2018 15:25
…onAttributeOption. Use the latest MySQL driver.
url += "&useServerPrepStmts=true";
}
if (!urlLwr.contains("servertimezone")) {
url += "serverTimezone=UTC";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs the ampersand at the start to separate the additional parameter.

@j2blake
Copy link
Member Author

j2blake commented Apr 26, 2018

(facepalm)
Ouch. Fixed error, updated test procedure.

Copy link
Member

@gneissone gneissone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per developer call discussion today, switch to using mysql-connector-java version 5.1.46.

@roflinn
Copy link
Member

roflinn commented May 4, 2018

Approved

@gneissone gneissone merged commit b406f99 into vivo-project:develop May 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants