Create Data Source BeanAlreadyExistsException Error

By W.ZH Dec 2011

Issue:

When I use my python script to install my data source, I get this error:

weblogic.descriptor.BeanAlreadyExistsException:

Bean already exists: “weblogic.j2ee.descriptor.wl.JDBCPropertyBeanImpl@2c56a3a([gis_dbSource]/JDBCDriverParams/Properties/Properties[user])”

So I suspect there is same named DS not be cleaned, so go to WLS console try to delete DS. After I delete and restart my WLS, my script gets this error again! And again! I met this error years ago,, but just can not dig out this time…

Reason:

Do to WLS’s domain config folderĀ  under jdbc sub-folder , you can see your DS ‘s xml file still there. But if you open the config.xml, it does not include your DS in the config.xml(so Conole ui can see it.)

Solution:

So remove that data srouce xml in the jdbc sub-folder , and double check the config.xml does not have your DS item, then restart the WLS and try.

Advertisements

Service Name VS SID – Database Access

By W.ZH, Dec 2011

================================================

For using service name, if you use sqlplus to open DB, then you can use:

sqlplus sys/$system_pass@'(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=$db_ip)(PORT=$db_port))(CONNECT_DATA=(
SERVICE_NAME=$SERVICENAME))) as SYSDBA’

for config to access from jdbc code or WLS Datasource for the DB URL:

jdbc:oracle:thin:@ipaddress:1521
/$SERVICENAME

================================================

But if you are using SID – old way:

sqlplus sys/$system_pass@'(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=$db_ip)(PORT=$db_port))(CONNECT_DATA=(
SID=$SIDNAME))) as SYSDBA’

for config to access from jdbc code or WLS Datasource for the DB URL:

jdbc:oracle:thin:@ipaddress:1521
:SIDNAME

Please note one is “:”, one is “/” in URL!

================================================

So what is difference between SID and Service Name access? Basically SID is for single DB instance but Service Name can be for cluster environment. You can read Oracle DB book for them.