Wednesday, October 30, 2013

Weblogic Managed server status struck in STARTING

Weblogic Managed server status struck in STARTING

We faced the issue while starting the weblogic managed server, the status of the server struck in STARTING.

W could not able to find a valid error messages in the log files

Managed Server Log File:

<30-Oct-2013 11:13:29 o'clock GMT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING> 

No logs are getting printed after this.

Node Manager Log File:


<30-Oct-2013 11:09:44> <INFO> <SOACoreDomain> <MS1> <Server failed during startup so will not be restarted>
<30-Oct-2013 11:09:44> <WARNING> <Exception while starting server 'MS1'>
java.io.IOException: Server failed to start up. See server output log for more details.
      at weblogic.nodemanager.server.AbstractServerManager.start(AbstractServerManager.java:200)
      at weblogic.nodemanager.server.ServerManager.start(ServerManager.java:23)
      at weblogic.nodemanager.server.Handler.handleStart(Handler.java:604)
      at weblogic.nodemanager.server.Handler.handleCommand(Handler.java:121)
      at weblogic.nodemanager.server.Handler.run(Handler.java:71)

      at java.lang.Thread.run(Thread.java:662)

The root cause of this issue is somehow the ldap directory of the server got corrupted.

To resolve this issue:

  •  Kill the managed server 
  •  Remove the ldap folder from the following location  <<DOMAIN_HOME>>/servers/<<Managed Server>>, this file will be auto generated while restarting the server.
  • Restart the server


Monday, October 21, 2013

Tracking the messages in Oracle OSB

Tracking the messages in Oracle OSB

This blog will explain how to track the message for a Oracle OSB flow with unique key.

In oracle OSB we can assign a Report key to the proxy service and based on this key the messages can be tracked.

I have developed a proxy service based on business service that invokes a Employee BPEL, this blog will explain how to track the employee messages with employee id.

Steps to enable message tracking in OSB

Open project in OSB console and also create a session

Click on View Message Flow of proxy service



Thursday, October 17, 2013

ORABPEL-05250 Error - JDeveloper Part1

ORABPEL-05250 Error - JDeveloper Part1

I faced a strange ORABPEL-05250 issue while deploying the composite to Oracle SOA Suite Server through JDeveloper.

The composite was successfully build in JDeveloper but during deployment to the server received the following exception.

