Home > Java, Weblogic > How to start Weblogic Server when any one of the Data Source is down

How to start Weblogic Server when any one of the Data Source is down

Recently we came across an issue with Weblogic start up, we configured Weblogic server with multiple DataSources and one of our Database is down due to some network issue. Weblogic server is unable to start as one of the DataSource is down, but to delete the DataSource (not working one) we need to have Weblogic server started, To start the server every DataSource should work fine. It’s  a deadlock.

Solution : All the DataSources related configuration files located in (beahome)\user_projects\domains\Your_Domain\config\jdbc, Copy the working DataSource details jdbc_url,username,pwd(it will be in encrypted format) and paste it in another DataSource configuration xml file which database is down.

Suppose we have two DataSources

  1. DATASOURCE_1
  2. DATASOURCE_2

If DATASOURCE_1 is not working, we can copy the jdbc-url, username,pwd from DATASOURCE_2 and paste it in DATSOURCE_1 configuration file.

And start weblogic server now, it will start normally.

What we did here is just manipulated weblogic with the same jdbc details with multiple DataSources, internally it will treat as multiple DataSources, but it will connect to only working database as we gave the jdbc details of this working database.

Though we have two DataSources named with DATSOURCE_1 and DATASOURCE_2, both are pointing to same database DATSOURCE_2.

Thanks for reading, hope it helps.

Advertisements
Categories: Java, Weblogic
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: