Search This Blog

Oracle weblogic 10.3. Silent mode Installation through Script Windows / Linux

Oracle weblogic 10.3. Silent mode Installation through Script Windows / Linux 


Oracle weblogic Silent mode Installation :

               Most of the developers  use GUI mode to create domain during their initial days , but when the doing it regularly get bored to do the GUI installation .what is the alternative solution ??


Scripting  !!!!!!.........


But how to start ??? ... Every one knows Script work in Linux / UNIX / AIX  / Solaris ...

Scripting works in windows ??????

Answer Yes ....


Way to create :

 1. GUI
 2. Installation though Console mode
 3. Silent mode (   script  )


Always you 64 bit version JDK ..use generic .jar weblogic installer ....

>> java -d64  -jar wls1033_generic.jar -mode=silent -silent_xml=path_to_silent.xml
  
if you want additional Logs use below

–log=path_to_logfile.



or  only with mode=silent to enter manually 

>> java -d64  -jar wls1033_generic.jar -mode=silent

The installation can end with 3 different exit codes:

0: Successful installation.

1: Installation failed due to a fatal error.

Could be a missing directory or missing permissions to the file locations,
which you specified in your XML.

• 2: Installation failed due to an internal XML parsing error.

This is normally a typo or a missing quote in your XML files.
** Error during execution, error code = 65280"


Installation Script :



<?xml version="1.0" encoding="UFF-8"?>
<bea-installer>
<input-fields>
<data-value name="BEAHOME" value="D:\Oracle\Middleware_Home" />
<data-value name="WLS_INSTALL_DIR" value="D:\Oracle\Middleware_Home\wlserver_10.3" />
<data-value name="COMPONENT_PATHS"  value="WebLogic Server/Core Application Server|WebLogic Server/Administration Console
|WebLogic Server/Configuration Wizard and Upgrade Framework
|WebLogic Server/Web 2.0 HTTP Pub-Sub Server
|WebLogic Server/WebLogic JDBC Drivers
|WebLogic Server/Third Party JDBC Drivers
|WebLogic Server/WebLogic Server Clients
|WebLogic Server/WebLogic Web Server Plugins
|WebLogic Server/UDDI and Xquery Support
|WebLogic Server/Server
Examples|Oracle Coherence/Coherence Product Files" />
<data-value name="INSTALL_NODE_MANAGER_SERVICE" value="yes" />
<data-value name="NODEMGR_PORT" value="5559" />
<data-value name="INSTALL_SHORTCUT_IN_ALL_USERS_FOLDER" value="yes"/>
<data-value name="LOCAL_JVMS" value="C:\Java\jdk1.6.0_38"/>
</input-fields>
</bea-installer>



Create Domain using silent script :



WSTL ( Weblogic Script Tool Language )

Python + Java = Jython




Custom Logging using Log4j in BPEL Oracle BPM 11g


Custom Logging using Log4j in BPEL


Step1: Download log4j jar from apache website

http://logging.apache.org/log4j/1.2/download.html


Step 2:  Extract the zip file and use the log4j.jar file from that and put the jar file at the server so that all the applications can use it.

1. Copy the log4j.jar at the following location /Oracle_SOA1/soa/modules/oracle.soa.ext_11.1.1/

2. Open the command prompt and go the above location.

3. Set the following environment variables

ANT_HOME -where your ant is installed 

ANT_HOME=D:\Oracle\oracle_Home\modules\org.apache.ant_1.7.1

PATH -path to bin folder of ant

PATH= D:\Oracle\oracle_Home\modules\org.apache.ant_1.7.1\bin

JAVA_HOME -path to jdk 

JAVA_HOME =D:\Oracle\oracle_Home\jdk160_29\bin

4. Run the ant command.  (Type ant in cmd prompt).

5. Check the oracle.soa.ext.jar file in the path log4j.jar path gets added in the jar file

6. Restart the managed server.


Step3:  checking the class path is added to the external jars.

Go to $ORACLE_HOME/soa/modules/oracle.soa.ext_11.1.1 directory.

Open the oracle.soa.ext.jar.
The Existing MANIFEST file will look like below.

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.1
Created-By: 16.0-b13 (Sun Microsystems Inc.)
Implementation-Vendor: Oracle
Implementation-Title: Oracle SOA EXT
Implementation-Version: 11.1.1
Product-Name: Oracle SOA EXT
Product-Version: 11.1.1.3.0
Specification-Version: 11.1.1
Extension-Name: oracle.soa.ext
Class-Path: classes/

In my case it has added the following..

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.1
Created-By: 14.2-b01 (Sun Microsystems Inc.)
Implementation-Vendor: Oracle
Implementation-Title: Oracle SOA EXT
Implementation-Version: 11.1.1
Product-Name: Oracle SOA EXT
Product-Version: 11.1.1.4.0
Specification-Version: 11.1.1
Extension-Name: oracle.soa.ext
Class-Path: log4j-1.2.16.jar classes/

Step4:  create a property file log4j.properties file and place the file in some location say 

D:\Oracle\prop_file

 # logging: Log4j_BPEL
log4j.category.Log4j_BPEL=info,Log4j_BPEL
log4j.appender.Log4j_BPEL=org.apache.log4j.RollingFileAppender
log4j.appender.Log4j_BPEL.File=D:\\Log4j_BPEL.log
log4j.appender.Log4j_BPEL.MaxFileSize=5MB
log4j.appender.Log4j_BPEL.MaxBackupIndex=10
log4j.appender.Log4j_BPEL.layout=org.apache.log4j.PatternLayout
log4j.appender.Log4j_BPEL.layout.ConversionPattern=%d{ISO8601} %-5p [%t] [%c] [%x] %m%n

Step5: create a BPEL process 



Step6: copy the log4j-1.2.16.jar file to SCA-INF\lib

Step7: Import the log4j-1.2.16.jar file in the project properties.

Right click project->go to project Properties->Libraries and class path->add jars.


Step8: code inside the  java Embedding.

try{
         
     String sLog4jFile = "D:\\Oracle\\prop_file\\log4j.properties";                  
     PropertyConfigurator.configure(sLog4jFile);                  
     Logger logger = Logger.getLogger("Log4j_BPEL");           
     logger.info(">>>> This is from Java Embedding: " );           
     
     XMLElement input=        
      (XMLElement)getVariableData("inputVariable","payload","/client:process/client:input");              
      addAuditTrailEntry("input is: " + input.getTextContent());             
      logger.info("Input Value :"+input.getTextContent());     
      logger.warn("hi");  
      logger.debug("Test Application");  
         
}
catch(Exception e) {        
e.printStackTrace();         
}

Step9: Import the classes in .bpel file

<bpelx:exec import="org.apache.log4j.*"/>
 <bpelx:exec import="oracle.xml.parser.v2.XMLElement"/>

Deploy the composite and check log file gets created in the location mentioned in the properties file.


Thanks to Gopinath 



Human Task ( Payload ) Data Controls not refreshed when change happened in XSD ( BO )

Human Task ( Payload ) Data Controls not refreshed when change happened in XSD ( BO )


I came across the same problem few months ago. When ever I made some changes in BO ( Business Object ) created from XSD  datacontrols not refresh with my new changes .


Example : My  BO contains 3 elements.




ADF Data control :


Important :  when I created project in jdeveloper my complete system folder path.

C:\JDeveloper\mywork\DataControlsApp\DataControl_UI\


Reason why data controls not refreshed ?

Normally developers check in and check out  code on daily basics . Let us consider I check out my code in below system path


C:\JDeveloper\mywork\DataControlsApp\DataControl_UI\

Jdeveloper check before datacontrol refresh :



Step one   --   Open DataControl.dcx
Step Two  --   Open structure panel
Step Three -- Open  Property Inspector


Later point of time  I or my team mates check out my complete code base in some other location in same system or even a different machine let us assume 

D:\Mywork\Project\DataControlsApp\DataControl_UI\

If you see the system relative path in property inspector after Project path change. 


" Oh oh.......... "     --->  Humantask data control still point out to system path 

file:/C:/JDeveloper/mywork/DataControlsApp/DataControlsProject/xsd/DataControl_HumanTaskWorkflowTask.xsd


So no chance  for data control to refresh with new payload .

Solution :

1. Either create a same folder structure like  first created

C:\JDeveloper\mywork\DataControlsApp\DataControl_UI\

                                 or

2. change system relative path from C:\ to D:\ new location .


Best approach I suggest --- Go with First Solution .


Done ..............................................

No more pain .. bit relax ..............

ORA-12899: value too large for column "XXXXXX_SOAINFRA"."CUBE_INSTANCE"."PARENT_REF_ID" (actual: 183, maximum: 150)



ORA-12899: value too large for column "XXXXXX_SOAINFRA"."CUBE_INSTANCE"."PARENT_REF_ID" (actual: 183, maximum: 150)



most of the developer may face this issues , product bug in 11.1.1.6 ( RCU )


####<12-10-30 12:18:18> <Error> <EJB> <ngmlx474> <soa_dev01_BusinessServer01> <orabpel.invoke.pool-9.thread-16> <<anonymous>> <> <bf7983de9889d95f:-2434797f:13aa2dd1c6f:-8000-000000000005858b> <1351599498800> <BEA-010026> <Exception occurred during commit of transaction Name=[EJB oracle.bpm.bpmn.engine.ejb.impl.BPMNDeliveryBean.handleInvoke(java.lang.String,boolean)],Xid=BEA1-2ADBF765566162A5A6AB(465613166),Status=Rolled back. [Reason=Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.1.v20111018-r10243): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: ORA-12899: value too large for column "XXXXXXX_SOAINFRA"."CUBE_INSTANCE"."PARENT_REF_ID" (actual: 183, maximum: 150)


Solution :

The options available to solve this problem are
a) Modify the VARCHAR fields used by BPM so they store chars rather than bytes (using SQL)

b) Modify the database NLS_LENGTH_SEMANTICS parameter to indicate that VARCHAR fields are char-sized rather than byte-sized.


If NLS_LENGTH_SEMANTICS is set to BYTE in your database. We recommend to make this to set NLS_LENGTH_SEMANTICS = 'CHAR'


If you have other schemas also running in the database which dont support modifying the NLS_LENGTH_SEMANTICS = 'CHAR' then the option left is to modify the columns of the below tables which may raise the issue

using alter table modify column_name varchar(500) manually. Below are the list of columns that needs to be altered. Please take back up of the records which you are altering.


"SOAINFRA"."DLV_SUBSCRIPTION"."SUBSCRIBER_ID" 

"SOAINFRA"."BPM_AUDIT_QUERY"."FAULT_TYPE" 

"SOAINFRA"."WFTASK"."PARENTCOMPONENTINSTREFID" 

"SOAINFRA".""WFTASKHISTORY"."PARENTCOMPONENTINSTREFID" 

"SOAINFRA".""DLV_MESSAGE"."RES_SUBSCRIBER" 

"SOAINFRA"."CUBE_INSTANCE"."PARENT_REF_ID" 

"SOAINFRA"."WORK_ITEM"."CUSTOM_ID" 

"SOAINFRA".BPM_AUDIT_QUERY"."SCOPE_ID" 

"SOAINFRA"."WORK_ITEM"."NODE_ID" 

"SOAINFRA"."WORK_ITEM"."SCOPE_ID" 

"SOAINFRA"."BPM_CUBE_TASKPERFORMANCE"."SCOPEID"


Increase the size of these columns to 500.
Done...........................................................
Thank you

XSLT Mapping Simple Type to Complex Type ( MaxOccurs="unbounded" ) Oracle BPM 11g

XSLT Mapping Simple Type to Complex Type ( MaxOccurs="unbounded" )



XSL - XML Style Sheet 

Purpose of  XSL used to transform XML data from One form to another form. Let me show how to use
xslt to transform simple type to complex  type mapping.

Simple types:

Most of websites now a days have a provision to enter

PhoneNumber                            PhoneType

* Work Phone Number       -              01
* Mobile Phone Number     -              02
* Home Phone Number.      -              03


XSD Structure :


XSD Structure : (Simple Type) Flat Structure


<xsd:element name="SimpleEmelemnt">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="WorkPhoneNum" type="xsd:string"/>
        <xsd:element name="MobilePhoneNum" type="xsd:string"/>
        <xsd:element name="HomePhoneNum" type="xsd:string"/>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>



XSD Structure : ( Complex Type ) MaxOccurance - Unbound


<xsd:element name="ComplexElement">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="PhoneNum" type="PhoneNum" minOccurs="0" maxOccurs="unbounded"/>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>

    <xsd:complexType name="PhoneNum">
      <xsd:sequence>
        <xsd:element name="PhoneType" type="xsd:string"/>
        <xsd:element name="PhoneNumber" type="xsd:string"/>
      </xsd:sequence>
    </xsd:complexType>



