Thursday, September 1, 2011

Calling custom APIs in BPEL using java embedding

Any Java API can be used in bpel using java embedding activity.Please follow the previous post of custom logging using log4j.Same approach can be used to call any Java API from BPEL

selectionFailure fault while updating the output variable in Java Embedding

In my java embedding i was updating the outvariable of the bpel  using the setVariable method.But i was getting the following error in doing so.
{{http://docs.oasis-open.org/wsbpel/2.0/process/executable}selectionFailure}

messageType: {{http://schemas.oracle.com/bpel/extension}RuntimeFaultMessage}
parts: {{
summary=
 
There can be 2 reasons for this either the Xapth expression is wrong.
Second in 11g before setting the value of the outvariable in java embedding it should be intialized.Put an assign activity before java embedding and  initialize the variable and than set the value in java embedding and it will work.

Custom logging in BPEL 2.0 using Log4j

We can use Java Embedding activity to do custom logging using log4j.
Download log4j
Extract the zip file and use the log4j.jar file from that.There are two approaches of using the jar file.
First approach is to put the jar file at the server so that all the applications can use it.
For  doing to do the following steps.
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 the above location.
3. Set the following enironment variables
ANT_HOME -where your ant is installed
PATH -path to bin folder of ant
JAVA_HOME -path to jdk
4.Run the ant command.
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.
Now create log4j.properties 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
Copy this file in any location on the server.Say D:\log4j.properties
Import the classes in .bpel file for bpel 2.0
          For importing the classes in bpel 1.1 use the following


importType="http://schemas.oracle.com/bpel/extension/java"/>


importType="http://schemas.oracle.com/bpel/extension/java"/>

Now in your java embedding activity enter the following java code
/*Write your java code below e.g.            
                System.out.println("Hello, World");           
*/           
try{    
String sLog4jFile = "D:\\log4j.properties";             
PropertyConfigurator.configure(sLog4jFile);             
Logger logger = Logger.getLogger("Log4j_BPEL");      
logger.info(">>>> Message log for instance: " + getTitle());         
XMLElement input= (XMLElement)getVariableData("inputVariable", "payload","/client:process/client:input");         
addAuditTrailEntry("input is: " + input.getTextContent());        
logger.info("Input Value :"+input.getTextContent());       
setVariableData("outputVariable","payload","/client:processResponse/client:result", input.getTextContent());    
}catch(Exception e)    
{    
e.printStackTrace();    
}

Deploy the composite and check log file gets created in the location mentioned in the properties file.
Other approach is to copy the log4j.jar in the composite folder under /SCA-INF/lib folder.

Monday, July 18, 2011

Tuesday, June 28, 2011

ORA-04063: package body "DEV_MDS.MDS_INTERNAL_SHREDDED" has errors

After installing oracle SOA Suite 11.1.1.5 on Oracle XE I was getting the following issue
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
 and the the soa server was not coming up.I followed the following steps and was able to run the server successfully.
  • Drop the SOA Schemas using the rcu.  
  • Connected to the  XE database server using the following steps and ran the following commands.
sqlpus
show parameter processes
by default “processes” should be 40. We should make it 300:
alter system set processes=300 scope=spfile;
conn / as sysdba
shutdown immediate
startup
conn / as sysdba
show parameter sga
alter system set sga_target=350M scope=spfile;
alter system set sga_max_size=350M scope=spfile;
shutdown immediate
startup

After fixing the above parameters.Set the following environmental variable and than run rcu.bat.
set RCU_JDBC_TRIM_BLOCKS=TRUE in the command prompt.
run rcu.bat from the command prompt.


Wednesday, May 25, 2011

Upgrading SOA Suite 11.1.1.4 to 11.1.1.5

Oracle has released the Oracle SOA Suite 11.1.1.5 and weblogic server 10.3.5.To Upgrade the SOA Suite from 11.1.1.4 to 11.1.1.5 follow the previous post of Upgrading WebLogic Server 10.3.4 to 10.3.5 and Upgrading Oracle SOA Suite 11.1.1.4 to 11.1.1.5.

Download the patch number 12395560 from support.oracle.com to upgrade to weblogic server 10.3.5.
Other softwares can be downloaded from the following link

http://www.oracle.com/technetwork/middleware/soasuite/downloads/index.html









Monday, April 11, 2011

Installing AIA Foundation Pack 11.1.1.4


PreRequisites for installing AIA Foundation Pack 11.1.1.4
  • Oracle SOA Suite 11.1.1.4.0
  • JDeveloper 11.1.1.4.0
  • AIA Foundation Pack Service Constructor for JDeveloper 11.1.1.4.0
    This extension creates Application Integration Architecture (AIA) Service Constructor to create an AIA based service component project. This extension is an online JDeveloper update. Start JDeveloper. From the menu choose Help > Check for Updates. In the Update Wizard, select Search Update Centers and ensure the first and second options are checked . Then ensure that Oracle AIA Foundation Pack Service Constructor is checked.
AIA Foundation Pack 11.1.1.4 which can be downloaded from the following link
http://www.oracle.com/technetwork/middleware/foundation-pack/downloads/fpdownloads-152617.html

Optional Softwares
  • Oracle Enterprise Repository
  • Oracle Service Registry
  • Oracle Business Process Analysis Suite
Start the node manager .Than start the weblogic server.Than start your soa_server from the admin console using the node manager.For starting the soa_server using the admin console goto servers>control and than start the server.It is mandatory to start the soa_server using the node manager.Once the servers are running,run the Setup.exe for the foundation pack.
Enter the JDK path.







Click on next and your installation is complete.
Note: I have not installed Oracle Service Registry and Oracle Service Repository so have skipped those screens while installation.

JAVA CAPS 6.3 Released

Oracle has released the next version of JAVA CAPS i.e 6.3.More can be read about it at the following link.
http://download.oracle.com/docs/cd/E21454_01/html/821-2528/gfishesbiplan_intro.html





Saturday, April 2, 2011

Enterprise Planning for Oracle Fusion Middeware

Anyone interested in doing planning and implementation for Oracle Fusion Middleware can use the following link as a startup for doing so.


http://download.oracle.com/docs/cd/E12839_01/cross.htm

Wednesday, February 16, 2011

How to uninstall Jdeveloper 11g

  • Go to the Oracle_home\utils\uninstall folder.
  • Click on uninstall.exe
  • Follow the screens than

Upgrading Oracle SOA Suite 11.1.1.3 to 11.1.1.4


           

     
  • Go to the ORACLE_SOA1\BIN using the command prompt and type the following command D:\fmw11g\Oracle_SOA1\bin>psa.bat -dbType Oracle -dbConnectString //localhost:15   21/orcl -dbaUserName system -schemaUserName DEV_SOAINFRA
  • After the command is completed successfully go the the database and type the following command version, status FROM schema_version_registry WHERE owner='DEV_SOAINFRA'.You will get version as 11.1.1.4 and status as valid.
    SELECT
  • Run the purge scripts.
  • Extract ofm_rcu_linux_11.1.1.4.0_disk1_1of1.zip.
  • Go the path rcuHome\rcu\integration\soainfra\sql\soa_purge using the sqlplus and run the following commands on the DEV_SOAINFRA schema
@D:\Softwares\11g\ofm_rcu_win_11.1.1.4.0_disk1_1of1\rcuHome\rcu\integration\soainfra\sql\soa_purge\soa_purge_scripts.sql

@@D:\Softwares\11g\ofm_rcu_win_11.1.1.4.0_disk1_1of1\rcuHome\rcu\integration\soainfra\sql\verify\soa_verify_scripts.sql         

  • After running the above commands go to the fmw11g\oracle_common\common\bin run the following commands setWlstEnv.cmd and than wlst.cmd
  • At wlst.cmd run the command upgradeJRF('D:\\fmw11g\\user_projects\\domains\\soa_domain')
  • than run the command upgradeOpss(jpsConfig="D:\\fmw11g\\user_projects\\domains\\soa_domain\\config\\fmwconfig\\jps-config.xml", jaznData="D:\\fmw11g\\oracle_common\\modules\\oracle.jps_11.1.1\\domain_config\\system-jazn-data.xml")
  • Go the path D:\fmw11g\user_projects\domains\soa_domain\bin using the command prompt and type startWebLogic.cmd

  • Go the path D:\fmw11g\user_projects\domains\soa_domain\bin using the command prompt and type startManagedWebLogic.cmd soa_server1

             

               
         




Upgrade WebLogic 10.3.3 to 10.3.4 in Windows XP

  •  Login to http://support.oracle.com/
  • Go to Patches & Update Tab
  • Go to Product or Family (Advanced Search)
  • Select the following details for windows

  • Download Patch p11060958_1034_WINNT for windows
  • Extract Patch p11060958_1034_WINNT
  • Run wls1034_upgrade_win32.exe

                                         
                                            
            

                

                  


                                                
             
 



Wednesday, February 2, 2011

New Oracle AIA - Foundation Pack 11gR1 PS3 (11.1.1.4.0) Released !!!

Oracle has released the SOA Suite Patchset PS3(11.1.1.4) and the corresponding Weblogic Server  10.4 and rcu 11.1.1.4.

Along with that it has also release Oracle AIA - Foundation Pack 11gR1 PS3 (11.1.1.4.0) .The details can be read from
http://www.oracle.com/technetwork/middleware/foundation-pack/documentation/index.html#111140