Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

java.lang.UnsupportedOperationException: The user must supply a JDBC connection  RSS feed

 
sarada bokka
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am using hibernate and it is working fine with cfg.xml file.

But I want to set as below since my password is going to be in encrypted format I need to decrypt and set as below:



But hibernate throws error while setting the properties

Exception in thread "main" java.lang.UnsupportedOperationException: The user must supply a JDBC connection
at org.hibernate.connection.UserSuppliedConnectionProvider.getConnection(UserSuppliedConnectionProvider.java:54)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446)
at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167)
at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:160)
at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:81)
at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1473)
at com.vaannila.student.Main.main(Main.java:15)

 
sarada bokka
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is working fine!

the change is add hibernate infornt of all properties

 
Wouter Oet
Bartender
Posts: 2700
IntelliJ IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And if you use the standardized property names other JPA providers will also recognize them:

Note that they where standardized in JPA 2.0
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!