Monday, June 24, 2013

<EJB> <BEA-010026><Exception occurred during commit of transaction Name

Error:-

<Error> <EJB> <BEA-010026><Exception occurred during commit of transaction Name=[EJB com.collaxa.cube.engine.ejb.impl.bpel.BPELDeliveryBean.handleInvoke(java.lang.
String,boolean)],Xid=BEA1-11A31559DD40A4092BE4(257133113),Statxus=Rolled back. [Reason=javax.transaction.xa.XAException: JDBC driver does not support XA, hence cannot be a participant in two-phase commit. To force this participation, set the GlobalTransactionsProtocol attribute to LoggingLastResource (recommended) or EmulateTwoPhaseCommit for the Data Source = AIADataSourceDS],numReplie
sOwedMe=0,numRepliesOwedOthers=0,seconds since begin=2,seconds left=60,NonXAServerResourceInfo[WL_JDBC_LLR_POOL.SOADataSource]=(ServerResourceInfo[WL_JDBC_LLR_POOL.SOADataSource]

Root Cause:- 

 Data source "AIADataSourceDS" is non-XA data source using "oracle.jdbc.OracleDriver" driver. "Supports Global Transactions" was enabled to support Global Transaction by the non-XA data sources. When you select Supports Global Transactions, you must also select the protocol for WebLogic Server to use for the transaction branch when processing a global transaction. There are three protocols for this-
  • Logging Last Resource
  • Emulate Two-Phase Commit
  • One-Phase Commit  
However in this case, none of the above protocol was selected.

Solution:-

There are two solutions for this based on the requirement

1. If your requirement is to support global transaction using nonXA datasource then select any of the above protocol. Save and activate your changes. Restart the servers to which the data source was targeted.

2. If your requirement is to support local transaction then uncheck "Supports Global Transactions". Save and activate your changes. Restart the servers to which the data source was targeted.

Saturday, June 22, 2013

Oracle XE 11.2.0 Installation Guide on Linux 64 bit


Steps to install JAVA on Linux


Oracle OSB 11g Installation on Linux 64 bit


Oracle SOA Suite 11.1.1.6.0 Installation on Windows


Oracle Fusion Middleware (SOA/OSB) 11g System Requirements and Specifications

Before installing Oracle SOA/OSB, it is a good practice to ensure that the system requirements and specifications are met. This ensure that during installation no issue will be faced due to missing library or insufficient value if any OS parameter.

This document is for Red Hat Linux 5 (x86-64).

Wednesday, June 19, 2013

OSB Service WSDL URL throws "Error 404--Not Found"

Recently we found an issue with the services registered in OSB. Even though services were registered successfully, we were not able to invoke the WSDL URLs. It was throwing "Error 404-Not Found". As per this error code the service is not available at the server, however when we looked into OSB console, we could see these services. Nothing could be seen in the log to identify the root cause.

Finally after lot of troubleshooting, we found the issue. It was because for the web service registered in the OSB, "State" was not enabled for the proxy service as shown below.

When the state was enabled by clicking the checkbox and the change was activated, we were able to access the WSDL of the registered OSB service.

Sunday, June 16, 2013

oracle.sysman.emas.sdk.wsm.WsmServiceAccessException: Cannot locate service: oracle.wsm.policymanager.IPolicyService

Error:-

Either the WSDL URL is invalid or the WSDL file is not valid or incorrect. - oracle.sysman.emas.sdk.wsm.WsmServiceAccessException: Cannot locate service: oracle.wsm.policymanager.IPolicyService

Solution:-

Log into EM then select the domain in use and use the following the menu path,  WebLogic Domain --> Web Services --> Platform Policy Configuration

From there, select the Policy Accessor tab., then click Add to add a property.

In the Add Property window, specify the following values:

a)  In the Name field, enter this property: "java.naming.provider.url"

Value: t3:// soaserver01.com:9200,soaserver02.com:9200,soaserver03.com:9200

(Use your server and port value here. The port number should be of the managed server on which wsm-pm is installed)

Click Apply

Restart Weblogic Server.

Saturday, June 15, 2013

WSM-02120 : Unable to connect to the policy access service

Error:-
Cannot locate policy manager query/update service. Policy manager service look up did not find a valid service, due to: Unable to connect to WS Policy Manager. <- :="" access="" available="" connect="" connection="" destination="" exception="" i="" is:="" is="" java.net.connectexception:="" javax.naming.communicationexception="" nested="" no="" oot="" oracle.wsm.policymanager.policymanagerexception:="" policy="" refused="" router="" service.="" soaserver01.com="" soaserver02.com="" soaserver03.com:9200:="" t3s:="" the="" to="" unable="" unreachable="" wsm-02120="">

Solution:-
Log into EM then select the domain in use and use the following the menu path,  WebLogic Domain> Web Services > Platform Policy Configuration
From there, select the Policy Accessor tab., then click Add to add a property.
In the Add Property window, specify the following values:
a)  In the Name field, enter this property: "java.naming.provider.url"
Value: t3:// soaserver01.com:9200,soaserver02.com:9200,soaserver03.com:9200
(Use your server and port value here. The port number should be of the managed server on which wsm-pm is installed)
Click Apply
Restart Weblogic Server.

Wednesday, June 12, 2013

Oracle BAM icommand hangs after entering password

I faced issue in BAM wherein Oracle BAM Command Utility hanged after entering username and password. As shown in the screenshot below.





The issue got fixed after updating BAMICommandConfig.xml file @$ORACLE_SOA_HOME/bam/config

You need to update ServerName and ServerPort parameter in this file. As shown below where physoaserver.abc.com is the node on which BAM is installed and 9112 is the Port assigned to BAM.
 
  <ServerName>physoaserver.abc.com</ServerName>
  <ServerPort>9112</ServerPort>

Once you have updated the ServerName and ServerPort, try executing the icommand again. This time it will not hang.
In case of HA cluster environment, update the file on all the nodes on which BAM is installed. The ServerName will be the hostname of that machine.

Tuesday, June 11, 2013

Create/Remove Security Policy at weblogic JMS Queue

While working with client, we got one requirement where we have to implement security at weblogic JMS queue level. Few of the JMS queues were used by non integration components. The Client wanted that only specific users should be able to push/send data into these queue. The problem was to add security policy to hundreds of queues in various environment. It was a tedious job so I wrote below WLST function after going through few blogs and Oracle documentation. I am sharing it with you hoping that it will help you and save your time ;-)

The function when invoke, enable security at JMS Queue level.

def jmsQueueSecurityEnable():
    try:
        print('=======================================================')
        print('Enabling Security on JMS Queue')
        print('=======================================================')
        customUsers=users.split(',')
        customUsersStr=''
        for i in customUsers:
            customUsersStr=customUsersStr+'{Usr('+i+')}|'
        customerUsersList=customUsersStr[0:len(customUsersStr)-1]
        cd('/SecurityConfiguration/'+domain_name+'/Realms/myrealm/Authorizers/XACMLAuthorizer')
        queueList=addQueueName.split(',')
        for i in queueList:
            resourceId='type=, application='+ApplicationName+', destinationType=queue, resource='+i+', action='+action+''
            print('resourceID='+resourceId)
            cmo.createPolicy(resourceId,customerUsersList)
            print('Added policy to queue= '+i)
    except Exception, e:
        print('Exception is '+e)
        dumpStack()
        raise


When jmsQueueSecurityDisable is invoke, it removes all the security from the JMS Queue.

def jmsQueueSecurityDisable():
    try:
        print('=======================================================')
        print('Disabling Security on JMS Queue')
        print('=======================================================')
        cd('/SecurityConfiguration/'+domain_name+'/Realms/myrealm/Authorizers/XACMLAuthorizer')
        queueList=removeQueueName.split(',')
        for i in queueList:
            resourceId='type=, application='+ApplicationName+', destinationType=queue, resource='+i+', action='+action+''
            print('resourceID='+resourceId)
            cmo.removePolicy(resourceId)
            print('Disabled policy on queue= '+i)
    except Exception, e:
        print('Exception is '+e)
        dumpStack()
        raise


I created a property file to read the values as shown below

#===========================================================================================
# Details
#===========================================================================================
domain_name=Oracle_SOA1
ApplicationName=JMSModule
action=send
users=user1,user2,user3
#===========================================================================================
# Resource Details to Add Policy
#===========================================================================================
addQueueName=SampleQueue,
SampleQueue1,SampleQueue3
 #===========================================================================================
# Resource Details to Remove Policy
#===========================================================================================
removeQueueName=SampleQueue4,
SampleQueue5


You can customize the functions as per your requirement.