Tuesday, June 8, 2010

OSB, WebLogic and Derby Database Console with NetBeans

After installation of OSB11, we get by default a DataSource connecting to this database:

jdbc:derby://localhost:1527/osbexamples;create=true;ServerName=localhost;databaseName=osbexamples

with driver
org.apache.derby.jdbc.ClientDriver

user=DEV_SOAINFRA

To connect a Console with NetBeans 6.8 do this:

Window/Services

open the Databases tab

there should be already a jdbc:derby .../samples

you can edit it (or create a new one) with these properties:

URL: jdbc:derby://localhost:1527/osbexamples
Driver: org.apache.derby.jdbc.ClientDriver
Schema: APP
User: DEV_SOAINFRA

in the schema DEV_SOAINFRA
you can open the table

WL_LLR_ADMINSERVER which contains:

XIDSTR    POOLNAMESTR    RECORDSTR
JDBC LLR Domain//Server    JDBC LLR Domain//Server    osbdomain//AdminServer
JDBC LLR Version    JDBC LLR Version    1.0

where osbdomain is your domain name, and AdminServer your admin server name.

So if you have multiple Weblogic Domains on the same machine, but only one instance of Derby running, you can create a new schema for a new user, and make sure that the second domain uses as a JDBC Pool user this new user, and update the "JDBC LLR Domain//Server" record with the name of your domain/adminserver.

This shold fix the infamous exception:


java.sql.SQLException: JDBC LLR, table verify failed for table 'WL_LLR_ADMINSERVER', row 
'JDBC LLR Domain//Server' record had unexpected value 'my_domain2//AdminServer' expected 
'my_domain//AdminServer'
 
 
An easier solution is to change (Wl Console : AdminServer/General/advanced options/JDBC LLR Table Name) the table name to use in LLR: the default is 
WL_LLR_ADMINSERVER but you can change it to something else)


No comments: