• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to connect to pluggable database in Oracle 12c using Hibernate?

 
S Shiva
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have created a test application in Hibernate and using Oracle 12c as database. I was able to connect to "sys" user of main database. I am able to create, insert, update the tables in this DB. But I am unable to connect to pluggable database. Is there any way to connect to PDB using hibernate. Test is my main DB and pdborcl is my PDB. I also tried google for this, but there is no post on Hibernate and Oracle 12c, but nothing specific to PDB. There is this article which says there is no support for 12c. https://github.com/denimgroup/threadfix/issues/488 Is this true?

hibernate.cfg.xml


When I try to connect to PDB by changing test to pdborcl it gives me below exception. I am able to ping both test and pdborcl from my system. I am also able to connect to both DBs using sqlplus from terminal.

 
Guillaume Dba
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unburying thread to help future generations.

Using Pluggable DB is made through service and service use with jdbc thin is made like this :



The use of SID is deprecated - obsolete since Oracle 8.0 (1997)


see oracle documentation : http://docs.oracle.com/cd/B28359_01/java.111/b31224/urls.htm#BEIDHCBA
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic