Thursday, May 1, 2014

'NameError' when Trying to use the sca_exportComposite

I was unable to export a composite from the em console, so though of doing it through wlst.

 wls:/offline> sca_exportComposite('http://host:7001','none', '/tmp/sca_TestWS.jar', 'TestWS', '1.0',partition='test')
Traceback (innermost last):
  File "<console>", line 1, in ?
NameError: sca_exportComposite

We tried using the wlst within Oracle_common and weblogic home.But finally realized that as per Doc ID 1484174.1 it has to be from SOA Oracle Home.

Then again we need to give SOA managed server port and not the admin port.

wls:/offline> sca_exportComposite('http://host:7011','none', '/tmp/sca_TestWS.jar', 'TestWS', '1.0', partition='test')
serverURL = http://host:7011
sarFile = /tmp/sca_TestWS.jar
partition= test
compositeName = TestWS
revision = 1.0
user = None
compositeDN = test/TestWS!1.0
INFO: Creating HTTP connection to host:host, port:7011
Enter username and password for realm 'default' on host host:7011
Authentication Scheme: Basic
Username: ohsadmin
INFO: Received HTTP response from the server, response code=200
Write response into file:/tmp/sca_TestWS.jar
---->Export composite success.

OAM Audting Data is not populated

We enabled OAM auditing through ,

In the service instance specified in the domain file ($DOMAIN_HOME/config/fmwconfig/jps-config.xml), enable database auditing by changing the value of the property audit.loader.repositoryType to DB

Infact we can use OAM 11g : How To Configure OAM Audit Configuration (Doc ID 1492681.1)

In spite of all these settings IAU_* tables are not populated with any data.

I found these in logs.

 [ecid: 597cbd9ac221c087:2466da57:1459486cc99:-8000-00000000000008d0,0] [APP: oam_server#] Read configuration parameter Port = 11,598.
[2014-04-24T10:18:11.169-06:00] [wls_oam1] [NOTIFICATION] [OAM-04003] [oracle.oam.proxy.oam] [tid: [ACTIVE].ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: <anonymous>] [ecid: 597cbd9ac221c087:2466da57:1459486cc99:-8000-00000000000008d0,0] [APP: oam_server#] OAM proxy started. Listening on port 11598.

<Apr 29, 2014 12:15:48 PM MDT> <Error> <> <BEA-000000> <IAU:Unable to write Audit Event for Type: OAM>
<Apr 29, 2014 12:15:48 PM MDT> <Error> <> <BEA-000000> <IAU:Unable to prepare statement:INSERT INTO IAU_BASE COLUMNS ( IAU_ID, IAU_ComponentType, IAU_InstanceId, IAU_HostId, IAU_HostNwaddr, IAU_ModuleId, IAU_ProcessId, IAU_OracleHome, IAU_HomeInstance, IAU_ECID, IAU_RID, IAU_ContextFields, IAU_SessionId, IAU_TargetComponentType, IAU_ApplicationName, IAU_EventType, IAU_EventCategory, IAU_EventStatus, IAU_TstzOriginating, IAU_ThreadId, IAU_ComponentName, IAU_Initiator, IAU_MessageText, IAU_FailureCode, IAU_RemoteIP, IAU_Target, IAU_Resource, IAU_Roles, IAU_DomainName, IAU_ComponentData, IAU_AuditUser, IAU_TenantId, IAU_TransactionId, IAU_UserTenantId, IAU_AuthenticationMethod ) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ) >

Also the OAM version was,

    <Setting Name="ProductRelease" Type="xsd:string"></Setting>

The issue is due to a known bug.


The fix is,

SQL> alter table iau_base add (IAU_USERTENANTID VARCHAR2(255));

Table altered.

SQL> alter table iau_base add (IAU_TENANTID VARCHAR2(255));

Table altered.

SQL> alter table iau_base add (IAU_AUDITUSER VARCHAR2(255));

Table altered.

The table structure doesnot have these columns,