Showing posts with label Oracle SOA Suite. Show all posts
Showing posts with label Oracle SOA Suite. Show all posts

Friday, September 19, 2014

B2BConsole Reports page bug

Error while navigating the B2B Console Reports on SOA 11.1.1.7 I found this product bug.

Screen error message:

An unknown error occurred during data streaming.
Ask your System Administrator to inspect the server-side logs.

Serverlog error message:

####<17 1:56:14="" est="" pm=""> <[ACTIVE] ExecuteThread: '26' for queue: 'weblogic.kernel.Default (self-tuning)'> <> <1410926174698> java.lang.AssertionError
    at oracle.adfinternal.view.faces.renderkit.rich.table.TableRenderingContext.isCurrentCellInRowBanded(TableRenderingContext.java:283)
    at oracle.adfinternal.view.faces.renderkit.rich.table.TableRenderingContext.isCurrentCellBanded(TableRenderingContext.java:278)
    at oracle.adfinternal.view.faces.renderkit.rich.table.BaseColumnRenderer.renderDataCellClasses(BaseColumnRenderer.java:1218)
    at oracle.adfinternal.view.faces.renderkit.rich.table.BaseColumnRenderer.renderDataCell(BaseColumnRenderer.java:1364)
    at oracle.adfinternal.view.faces.renderkit.rich.table.BaseColumnRenderer.encodeAll(BaseColumnRenderer.java:105)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1432)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:358)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:840)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)

...

Caused:

There is a defect in B2B console reporting page, which may cause an internal server error when you want to display message instances. This happens when your WebLogic domain is configured to support Debug. to suppress this issue, add "-da:oracle... " to JAVA_OPTIONS in setDomainEnv.sh.

Resolution:

if "%debugFlag%"=="true" (
    @REM set JAVA_OPTIONS=%JAVA_OPTIONS% -da:org.apache.xmlbeans...
    set JAVA_OPTIONS=%JAVA_OPTIONS% -da:oracle...
)

Friday, July 18, 2014

Oracle SOA 12c (12.1.3) silent mode installation on Linux

Step-by-step guide to installing Oracle SOA 12c (12.1.3) in silent mode for Linux, though the same can be used Windows.

Download software

  1. Download fmw_12.1.3.0.0_soaqs_Disk1_1of1.zip bundle from http://www.oracle.com/technetwork/middleware/soasuite/downloads/index.html
  2. Download jdk-8u11-linux-x64.tar.gz from http://www.oracle.com/technetwork/java/javase/downloads/index.html

Preparation

Setting up user accounts and group.
[root@sandpit ~]# adduser oracle
[root@sandpit ~]# passwd oracle
[root@sandpit ~]# groupadd oinstall 
[root@sandpit ~]# usermod -a -G oinstall oracle

 Create the oraInst.loc file.
[root@sandpit ~]$ cat /etc/oraInst.loc
inst_group=oinstall
inventory_loc=/home/oracle/oraInventory


 Logon as oracle user and unpack the software.
[oracle@sandpit ~]$ su - oracle 
[oracle@sandpit ~]$ tar -xzvf jdk-8u11-linux-x64.tar.gz
[oracle@sandpit ~]$ /home/oracle/jdk1.8.0_11/bin/java -version
java version "1.8.0_11"
Java(TM) SE Runtime Environment (build 1.8.0_11-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.11-b03, mixed mode)

[oracle@sandpit ~]$ unzip fmw_12.1.3.0.0_soaqs_Disk1_1of1.zip
Archive:  fmw_12.1.3.0.0_soaqs_Disk1_1of1.zip
  inflating: fmw_12.1.3.0.0_soa_quickstart.jar 
  inflating: fmw_12.1.3.0.0_soa_quickstart2.jar


Prepare the Response file, call it say custom_installtype_soa12.1.3.rsp.
[oracle@sandpit ~]$ cat /home/oracle/custom_installtype_soa12.1.3.rsp

[ENGINE]

#DO NOT CHANGE THIS.

Response File Version=1.0.0.0.0

[GENERIC]

#Set this to true if you wish to specify a directory where latest updates are downloaded. This option would use the software updates from the specified directory

SPECIFY_DOWNLOAD_LOCATION=false

#

SKIP_SOFTWARE_UPDATES=true

#If the Software updates are already downloaded and available on your local system, then specify the path to the directory where these patches are available and set SPECIFY_DOWNLOAD_LOCATION to true

SOFTWARE_UPDATES_DOWNLOAD_LOCATION=

#Write the name of the Oracle Home directory. The Oracle Home directory name may only contain alphanumeric , hyphen (-) , dot (.) and underscore (_) characters, and it must begin with an alphanumeric character.

ORACLE_HOME=/home/oracle/fmw12_1_3_0


#Write the complete path to a valid Middleware Home.

MIDDLEWARE_HOME=/home/oracle/fmw12_1_3_0

#Set this to true if typical installation must be done. If this is set to true then variable "CUSTOM TYPE" must be set to false as the variables are mutually exclusive

TYPICAL TYPE=false

#Set this to true if custom installation must be done, all other required variables need to be provided. If this is set to true then variable "TYPICAL TYPE" must be set to false as the variables are mutually exclusive.

CUSTOM TYPE=true

[SYSTEM]

[APPLICATIONS]

[RELATIONSHIPS]

Dry run test

First run for prerequisite checks.
[oracle@sandpit ~]$ /home/oracle/jdk1.8.0_11/bin/java -jar fmw_12.1.3.0.0_soa_quickstart.jar -silent -responseFile /home/oracle/custom_installtype_soa12.1.3.rsp
Launcher log file is /tmp/OraInstall2014-07-18_11-35-27AM/launcher2014-07-18_11-35-27AM.log.
Extracting files......................................................................
Starting Oracle Universal Installer

Checking if CPU speed is above 300 MHz.   Actual 1999.999 MHz    Passed
Checking swap space: must be greater than 512 MBChecking if this platform requires a 64-bit JVM.   Actual 64    Passed (64-bit not required) 

Checking temp space: must be greater than 300 MB.   Actual 24743 MB    Passed

Some system prerequisite checks failed.
You must fulfill these requirements before continuing with the installation.

Exiting Oracle Universal Installer.
Log(s) for this session can be found in /tmp/OraInstall2014-07-18_11-35-27AM/launcher2014-07-18_11-35-27AM.log.


If the you the prerequisite failed at swap space error, run these additional commands.
[oracle@sandpit ~]$ su - root
[root@sandpit ~]# dd if=/dev/zero of=/swapfile bs=1M count=520
520+0 records in
520+0 records out
545259520 bytes (545 MB) copied, 0.880694 seconds, 619 MB/s
[root@sandpit ~]# mkswap /swapfile
Setting up swapspace version 1, size = 545255 kB
[root@sandpit ~]# swapon /swapfile


Run silent installation

[oracle@sandpit ~]$ /home/oracle/jdk1.8.0_11/bin/java -jar fmw_12.1.3.0.0_soa_quickstart.jar -silent -responseFile /home/oracle/custom_installtype_soa12.1.3.rsp
Launcher log file is /tmp/OraInstall2014-07-18_12-10-26PM/launcher2014-07-18_12-10-26PM.log.
Extracting files.........................................................
Starting Oracle Universal Installer

Checking if CPU speed is above 300 MHz.   Actual 1999.999 MHz    Passed
Checking swap space: must be greater than 512 MB.   Actual 532472 MB    Passed
Checking if this platform requires a 64-bit JVM.   Actual 64    Passed (64-bit not required)
Checking temp space: must be greater than 300 MB.   Actual 17987 MB    Passed


Preparing to launch the Oracle Universal Installer from /tmp/OraInstall2014-07-18_12-10-26PM
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0
Log: /tmp/OraInstall2014-07-18_12-10-26PM/install2014-07-18_12-10-26PM.log
Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
Reading response file..
Starting check : CertifiedVersions
Expected result: One of enterprise-4,enterprise-5,enterprise-6,redhat-6,redhat-4,redhat-5,SuSE-11
Actual Result: enterprise-5
Check complete. The overall result of this check is: Passed
CertifiedVersions Check: Success.
Starting check : CheckJDKVersion
Expected result: 1.7.0_15
Actual Result: 1.8.0_11
Check complete. The overall result of this check is: Passed
CheckJDKVersion Check: Success.
Validations are enabled for this session.
Verifying data......
Copying Files...
You can find the log of this install session at:
 /tmp/OraInstall2014-07-18_12-10-26PM/install2014-07-18_12-10-26PM.log
-----------20%----------40%----------60%----------80%--------100%

The installation of Oracle Fusion Middleware 12c SOA Quick Start 12.1.3.0.0 completed successfully.
Logs successfully copied to /home/oracle/oraInventory/logs.


That's all, enjoy!

Next step, creating the domain topology.

Monday, November 22, 2010

EDIFACT Document Identification with Oracle B2B

When receive a "document protocol identification error" on an inbound native EDI transaction set, it is possible that extraneous characters e.g. CR/LF at the end of the EDI have been added to the file. For example:
The following property setting will have Oracle B2B checks and removes them.

b2b.edi.enablePreprocess= true

The properties will need to be set in the System Mbean Browser within Enterprise manager.
Below are the steps to navigate to the System Mbean Browser, and how to invoke the B2B config Mbean.

  1. Login into Enterprise manager.
  2. Expand SOA
  3. Right click on soa-infra
  4. Select Administration
  5. Select System Mbean browser
  6. Expand Application Defined Mbeans
  7. Expand oracle.as.soainfra.config
  8. Expand the soa server domain
  9. Expand B2B config
  10. Select Operations
  11. Select addProperty
  12. Enter the desired property for the key, such as b2b.edi.enablePreprocess.
  13. Enter the value, true.
  14. Add any comments if desired.
  15. Invoke the mbean and check the b2b-config.xml that the property is reflected in the file.
  16. Restart the managed server.

Wednesday, November 10, 2010

Working with array in Oracle BPEL

This is an extension usage of array based from my previous post.

In the following example the variable Variable_whileLoopIteration is the iteration counter in the WHILE activity.

Reading from a specific element in an array:
<assign name="Extract_ProductName">
<copy>
<from expression="bpws:getVariableData('Variable_PurchaseOrder',concat('/ns1:purchaseOrder/ns1:items/ns1:item[',bpws:getVariableData('Variable_whileLoopIteration'),']/ns1:productName'))"/>
<to variable="Variable_productName"/>
</copy>
</assign>
Writing to a specific element in an array:
<assign name="Assign_NewProductNameToPO">
<copy>
<from expression="'NewProductName'"/>
<to variable="Variable_PurchaseOrder" query="/ns1:purchaseOrder/ns1:items/ns1:item[position() = bpws:getVariableData('Variable_whileLoopIteration')]/ns1:productName"/>
</copy>
</assign>

My advise is don't rely on JDeveloper Design view alone. Most of the time you have to manually edit the source to get it to do exactly what you want.

Tuesday, November 09, 2010

Convert Gregorian Date to JD Edwards Date in XSLT

Q: How to convert Gregorian Date to JDE Date in XSLT?

The format is C-YY-DDD, which is used by JD Edwards software: the century after 1900, the year in that century and the Julian date within that year.  Here are a few examples:

Checkout JDE Julian Date Converter tool by David Macek.

Important: Make sure you declare the XSLT version 2.0!
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="2.0">
...
<ns1:JDEDateNumber>
<xsl:variable name="InStringDate" select="'2010-11-09'"/>
<xsl:variable name="Year" select="substring($InStringDate,1,4)"/>
<xsl:variable name="ShortYear" select="substring($InStringDate,3,2)"/>
<xsl:variable name="StartOfYear" select='concat($Year,"-01-01")'/>
<xsl:value-of select="concat('1', $ShortYear, format-number(days-from-duration((xsd:date($InStringDate) - xsd:date($StartOfYear))) + 1, '000'))"/>
</ns1:JDEDateNumber>
...
</xsl:stylesheet>

Thursday, October 28, 2010

Configuring Oracle SOA Suite 11g with JDE on AS400 using JDBC

Awhile back I have attempted at using Oracle Application Adapter for JDE without much success, namely because there is no known customer currently. So I'm defaulting to JDBC as a means to connect to our JDE ERP8.

