• 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

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

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic