Monday, December 17, 2012

External Table Names column getting hang up while creating data objects in BAM


Problem : 

Creating data source using using Oracle EBS Database as external tables then BAM Web Application is getting hanged up!!
Steps to replicate :


1. We are using Oracle EBS R12 database as external datasource in BAM. This is done perfectly using BAM Architect -- External Datasources





2. Now While creating Data Objects and selecting above created external(refering to EBS database) data source then external table names.. are not coming up and its keep on processing and getting hanged up !!




Error : 

BEA-000337
I tried increasing the socket time from 600 to 26000 in weblogic and BAM server. But had no luck !!

Solution : 

As suggested by Oracle Support 

 
****

I have tried replicating the issue but in my case for the first time it took several minutes when I selected external data object and selected datasource from the drop down list. I believe this is not a BUG but dependent on performance.

*****

Problem occurred as result of performance and hardware issue .

I was  connecting eBS and SOA Suite ( which are located in different location/environment) and were not in same DMZ and I was connected to Oracle EBS instance over VPN connection too !!


Friday, December 14, 2012

Timed out when making request to XAResource

Error Log Trace :

[2012-09-11T19:58:01.053+05:30] [AdminServer] [ERROR] [] [oracle.soa.adapter] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@1d4729d] [userId: <anonymous>] [ecid: 0000Jap5w7iCSs05Rz^Ayd1GJm2d000002,0] [APP: soa-infra] weblogic.transaction.RollbackException: Transaction has timed out when making request to XAResource 'EBSDS_base_domain'.[[
javax.resource.ResourceException: weblogic.transaction.RollbackException: Transaction has timed out when making request to XAResource 'EBSDS_base_domain'.atoracle.tip.adapter.fw.jca.messageinflow.MessageEndpointImpl.afterDelivery(MessageEndpointImpl.java:308) atoracle.tip.adapter.aq.v2.database.AbstractDequeueAgent$AQDeliveryBean.afterOnMessage(AbstractDequeueAgent.java:607)at oracle.tip.adapter.aq.v2.database.AbstractDequeueAgent$AQDeliveryBean.access$100(AbstractDequeueAgent.java:473)
at oracle.tip.adapter.aq.v2.database.AbstractDequeueAgent.run(AbstractDequeueAgent.java:157)

Reason :

oracle.soa.adapter : indicates the error had resulted from JCA Adapter .

 XAResource 'EBSDS_base_domain :   EBSDS is datasource being used to make  database connection to EBS Suite( in my case ) for  base_domain.

JDBC datasource was not able connect to database with which it was configured at design time.

Solution : 

Try to check if the database in being up or down with help of Toad or Oracle SQL Developer.
Or Try to make new JDBC DataSource in Weblogic console using the same same database name, hostname, port, password  and try to test the connection.

ConnectionDeadSQLException & common.ResourceException


Error Log Trace:
internal Exception: weblogic.jdbc.extensions.ConnectionDeadSQLException: weblogic.common.resourcepool.ResourceDeadException:0:weblogic.common.ResourceException: Could not create pool connection. The DBMS driver exception was: IO Error: The Network Adapter could not establish the connection.

Reason: 
The DB Service went down abrublty as This exception is generated when an application request to get a connection fails because the connection selected to be returned to the application from the pool fails the configured tests.
Weblogic tests a connection before it is given to a client.

Solution : 

Oracle DB Service need to be restarted !!

Monday, February 6, 2012

OSB Clustering & Load Balancer

OSB clustering is being used to run multiple servers in parallel and to provide failover in case any managed server fails. Load Balancer is being used to effectively distribute the request payload among the running managed server in cluster depending upon the algorithm being used ( by default round robin ).

I will make use of Software Load Balancer (HTTP proxy servlet ) inbuilt in weblogic server as the implementation is being is done to simulate in clustering and load balancing in development or testing environment for the HTTP requests.
For production environment Hardware Load Balancer like BIG IP  ..are being used.

Architecture would be like :






 1. Domain Creation


    2.  Do Select Oracle Service Bus and not OSB for developer's

    3. 



    4. 



    5. 
    6. 

    7. Add managed server ip and port no in cluster address  (127.0.0.1:7201, 127.0.0.1:7301)


    8. Add only osb1 & osb2 to osbcluster


    9. Add the third managed server as Proxy server 



     10.

    11.Add all to machine 



    12.  Finished the setup and start admin server.

    13. Start managed server osb1


    14. Start managed server osb2


    15. Start managed server lb (load Balancer) 


    16. Go Service Bus Console and check the server health 


    17. Load a wsdl and make a proxy on it, add a log action( to check which managed server the request is going ) to capture the request payload and do reply with success 

    18. Go to weblogic console to check the clustering setup  : 


     Go to deployments under weblogic home, you will find the encircled app which is handling the load      balancing 



    19. Just enter 
                        http://[managed server ip address]:[managed server port no]/yourproxyurl?wsdl   
    You will find a wsdl published but have endpoint pointing to loadbalancer ip and port no 



    20. Now i have used soap-ui to test the load balancing 

    My request would be hitting load balancer  and load balancer would be handling the distrubution among osb1 and osb2 

    keep a look in the endpoint being hit in soap-ui 
    a.                      http://127.0.0.1:7101/default/PS_LoadBalancerTest

    First time the request has gone to osb1 as we can see in logs of osb1 managed server 

     b: I again tested it from soap-ui then the request would go to osb2 as we can see in logs of osb2 managed server (green)

    • If you shutdown admin server, still the request can be fulfilled by osb1 and osb2 . 
    • If any of osb1 or osb2 is down then request would be re-directed to running managed server either osb1 or osb2.
    • If you shutdown load balancer managed server (lb) then request won't be fulfilled you need to point your request to osb1 or osb2 by changing the endpoint                                                                                                http://[managed server ip address]:[managed server port no]/yourproxyurl.

    So the osb clustering and load balancing is achieved in simple manner !!








    Monday, January 9, 2012

    Adding namespace to XML Structure

    I came across a situation while doing CSV to XML transformation, the MFL action in OSB transforms CSV to XML or vice -versa but the resulted XML structure does n't have a namespace added to it.

    Namespace is required while doing service orchestration (by using Service Callout or Route action ).
    There are two ways u can add namespace to xml structure .

    1. Make a XSD of the xml structure and use Xquery transformation selecting newly created xsd of non-namespace as Source and in Target select as xsd/wsdl element which u want as result.

    2. We can use xquery to add a default namespace to xml structure.(which is obtained using mfl action and storing the result in variable named InputRequestXmlBody
                             

    xquery version "1.0" encoding "Cp1252";
    (:: pragma parameter="$noNamespaceXML" type="xs:anyType" ::)
    (:: pragma parameter="$namespaceURI" type="xs:string" ::)
    (:: pragma type="xs:anyType" ::)
    declare namespace xf = "http://tempuri.org/Resources/XQueries/addNamespace/";

    declare function xf:addNamespaceToXML($noNamespaceXML as element(*),$namespaceURI as xs:string) as element(*)
    {
    element {fn:expanded-QName($namespaceURI,fn:local-name($noNamespaceXML))}
    {
    $noNamespaceXML/@*,
    for $node in $noNamespaceXML/node()
    return
    if (exists($node/node())) then xf:addNamespaceToXML($node,$namespaceURI)
    else if ($node instance of element()) then element {fn:expanded-QName($namespaceURI,fn:local-name($node))}{$node/@*}
    else $node }
    };

    declare variable $noNamespaceXML as element(*) external;
    declare variable $namespaceURI as xs:string external ;
    xf:addNamespaceToXML($noNamespaceXML, $namespaceURI)


    We can use replace action then to add namespace to xml structure .
                                   

    So XML Structure like this :




    <Transaction>
        <MemberDetails>
            <CashMemoNumber>CashMemoNumber</CashMemoNumber>
            <Date>Date</Date>
            <Time>Time</Time>
            <ShopCode>ShopCode</ShopCode>
            <PrivilegeCustomerCode>PrivilegeCustomerCode</PrivilegeCustomerCode>
            <Country>Country</Country>
        </MemberDetails>
    </Transaction>


    would end up like this :
    <req:Transaction xmlns:req="http://in.abhinav/schema/request">
    <req:MemberDetails>
    <req:CashMemoNumber>CashMemoNumber</req:CashMemoNumber>
    <req:Date>Date</req:Date>
    <req:Time>Time</req:Time>
    <req:ShopCode>ShopCode</req:ShopCode>
    <req:PrivilegeCustomerCode>PrivilegeCustomerCode</req:PrivilegeCustomerCode>
    <req:Country>Country</req:Country>
    </req:MemberDetails>
    </req:Transaction>

    Happy Flows !!

    Sunday, January 1, 2012

    Split Join - OSB

    I was working on requirement to call multiple service in parallel to improve the performance count .
    But the split join works only on WSDL Operation means if you are calling different type of services like Messaging based, XML based u need to create a wsdl to support your split join  ...
    I need to write the final end xml response of split join to file system location using file transport in non -xml format (CSV).
    But my excitement came to sudden end when i could not locate  MFL transformation action in split join design pallate 



    The next problem with split join is that there is not any publish action to call your asynchronous processes (for example: Writing a file)...
    But there is always a work around ...
    1. Made xsd and wsdl for the final end xml response .

                         
                                        

    2. Made a proxy service local transport based on wsdl created above .
    3. In message flow of abobe local proxy service use a publish action to call my File Write Business Service.                                                                             
    4. In request actions of Publish actions use MFL Transformation Action to convert final end xml response to non- xml(CSV)  
                                
    5.So as my requirement was to write the final end response to a file through splt join, use a Invoke service   action to call the above made local proxy that will call your File Write Business Service .
                                              


    So have a happy Split Join !!