KOMs
KOMs

Reputation: 1

What is the locahost for oracle 11g xe?

I'm doing a hibernate project for my final semester. I don't know what to enter here in my project for the hibernate configuration file jdbc:oracle:thin:@localhost: :XE.

Upvotes: 0

Views: 63

Answers (2)

cmd
cmd

Reputation: 11841

localhost refers to your local machine. In the case you describe with Oracle, you need to specify the Oracle instance on your local machine. By default Oracle runs on port 1521 e.g. localhost:1521.

To solve your problem, you should update your jdbc connection string to include the port.

Thus, your connection string should look something like the following:

 jdbc:oracle:thin:@localhost:1521:XE

Here is the Oracle JDBC API doc. It explains how to construct the connection url.

Upvotes: 1

Jorge Campos
Jorge Campos

Reputation: 23381

You are missing the port number. You have to see what port your database is using

jdbc:oracle:thin:@localhost:1525:XE

It is normally 1525

Upvotes: 0

Related Questions