This is a guide for how to configure Oracle SOA Suite 11g to a JD Edwards ERP8 running on AS400 (iSeries). You will need to do these steps to setup your runtime environment.

  1. Download/extract IBM Toolkit for Java/JTOpen.
  2. Create a new directory, C:\Oracle\Middleware\wlserver_10.3\server\ext\jdbc\as400
  3. Copy the jt400.jar to C:\Oracle\Middleware\wlserver_10.3\server\ext\jdbc\as400\jt400.jar
  4. Edit C:\Oracle\Middleware\wlserver_10.3\common\bin\commEnv.cmd
  5. Append the new jar file in step (3) to the WEBLOGIC_CLASSPATH
  6. Restart both AdminServer and soa_server1.
  7. Goto Oracle Weblogic Administration Console (http://localhost:7001/console/)
  8. Navigate to soa_domain > Services > JDBC > Data Sources
  9. Add new JDBC Data Source, Name = AS400Connection, JNDI Name = jdbc/AS400Connection, Database Type = DB2 for i5/OS
  10. Database Driver as JTOpen's DB2 for i5/OS Driver (Type 4) IBM Toolkit for Java; Version 8.X, 9.X
  11. If you choose non-XA, remember to uncheck Supports Global Transactions.
  12. When prompted for the database port number, put in a temporary port as 60000.
  13. On the Test Database Connection screen, make sure you overwrite the database URL to match your environment, ie. jdbc:as400://JDESERVER;naming=DATASOURCE;errors=full.
  14. Deploy to target server soa_server1.
  15. If test connection failed with the error message "Cannot load driver: com.ibm.as400.access.AS400JDBCDriver", then repeat step (2) - (6)
  16. Next, create a new Outbound Connection Pool Configuration, Interface Name = javax.resource.cci.ConnectionFactory, JNDI Name = eis/DB/AS400Connection, dataSourceName = jdbc/AS400Connection.
  17. Save and run Update action on DBAdapter
  18. Done!

Tuesday, October 19, 2010

Looping over each nodes in Oracle BPEL

This is an example how to use WHILE loop in Oracle BPEL Process Manager 11g.



This example will be based on the JDEPurchaseOrders.xsd schema and the JDEPurchaseOrders.xml sample data.

Step 1, create another XSD to map your temporary data at for each node. Let's call it JDEPurchaseOrder.xsd.

Step 2, create variables based on the message type that contains this collection, and 2 counters, Variable_LoopRunningIndex for the running index, and Variable_LoopCounter for the length of the collection.As shown below:

    <variable name="Variable_LoopRunningIndex" type="xsd:integer"/>
    <variable name="Variable_LoopCounter" type="xsd:integer"/>
    <variable name="Variable_tempJDEPurchaseOrder" element="ns3:HEADER"/>

Step 3, initialise variables for looping.
    <assign name="Initialise_WhileLoop">
      <copy>
        <from expression="number(1)"/>
        <to variable="Variable_LoopRunningIndex"/>
      </copy>
      <copy>
        <from expression="ora:countNodes('Receive_JDEFlatfile_Read_InputVariable','body','/ns3:JDEPurchaseOrder/ns3:HEADER/ns3:ID') + 1"/>
        <to variable="Variable_LoopCounter"/>
      </copy>
    </assign> 
Step 4, implement BPEL while activity to loop over each node
    <while name="For_Each_Header_Record"
           condition="bpws:getVariableData('Variable_LoopRunningIndex') &lt; bpws:getVariableData('Variable_LoopCounter')">
      <bpelx:annotation>
        <bpelx:general>
          <bpelx:property name="userLabel">For_Each_Header_Record</bpelx:property>
        </bpelx:general>
      </bpelx:annotation>
      <sequence name="Split_Purchase_Order">
        <scope name="Scope_1">
        <!-- Declare scope variables -->
          <variables>
            <variable name="Variable_selector" type="xsd:string"/>
            <variable name="Variable_tempJDEPurchaseOrder" element="ns3:HEADER"/>
          </variables>
          <sequence name="Sequence_1">
          <!-- Map current node into temp struct -->
            <assign name="Create_tempJDEPurchaseOrder">
              <copy>
                <from expression="concat(&quot;/ns3:JDEPurchaseOrder/ns3:HEADER[&quot;, string(bpws:getVariableData('Variable_LoopRunningIndex')),&quot;]&quot;)"/>
                <to variable="Variable_selector"/>
              </copy>
              <copy>
                <from expression="bpws:getVariableData('Receive_JDEFlatfile_Read_InputVariable','body', bpws:getVariableData('Variable_selector'))"/>
                <to variable="Variable_tempJDEPurchaseOrder"/>
              </copy>
            </assign>
            <!-- Transform temp struct required output -->
            <assign name="XForm_tempJDEPurchaseOrder_to_EDIFACT">
              <bpelx:annotation>
                <bpelx:pattern>transformation</bpelx:pattern>
              </bpelx:annotation>
              <copy>
                <from expression="ora:processXSLT('xsl/XForm_tmpJDEPurchaseOrder2EDIFACT.xsl',bpws:getVariableData('Variable_tempJDEPurchaseOrder'))"/>
                <to variable="SendPurchaseOrder_send_InputVariable"
                    part="body"/>
              </copy>
            </assign>
            <!-- Send output to B2B to dispatch -->
            <invoke name="SendPurchaseOrder"
                    inputVariable="SendPurchaseOrder_send_InputVariable"
                    partnerLink="DispatchPurchaseOrder"
                    portType="ns2:B2B_send_ptt" operation="send">
              <bpelx:inputProperty name="b2b.documentProtocolVersion"
                                   variable="Variable_documentProtocolVersion"/>
              <bpelx:inputProperty name="b2b.documentTypeName"
                                   variable="Variable_documentTypeName"/>
              <bpelx:inputProperty name="b2b.toTradingPartnerId"
                                   variable="Variable_toTradingPartnerId"/>
            </invoke>
          </sequence>
        </scope>
        <!-- Increment the index and repeat next node -->
        <assign name="Increment_LoopRunningIndex">
          <copy>
            <from expression="bpws:getVariableData('Variable_LoopRunningIndex') + 1"/>
            <to variable="Variable_LoopRunningIndex"/>
          </copy>
        </assign>
      </sequence>
    </while>