XSLT Mapping Simple Type to Complex Type ( MaxOccurs="unbounded" )





XSL Mapping Using For-each


 <xsl:template match="/">
    <ns0:ComplexElement>

      <xsl:for-each select="/ns0:SimpleEmelemnt/ns0:WorkPhoneNum">
        <ns0:PhoneNum>
          <ns0:PhoneType>
            <xsl:text disable-output-escaping="no">01</xsl:text>
          </ns0:PhoneType>
          <ns0:PhoneNumber>
            <xsl:value-of select="."/>
          </ns0:PhoneNumber>
        </ns0:PhoneNum>
      </xsl:for-each>

      <xsl:for-each select="/ns0:SimpleEmelemnt/ns0:MobilePhoneNum">
        <ns0:PhoneNum>
          <ns0:PhoneType>
            <xsl:text disable-output-escaping="no">02</xsl:text>
          </ns0:PhoneType>
          <ns0:PhoneNumber>
            <xsl:value-of select="."/>
          </ns0:PhoneNumber>
        </ns0:PhoneNum>
      </xsl:for-each>

      <xsl:for-each select="/ns0:SimpleEmelemnt/ns0:HomePhoneNum">
        <ns0:PhoneNum>
          <ns0:PhoneType>
            <xsl:text disable-output-escaping="no">03</xsl:text>
          </ns0:PhoneType>
          <ns0:PhoneNumber>
            <xsl:value-of select="."/>
          </ns0:PhoneNumber>
        </ns0:PhoneNum>
      </xsl:for-each>
    </ns0:ComplexElement>
  </xsl:template>



Done .......................................................................
Thank you.

Error while connect Jdeveloper with remote weblogic

Error while  connect Jdeveloper with remote weblogic :

Most of the time I faced Status ( 9 out of 9 Failure ) error while connecting Remote weblogic server with my local Jdeveloper. Reason behind that


My Desktop connected with  corporate Network work and configured to Proxy. When I installed Jdeveloper automatically ,by default proxy setting configured belongs to my corporate Backbone.


Step to Clear :

Open Jdeveloper
                        -- > Tools
                                    ---> Preference
                                              --> web Browser and proxy
                                                              --> Un Check ( Use HTTP Proxy Server )























Step Two :


WS Policy Store
                      -- > select   (  App server Connection )
                                  -- > Point External Weblogic server 







Problem Solved .........




Business object update on XSD change and BOM export to xsd


 Business object update on XSD change and BOM export to xsd


Step 1: String( XML data ) to Oracle BPM Business Object ( BO ) Conversion


Method Name :


oraext:parseXML(xmlString)


 Example :


oraext:parseXML('<?xml version="1.0" encoding="UTF-8" ?><Adr AdrID="hn" AdrLine1Txt="hnh" AdrLine2Txt="nbnvb" CityNm="nbvnbn" CntyNm="bvnbvn" FlatNum="bvn" FullPstlCd="bnv" HseNm="nvbnbv" HseNum="bnb" xmlns="http://capitalone.com"/>') 


Step 2 : Oracle BPM Bussiness Object (BO) to String (XML data )


Method Name :


ora:doTranslateToNative()


 Example: 


ora:doTranslateToNative(bpmn:getDataObject('xsd_ProcessDataObject'),'xsd/Application_krishna.xsd','Application','STRING') 




Usage : 


bpmn:getDataObject('xsd_ProcessDataObject') --------------- Process Data Object 


'xsd/Application_krishna.xsd' ---------------- Response XSD to validate xml data


 'Application' ----------------- Root Element Attribute 


'STRING' ----------------- Conversion Format

oracle BPM 11g Log Handlers Example

Oracle BPM 11g Log Handlers Example


when ever  developer  create project  Log message is very important to track the status of Current Process instance data . This tutorial will explain how to create Log message and how to track values.Create synchronous webservice in start activity assign values in Log Handler  .



















open Enterprise manager :  http://localhost:7001/em





Test Webservice 













Final output Payload XML real time data .



OBPM 11g Email Configuration




OBPM 11g Email Configuration 

Step 1 :

http://localhost:7001/em
User Messaging Service -- >usermessagingdriver-email -- >Email Driver properties





Step 2 :


