• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Could not create connection to database

 
Rancher
Posts: 1171
18
IntelliJ IDE Hibernate Firefox Browser MySQL Database Spring Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm making a standalone springbootapp that uses jpa-hibernate for the databasconnection and javafx as frontend.
First I was using a testdb from db4free, everything was working fine, untill it didn't anymore...
I don't see what the problem is, cause I have done the same thing numerious times before and reusing a lot of the code.
Since I couldn't make it work with the db from db4free, I set up a local mysqldb.
I removed my .m2 folder, cleaned my project and recompilled.
But I stille get some errors, while before I got a nullpointer for the transactionmanager, now I can't connect to the db at all.
I tested my connection with datagrip, so the database is online and I'm using the right credentials.

Something that's also weird, it should the 5.1.46 mysqlconnector, but in my stacktrace I could see it refers tot he 5.1.39 connector.

Any tips would be greatly appreciated...


Pom.xml:



Application.properties:


MainApp:



A Entity:


A Repo:
 
Daniel Demesmaecker
Rancher
Posts: 1171
18
IntelliJ IDE Hibernate Firefox Browser MySQL Database Spring Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I forgot the most important thing,

The Stacktrace:

 
Daniel Demesmaecker
Rancher
Posts: 1171
18
IntelliJ IDE Hibernate Firefox Browser MySQL Database Spring Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So I rebuild my project, that's seemed to fix the biggest problem.
I can connect to my db and everything works, but on startup I still get an error, that seems to be of no importances, so I could ignore it, but it still bugs me, so maybe one of you could explain to me what it meens and how to fix it?
Thanks.


Stacktrace:
 
Saloon Keeper
Posts: 27796
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Traceback wrote:
MySQLSyntaxErrorException: Specified key was too long; max key length is 1000 bytes



Yikes! What did you do? Define an image as a database key?
 
Daniel Demesmaecker
Rancher
Posts: 1171
18
IntelliJ IDE Hibernate Firefox Browser MySQL Database Spring Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Uh? No? Where did you get that from? The problem solved itself? The error suddently disapeared...
 
reply
    Bookmark Topic Watch Topic
  • New Topic