mysql-connector-java: unknown was not found

The IntelliJ cannot find the mysql-connector-java dependency and hits error "unknown was not found"?

pom.xml

  <dependency>
      <groupId>mysql</groupId>
      <artifactId>mysql-connector-java</artifactId>
      <scope>runtime</scope>
  </dependency>
Terminal

mysql:mysql-connector-java:jar:unknown was not found in https://repo.maven.apache.org/maven2
during a previous attempt.

This failure was cached in the local repository and resolution is not reattempted until the
update interval of central has elapsed or updates are forced

Solution

Replace the old MySQL JDBC mysql-connector-java dependency with this mysql-connector-j dependency.

pom.xml

  <dependency>
      <groupId>com.mysql</groupId>
      <artifactId>mysql-connector-j</artifactId>
      <scope>runtime</scope>
  </dependency>

References

One comment on “mysql-connector-java: unknown was not found

Leave a Comment

Your email address will not be published. Required fields are marked *