0

I am trying to connect Springframework with Mysql, the question is, whena I trying a test to add a new entry on my database, appears the next errors But i cannot see the error on my .xml file. Allso im on a maven project. so, any suggestions?enter image description here enter image description here

I have tried to change the driverClassName, also add some dependencies that are suppose to help, but cant get any better, I have tried to move index file.

OnTheRoad
  • 527
  • 6
  • 24
  • `FileNotFoundException` is telling you it cannot find that particular file (your XML file) at the path you provided. Luckily, this error does not seem to have anything to do with your MySQL connection. Lastly, it would be beneficial for you to provide us with a sample of the code that is causing the error and also the stack trace produced when it does cause an error (exception). Don't post images of these, paste the real code/text here so we can help you better. – SnakeDoc Nov 19 '22 at 00:14
  • Regarding how to find the file in the classpath, there's a few ways depending on how you package your program. Start here though: https://stackoverflow.com/questions/1464291/how-to-really-read-text-file-from-classpath-in-java – SnakeDoc Nov 19 '22 at 00:16

1 Answers1

0

Finally I found what was the error. Eclipse wasn´t recognizing the webap carpet (inside this is the .xml format) as a resource, so the solution was to indicate that it is a resource in the buildapp menu.enter image description here

  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Nov 22 '22 at 11:47