[03:59:18 PM] Sending internal deployment descriptor
[03:59:18 PM] Sending archive - sca_SFDCOT_Invoker_rev1.0.jar
[03:59:38 PM] Received HTTP response from the server, response code=500
[03:59:38 PM] Error deploying archive sca_SFDCOT_Invoker_rev1.0.jar to partition "CRMASYNC" on server AdminServer [http://localhost:8000] 
[03:59:38 PM] HTTP error code returned [500]
[03:59:38 PM] Error message from server:
There was an error deploying the composite on AdminServer: Error occurred during deployment of component: SFDCOT_Invoker to service engine: implementation.bpel, for composite: SFDCOT_Invoker: ORABPEL-05250

Error deploying BPEL suitcase.
error while attempting to deploy the BPEL component file "/oracle/as01/fmw/config/admin/domains/SOACoreDomain/servers/AdminServer/dc/soa_b3d3a863-3515-4d6d-9b7f-0d0c7d1977a6"; the exception reported is: java.lang.Exception: BPEL 1.1 compilation failed

ORABPEL-05250 exception can occur for number of reasons . After a long struggle( tried removing the partner links one by one) received the actual error

There was an error deploying the composite on AdminServer: Error occurred during deployment of component: SFDCOT_Invoker to service engine: implementation.bpel, for composite: SFDCOT_Invoker: ORABPEL-09705

Could not initialize variable.
An error occurs while initializing BPEL variable inputVariable; the schema processor cannot find the element {http://xmlns.oracle.com/pcbpel/adapter/db/top/SFDCOT_POLLING_V}SfdcotPollingVCollection in the following schemas: oracle.fabric.common.wsdl.SchemaManager@7eb126f4.
The XSD element on which the variable was based was not properly defined in XSD or the WSDL.

Ensure that the element named in the error message is valid in the XSD or the WSDL.

The issue is due to schema name in the wsdl file is wrongly specified(wrong case) even though the schema name was wrongly specified in wsdl the composite was able compile and build successfully in JDeveloper installed in windows but failed while deploying to the server running in UNIX, this is due to case sensitive nature of file names in UNIX OS


After correcting this issue the composite got deployed successfully.


Wednesday, October 16, 2013

The WSDL is not semantically valid: The element or type specified for part'payload' in message cannot be found in any schemas referenced by this wsdl - Oracle OSB

The WSDL is not semantically valid: The element or type specified for part'payload' in message cannot be found in any schemas referenced by this wsdl - Oracle OSB

While creating the WSDL resource in OSB with inline schema refereed to create the message types we may receive the following exception even though the wsdl is valid

An error occurred creating the resource:
The WSDL is not semantically valid: The element or type specified for part'payload' in message '{http://www.tr.com/ns/2013/10/14/SAP/EAI/AAALM/LicenseManagement}PositionEntitlementRequestMessage' cannot be found in any schemas referenced by this wsdl.

WSDL File:


<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="SAPOM_PositionEntitlement"
                  targetNamespace="http://www.tr.com/ns/2013/10/14/SAP/EAI/AAALM/LicenseManagement"
                  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
                  xmlns:client="http://www.tr.com/ns/2013/10/14/SAP/EAI/AAALM/LicenseManagement"
                  xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
                  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
 <wsdl:types>
  <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <xsd:element name="MT_EntitlementStatus" type="client:DT_EntitlementStatus"/>
   <xsd:complexType name="DT_EntitlementStatus">
    <xsd:annotation>
     <xsd:documentation xml:lang="EN">Schema for Entitlement Message</xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
     <xsd:element name="Record">
      <xsd:complexType>
       <xsd:sequence>
        <xsd:element name="header">
         <xsd:complexType>
          <xsd:sequence>
           <xsd:element name="applicationId" type="xsd:string"/>
           <xsd:element name="transactionId" type="xsd:string"/>
           <xsd:element name="messageId" type="xsd:string"/>
           <xsd:element name="messageHistory" type="xsd:string"/>
           <xsd:element name="tracingId" type="xsd:string"/>
          </xsd:sequence>
         </xsd:complexType>
        </xsd:element>
        
       </xsd:sequence>
      </xsd:complexType>
     </xsd:element>
    </xsd:sequence>
   </xsd:complexType>
  </xsd:schema>
 </wsdl:types>
 <wsdl:message name="PositionEntitlementRequestMessage">
  <wsdl:part name="payload" element="client:MT_EntitlementStatus"/>
 </wsdl:message>
 <wsdl:portType name="PositionEntitlement">
  <wsdl:operation name="process">
   <wsdl:input message="client:PositionEntitlementRequestMessage"/>
  </wsdl:operation>
 </wsdl:portType>

</wsdl:definitions>

The issue is the namespace prefix client is not able to access the element MT_EntitlementStatus.

To resolve this issue add the the targetNamespace attribute in schema definition as shown below

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="SAPOM_PositionEntitlement"
                  targetNamespace="http://www.tr.com/ns/2013/10/14/SAP/EAI/AAALM/LicenseManagement"
                  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
                  xmlns:client="http://www.tr.com/ns/2013/10/14/SAP/EAI/AAALM/LicenseManagement"
                  xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
                  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
 <wsdl:types>
  <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"  targetNamespace="http://www.tr.com/ns/2013/10/14/SAP/EAI/AAALM/LicenseManagement">
   <xsd:element name="MT_EntitlementStatus" type="client:DT_EntitlementStatus"/>


Thursday, September 12, 2013

Common customization file to deploy OSB services to different environments

Common customization file to deploy OSB services to different environments

The customization file can be used to customize the OSB services.
This post will explain how to use the common customization file to customize the OSB services.

Steps to use common customization file to customize the OSB services

1. Create a environment specific property files with the end point details ex Dev_build.properties

# SFDC Details
sfdc.protocol=http
sfdc.host=10.23.23.11

siebel.protocol=http
siebel.host=10.23.23.12


2. Common customization file

To customize the end point details for the business service, we have to change the Service URI and Service URI Table.
we have to tokenize the endpoint details so that the values can be replaced from the environment specific file.

For each new OSB service generate the customization file and copy the required sections(mainly <cus:envValueAssignments> of Service URI and Service URI table <cus:envValueAssignments>) to the common customization file.

<?xml version="1.0" encoding="UTF-8"?>
<cus:Customizations xmlns:cus="http://www.bea.com/wli/config/customizations" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xt="http://www.bea.com/wli/config/xmltypes">
  <cus:customization xsi:type="cus:EnvValueCustomizationType">
    <cus:description/>
    <cus:envValueAssignments>
      <xt:envValueType>Service URI</xt:envValueType>
      <xt:location>0</xt:location>
      <xt:owner>
        <xt:type>BusinessService</xt:type>
        <xt:path>VenusOSB/BusinessServ/BS_ServCloudVenusInbound</xt:path>
      </xt:owner>
      <xt:value xsi:type="xs:string" xmlns:xs="http://www.w3.org/2001/XMLSchema">@sfdc.protocol@://@sfdc.host@/services/service1</xt:value>
    </cus:envValueAssignments>

    <cus:envValueAssignments>
      <xt:envValueType>Service URI Table</xt:envValueType>
      <xt:location xsi:nil="true"/>
      <xt:owner>
        <xt:type>BusinessService</xt:type>
        <xt:path>VenusOSB/BusinessServ/BS_ServCloudVenusInbound</xt:path>
      </xt:owner>
      <xt:value>
        <tableElement xmlns="http://www.bea.com/wli/sb/transports">
          <URI>@sfdc.protocol@://@sfdc.host@/services/service1</URI>
          <weight>1</weight>
        </tableElement>
      </xt:value>
    </cus:envValueAssignments>

    <cus:envValueAssignments>
      <xt:envValueType>Service URI</xt:envValueType>
      <xt:location>0</xt:location>
      <xt:owner>
        <xt:type>BusinessService</xt:type>
        <xt:path>VenusOSB/BusinessServ/BS_RCRMVenusInbound</xt:path>
      </xt:owner>
      <xt:value xsi:type="xs:string" xmlns:xs="http://www.w3.org/2001/XMLSchema">@siebel.protocol@://@siebel.host@/eai_enu/start.swe</xt:value>
    </cus:envValueAssignments>
    <cus:envValueAssignments>
      <xt:envValueType>Service URI Table</xt:envValueType>
      <xt:location xsi:nil="true"/>
      <xt:owner>
        <xt:type>BusinessService</xt:type>
        <xt:path>VenusOSB/BusinessServ/BS_RCRMVenusInbound</xt:path>
      </xt:owner>
      <xt:value>
        <tran:tableElement xmlns:tran="http://www.bea.com/wli/sb/transports">
          <tran:URI>@siebel.protocol@://@siebel.host@/eai_enu/start.swe</tran:URI>
          <tran:weight>1</tran:weight>
        </tran:tableElement>
      </xt:value>
    </cus:envValueAssignments>

  </cus:customization>



Monday, August 19, 2013

Issues while executiing the WLST script to customize the OSB

Issues while executiing the WLST script to customize the OSB

You may be receiving some of the below issues while executing the WLST script to customize the OSB projects.

ImportError: no module named wli: Make sure $OSBHOME/lib/sb-kernel-api.jar is added into the CLASSPATH.

ImportError: no module named customization: Make sure $OSBHOME/modules /com.bea.common.configfwk_1.5.0.0.jar added into the CLASSPATH.

java.lang.RuntimeException: java.lang.RuntimeException: java.lang.ClassNotFoundException: com.bea.wli.sb.management.configuration.DelegatedSessionManagementMBean: Make sure $OSBHOME/lib/sb-kernel-impl.jar added into the CLASSPATH.

 CLASSPATH=$CLASSPATH:$OSBHOME/modules/com.bea.common.configfwk_1.5.0.0.jar:$OSBHOME/lib/sb-kernel-api.jar:$OSBHOME/lib/sb-kernel-impl.jar;export CLASSPATH



Customizing the OSB Service through WLST script

Customizing the OSB Service through WLST script

This post will explain how to Customize the OSB Service through WLST script

The below WLST script will help us to run the OSB customization file.

import sys
from java.io import FileInputStream
from com.bea.wli.config.customization import Customization
from com.bea.wli.sb.management.importexport import ALSBImportOperation
from com.bea.wli.sb.management.configuration import ALSBConfigurationMBean
from com.bea.wli.sb.management.configuration import SessionManagementMBean

def customizeOSBService(customizationFile):
    SessionMBean = None
    try:
        connect('weblogic', 'welcome1', 't3://localhost:8000')
        domainRuntime()
        sessionName = String("Customization"+Long(System.currentTimeMillis()).toString())
        SessionMBean = findService("SessionManagement", "com.bea.wli.sb.management.configuration.SessionManagementMBean")
        SessionMBean.createSession(sessionName)
        OSBConfigurationMBean = findService(String("ALSBConfiguration.").concat(sessionName), "com.bea.wli.sb.management.configuration.ALSBConfigurationMBean")
        print 'Loading customization File', customizationFile
        iStream = FileInputStream(customizationFile)
        customizationList = Customization.fromXML(iStream)       
        OSBConfigurationMBean.customize(customizationList)
        SessionMBean.activateSession(sessionName, "Complete customization using wlst")
        disconnect()

    except:
        print "Unexpected error:", sys.exc_info()[0]
        if SessionMBean != None:
            SessionMBean.discardSession(sessionName)
        raise

def main():
       
        customizeOSBService('D:\Albin\ALSBCustomizationFile.xml')           
        print 'Successfully Completed customization'   
main()

Customization File:

Customization file will help us to modify the environment specific values for a OSB project.
The previous post can be referred for more details on customization file.

Modify the  environment specific values in the customization file.

Running the Script:

Login to the server and copy the wlst script and the Customization file to some location.
Execute the below two commands

CLASSPATH=$CLASSPATH:$OSBHOME/modules/com.bea.common.configfwk_1.5.0.0.jar:$OSBHOME/lib/sb-kernel-api.jar:$OSBHOME/lib/sb-kernel-impl.jar;export CLASSPATH

wlst.sh /home/eaiapp/Albin/OSBCustomization.wlst

Before executing the first command change the com.bea.common.configfwk_1.5.0.0.jar file version according to your environment.

After successful execution verify the service from OSB Console

  DOWNLOAD OSBCustomization.wlst