OutgoingMailServer - The SMTP hostname
OutgoingMailServerPort - The SMTP port
OutgoingMailServerSecurity - The type of security (e.g. SSL)
OutgoingUsername - The mail user account
OutgoingPassword - The mail user password



















Example :

OutgoingMailServer - smtp.gmail.com
OutgoingMailServerPort - 465
OutgoingMailServerSecurity - SSl




Step 3:



SOA -->SOA-Infra- > SOA Administration --> workflow Notification


















choose Email and clip apply








Download Openssl client from following site

www.openssl.org



openssl s_client -connect host:port
where Gmail SMTP host:port is smtp.gmail.com:465
where Gmail IMAP host:port is imap.gmail.com:993


















Save the file for both smtp and imap .















keytool available in java/bin >



keytool -import -alias AliasName -keystore KeystoreLocation -file CertificateLocation
For example:
keytool -import -alias gmail-imap -keystore gmail-keystore.jks -file imap.txt
keytool -import -alias gmail-smtp -keystore gmail-keystore.jks -file smtp.txt




















paste the below code in setDomainEnv.bat


set EXTRA_JAVA_PROPERTIES=%EXTRA_JAVA_PROPERTIES% -Djavax.net.ssl.trustStore=C:\Oracle\Middleware\SOA11g6\user_projects\domains\base_domain\servers\lib\gmail-keystore.jks -Djavax.net.ssl.trustStorePassword=Admin123



































Steps to clear ORA-04063: package body "DEV_MDS.MDS_INTERNAL_SHREDDED" Error

Steps to clear ORA-04063: package body  "DEV_MDS.MDS_INTERNAL_SHREDDED"  Error

Most of the time when you created SOA_Server "DEV_MDS.MDS_INTERNAL_SHREDDED"  error occur due to incomplete installation on RCU creation ( no need to Drop and create new Schema ).

Error Statement : 

<BEA-149205> <Failed to initialize the application 'soa-infra' due to error oracle.mds.exception.MDSExceptionList: MDS-01329: unable to load element "persistence-config"
MDS-01370: MetadataStore configuration for metadata-store-usage "soa-infra-store" is invalid. 
ORA-04063: package body "DEV_MDS.MDS_INTERNAL_SHREDDED" has errors
ORA-06508: PL/SQL: could not find program unit being called: "DEV_MDS.MDS_INTERNAL_SHREDDED"
ORA-06512: at line 1
oracle.mds.exception.MDSExceptionList: MDS-01329: unable to load element "persistence-config"
MDS-01370: MetadataStore configuration for metadata-store-usage "soa-infra-store" is invalid. 
ORA-04063: package body "DEV_MDS.MDS_INTERNAL_SHREDDED" has errors
ORA-06508: PL/SQL: could not find program unit being called: "DEV_MDS.MDS_INTERNAL_SHREDDED"
ORA-06512: at line 1
at oracle.mds.config.PConfig.loadFromBean(PConfig.java:684)
at oracle.mds.config.PConfig.loadFromBean(PConfig.java:517)
at oracle.mds.config.PConfig.<init>(PConfig.java:341)

Stop all your Server including Admin server and managed node server SOA_server1.

To clear this above Error , recompile DEV_MDS scheme , open SQL Developer  :

username : DEV_MDS
Password : *******

Compile all the package. Start admin server and Soa_server1 .

Error cleared ..


Oracle BPM 11g BAM Component Overview



Oracle BPM 11g BAM Component Overview



















step 1: http://localhost:9001/OracleBAM 
















1. Active Viewer --- >  Active Viewer is a interface for viewing Reports
















2. BPM Active Studio -- > using Active Studio user can create and Edit Reports



















3. BPM Architect  -- > user can create Data object , once the Data object created in BPM Architect , user can use the data object in BPM Active Studio .


















4 . BPM Administrator -- > add ,manage and delete users.

















BPM Architect  -- > provide data access to
1. Create Data object
2. Alerts
3.Enter price Message Source
4. External Data Source .
Create New Folder 





























Creating Data Object










































Create Report under BAM Active Studio 








select Chart type








Data Object created ( folder Name : krishna moorthi )


















Data Object ( krishna_DataObject )

















Select Data Object  Group By and Chart Values




Oracle BPM 11g WorkSpace Logo Change




  Oracle BPM 11g Work Space Logo Change :