Main Tutorials

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

About Author

author image
Founder of Mkyong.com, love Java and open source stuff. Follow him on Twitter. If you like my tutorials, consider make a donation to these charities.

Comments

Subscribe
Notify of
1 Comment
Most Voted
Newest Oldest
Inline Feedbacks
View all comments
Raavan
1 month ago

Thank you so much! No where I found this solution.