aspose file tools*
The moose likes BEA/Weblogic and the fly likes Connecting my application to Oracle 10g stored on another machine Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Connecting my application to Oracle 10g stored on another machine" Watch "Connecting my application to Oracle 10g stored on another machine" New topic
Author

Connecting my application to Oracle 10g stored on another machine

Hargobind Singh
Greenhorn

Joined: Nov 30, 2011
Posts: 7

Hey people, I really need help >> to connect my application running in Weblogic Application Server (basically my server computer) to Oracle 10g Database on another machine... How to achieve this in minimum possible time ... Only if there is a way to make my computer reach to DB installed on another computer...

Please help me out asap... have to submit the project .. :(
sudipto shekhar
Ranch Hand

Joined: Apr 02, 2008
Posts: 823

Hi,



to connect my application running in Weblogic Application Server (basically my server computer) to Oracle 10g Database on another machine...



As far as I can understand by this, you need to create/configure a data source that will connect to your database.



How to achieve this in minimum possible time ...



To accomplish this task in minimum possible time by you is to try Oracle Documentation for this.

Try it out and if you get stuck, let us know. There would be someone or other out here to help you out.


Regards, Sud.
SCJP 5 ScjpFAQ JLS
sudipto shekhar
Ranch Hand

Joined: Apr 02, 2008
Posts: 823

I did a little google for you..... webpage
Hargobind Singh
Greenhorn

Joined: Nov 30, 2011
Posts: 7

First of all, Thanks alot ... it did directed me towards the right approach

Somehow, I was able to achieve my connection part of application server to Oracle 10g... by configuring the data source part in application server to connect to my remote db, i.e., oracle 10g (say on a machine - harry002)
Application server is on machine : harry001
Now having successfully established the connection by giving static IPs to both the machines within same subnetwork... harry001 =>192.168.1.2 and harry002=>192.168.1.3 ( I'm using these only for demonstration purposes so that i can achieve what i want)

After my application has launched, when query the DB through my application for a simple Login page i get the following exception...

java.sql.SQLException: Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor The Connection descriptor used by the client was: localhost:1521 : orcl

Now i have no idea how to get rid of this exception... please help me out

Thanks ..
sudipto shekhar
Ranch Hand

Joined: Apr 02, 2008
Posts: 823

Hargobind Singh wrote:
After my application has launched, when query the DB through my application for a simple Login page i get the following exception...

java.sql.SQLException: Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor The Connection descriptor used by the client was: localhost:1521 : orcl




Did you test the connection that you created from the weblogic console?

It seems that the database SID you specified is incorrect. Or else when the database instance has not been started.

Please check the connection from the console and also make sure that the database instance is started when you do the test.

Let us know with your progress.
Hargobind Singh
Greenhorn

Joined: Nov 30, 2011
Posts: 7

i'm not getting how to do this ... ... is it related to the no. we provide:1521 -- for connectivity ??
sudipto shekhar
Ranch Hand

Joined: Apr 02, 2008
Posts: 823

Hargobind Singh wrote:i'm not getting how to do this ... ... is it related to the no. we provide:1521 -- for connectivity ??



Hargobind, can you be a little more specific? what did you not get? 1521 is the port number to connect to the database. That would be you environment specific configuration.

You can post the screenshot of your weblogic console to configure Data Source, or the config.xml file of your domain, so that we can have a look!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Connecting my application to Oracle 10g stored on another machine