Monday, 19 October 2015

Poll the new or changed records use DB2 Adapter in OSB Cluster


For polling records from DB2 database in OSB 11 g. We can have below setting to poll records via one server at a time.

(i) <serviceName>_or-mappings.xml Change:-


Change from <lock-mode>none</lock-mode> to <lock-mode>lock</lock-mode>
Which means we are enabling distributed polling. Which will set lock for one server at a time

(ii) Add Dynamic EndPoint Properties as below Under JCA Transport Tab:-

useSkipLocking = false


(iii)Enable Transaction Required check box under Message Handling Tab:-

Enabled check box

Enjoy the poller testing now.

ConnectionFactory property platformClassName was set to org.eclipse.persistence.platform.database.oracle.Oracle10Platform but the database you are connecting to is DB2/LINUXX8664

I create a connection to DB2 server in weblogic admin console and tried to test one of my process and i go the error below


ConnectionFactory property platformClassName was set to org.eclipse.persistence.platform.database.oracle.Oracle10Platform but the database you are connecting to is DB2/LINUXX8664.  Please validate your platformClassName setting.  This mismatch can cause the adapter to trigger runtime exceptions or execute SQL that is invalid for the database you are connected to.  This exception is considered not retriable, likely due to a modelling mistake.  To classify it as retriable instead add property nonRetriableErrorCodes with value "--104" to your deployment descriptor (i.e. weblogic-ra.xml).  This polling process will shut down, unless the fault is related to processing a particular row, in which case polling will continue but the row will be rejected (faulted).
 
The reason for this issue was that by default when we create a jndi it takes org.eclipse.persistence.platform.database.oracle.Oracle10Platform as platformClassName

I changed it to
org.eclipse.persistence.platform.database.DB2Platform

and save the chnages + update the DB plan. You will not see the error again.
 
List of the platformClassName used for different database:-

Oracle10+ (including 11g)

org.eclipse.persistence.platform.database.Oracle10Platform
Oracle9+ (optional)

org.eclipse.persistence.platform.database.Oracle9Platform
Oracle8

org.eclipse.persistence.platform.database.Oracle8Platform
Oracle7

org.eclipse.persistence.platform.database.OraclePlatform

DB2

org.eclipse.persistence.platform.database.DB2Platform

DB2 on AS400e

oracle.tip.adapter.db.toplinkext.DB2AS400Platform
Informix

org.eclipse.persistence.platform.database.InformixPlatform
SQLServer
 
org.eclipse.persistence.platform.database.SQLServerPlatform
MySQL

org.eclipse.persistence.platform.database.MySQLPlatform
Any other database

org.eclipse.persistence.platform.database.DatabasePlatform

Tuesday, 22 September 2015

SOA Suite 11g: Unable to start domain



If you have recently installed

Created a domain and then tried to start it only to find it fails with the error:
 
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
then edit the file




<domain home>\bin\setSOADomainEnv.cmd or sh (depending on your platform) and modify the line:
 
set DEFAULT_MEM_ARGS=-Xms512m -Xmx1024m


 
to something like:



set DEFAULT_MEM_ARGS=-Xms512m -Xmx768m
 
Start the weblogic server again. It should work.