SOA 11.1.1.6 supports spring framework 2.5.6 , while , mybatis-spring requires spring 3.0.0 or higher.
Hence , it would not be possible to use mybatis within SOA composites.
Even if we include spring-beans-3.1.0 libraries with the composite (under SCA-INF/lib)
we would encounter exception MalformedParameterizedTypeException during
deployment because the fabric engine would only have access to the spring library from the classpath
[spring library used by fabric
: MW_HOME/common/modules/org.springframework_2.5.jar]
mybatis source files are all compiled using spring 3.0 libraries.
The mybatis class SqlSessionFactoryBean implements a parametrized
FactoryBean<SqlSessionFactory> which is only available in spring-beans 3.0
and not 2.5.6.
So when the fabric engine tries to create a bean for SqlSessionFactoryBean
using spring 2.5.6 libraries , it fails with
MalformedParameterizedTypeException .
CODE SNIPPETS:
---------------
mybatis :
org.mybatis.spring.SqlSessionFactoryBean implements
FactoryBean<SqlSessionFactory>
spring 3.0 :
org.springframework.beans.factory.public interface FactoryBean<T>
spring 2.5.6 :
org.springframework.beans.factory.public interface FactoryBean
Since mybatis is not compatible with spring 2.5.6 and SOA does not support
spring 3.0 as yet , we cannot use mybatis with SOA. I've confirmed that SOA
11.1.1.6 does not support spring 3.0 from both the product management and
spring development team.
Thursday, 11 July 2013
SOA 10.1.3.5 on WLS as a windows service
PROBLEM STATEMENT:
-----------------
When attempting to start SOA 10.1.3.5 on WLS as a windows service , the following exception
is observed:
java.lang.NoClassDefFoundError: oracle/tip/adapter/db/IDBConnection
java.lang.NoClassDefFoundError: oracle/tip/adapter/db/DBConnectionFactory
on: java.lang.NoClassDefFoundError: oracle/toplink/platform/server/was/WebSphere_5_1_Platform.
java.lang.NoClassDefFoundError: oracle/tip/esb/model/repository/Repository
java.lang.NoClassDefFoundError: com/cfluent/log4j/Category
etc.....
EXPLANATION & RESOLUTION
-------------------------
The NoClassDefFoundError is encountered because some required libraries are missing from the CLASSPATH.
Check for the following pointers:
A. Missing absolute directory in java.class.path -
java.class.path = \toplink\jlib\toplink.jar;\lib\xmlparserv2.jar;........
\bpel\domains\default\tmp\.generated;\bpel\system\classes ......
\bpel\lib\oracle.soa.10.1.3.5.0.jar;\soa\connectors\oracle.soa.adapters.10.1.3
.5.0.jar.........
B. Missing absolute directory in orabpel.home/oraesb.home -
orabpel.home = \bpel
oraesb.home = \integration\esb
C. Missing entry for environment variable : oracle.home
The classpath entries and the environment variables (orabpel.home ,
oraesb.home,oracle.home) should be preceded by absolute SOA_HOME directory.
This value is made available via the environment variable SOA10G_ORACLE_HOME
in setDomainEnv.cmd
Snippet of setDomainEnv.cmd:
set SOA10G_ORACLE_HOME=C:\product\10.1.3.1\SOAWLS\OracleSOA
.....
-Doracle.home=%SOA10G_ORACLE_HOME% -Dorabpel.home=%SOA10G_ORACLE_HOME%\bpel
-Doraesb.home=%SOA10G_ORACLE_HOME%\integration\esb
.....
EXT_PRE_CLASSPATH=%SOA10G_ORACLE_HOME%\toplink\jlib\toplink.jar;%SOA10G_ORACLE
_HOME%\lib\xmlparserv2.jar
....
POST_CLASSPATH= ....
%SOA10G_ORACLE_HOME%\bpel\lib\oracle.soa.10.1.3.5.0.jar;%SOA10G_ORACLE_HOME%\s
oa\connectors\oracle.soa.adapters.10.1.3.5.0.jar ....
The value of SOA10G_ORACLE_HOME is used in setDomainEnv.cmd to prepend the
SOA_HOME to the variables. However , in the somes cases the value for
SOA10G_ORACLE_HOME seems to be empty ("") , hence the system properties ,
classpath entries etc.. are built incorrectly.
SOLUTION 1: RE-INSTALL SOA AS WINDOWS SERVICE
----------------------------------------------
Please make sure that the value for SOA10G_ORACLE_HOME in setDomainEnv.cmd
points to the SOA_HOME.
(e.g)set SOA10G_ORACLE_HOME=C:\product\10.1.3.1\WLS\OracleSOA
.
Uninstall the SOA Window Service.
Re-Install the SOA Window Service
Start SOA server.
The log should indicate the environment variables as follows :
orabpel.home = C:\product\10.1.3.1\SOAWLS\OracleSOA\bpel
oracle.home = C:\product\10.1.3.1\SOAWLS\OracleSOA
oraesb.home = C:\product\10.1.3.1\SOAWLS\OracleSOA\integration\esb
.....
java.class.path =
C:\product\10.1.3.1\SOAWLS\OracleSOA\toplink\jlib\toplink.jar;C:\product\10.1.
3.1\SOAWLS\OracleSOA\lib\xmlparserv2.jar;
........
.
SOLUTION 2:MODIFY THE REGISTRY MANUALLY
---------------------------------------
From Registry Editor , navigate to
HKEY_LOCAL_MACHINE->SYSTEM->CurrentControlSet->Services->{SOA_SERVICE}->Parame
ters->
Copy the Value Data for CmdLine into a Text Editor.
[make sure to back up the original values]
Search for "-classpath" . prepend the value for SOA10G_ORACLE_HOME to the
following libraries :
{SOA10G_ORACLE_HOME}\toplink\jlib\toplink.jar;
{SOA10G_ORACLE_HOME}\lib\xmlparserv2.jar;
{SOA10G_ORACLE_HOME}\bpel\domains\default\tmp\.generated;
{SOA10G_ORACLE_HOME}\bpel\system\classes;
{SOA10G_ORACLE_HOME}\bpel\system\services\config;
{SOA10G_ORACLE_HOME}\bpel\system\services\schema;
{SOA10G_ORACLE_HOME}\integration\esb\config;
{SOA10G_ORACLE_HOME}\integration\esb\system\classes;
{SOA10G_ORACLE_HOME}\owsm\lib\custom;
{SOA10G_ORACLE_HOME}\bpel\lib\oracle.soa.10.1.3.5.0.jar;
{SOA10G_ORACLE_HOME}\soa\connectors\oracle.soa.adapters.10.1.3.5.0.jar;
.
Search for -Dorabpel.home & -Doraesb.home . prepend the value for
SOA10G_ORACLE_HOME
-Dorabpel.home={SOA10G_ORACLE_HOME}\bpel
-Doraesb.home={SOA10G_ORACLE_HOME}\integration\esb
Add a new entry for oracle.home
-Doracle.home={SOA10G_ORACLE_HOME}
Where {SOA10G_ORACLE_HOME} = PATH_TO_SOA
(e.g) C:\product\10.1.3.1\SOAWLS\OracleSOA
Paste the modified value into CmdLine.
Start SOA server.
The log should indicate the environment variables as follows :
orabpel.home = C:\product\10.1.3.1\SOAWLS\OracleSOA\bpel
oracle.home = C:\product\10.1.3.1\SOAWLS\OracleSOA
oraesb.home = C:\product\10.1.3.1\SOAWLS\OracleSOA\integration\esb
.....
java.class.path =
C:\product\10.1.3.1\SOAWLS\OracleSOA\toplink\jlib\toplink.jar;C:\product\10.1.
3.1\SOAWLS\OracleSOA\lib\xmlparserv2.jar;
........
-----------------
When attempting to start SOA 10.1.3.5 on WLS as a windows service , the following exception
is observed:
java.lang.NoClassDefFoundError: oracle/tip/adapter/db/IDBConnection
java.lang.NoClassDefFoundError: oracle/tip/adapter/db/DBConnectionFactory
on: java.lang.NoClassDefFoundError: oracle/toplink/platform/server/was/WebSphere_5_1_Platform.
java.lang.NoClassDefFoundError: oracle/tip/esb/model/repository/Repository
java.lang.NoClassDefFoundError: com/cfluent/log4j/Category
etc.....
EXPLANATION & RESOLUTION
-------------------------
The NoClassDefFoundError is encountered because some required libraries are missing from the CLASSPATH.
Check for the following pointers:
A. Missing absolute directory in java.class.path -
java.class.path = \toplink\jlib\toplink.jar;\lib\xmlparserv2.jar;........
\bpel\domains\default\tmp\.generated;\bpel\system\classes ......
\bpel\lib\oracle.soa.10.1.3.5.0.jar;\soa\connectors\oracle.soa.adapters.10.1.3
.5.0.jar.........
B. Missing absolute directory in orabpel.home/oraesb.home -
orabpel.home = \bpel
oraesb.home = \integration\esb
C. Missing entry for environment variable : oracle.home
The classpath entries and the environment variables (orabpel.home ,
oraesb.home,oracle.home) should be preceded by absolute SOA_HOME directory.
This value is made available via the environment variable SOA10G_ORACLE_HOME
in setDomainEnv.cmd
Snippet of setDomainEnv.cmd:
set SOA10G_ORACLE_HOME=C:\product\10.1.3.1\SOAWLS\OracleSOA
.....
-Doracle.home=%SOA10G_ORACLE_HOME% -Dorabpel.home=%SOA10G_ORACLE_HOME%\bpel
-Doraesb.home=%SOA10G_ORACLE_HOME%\integration\esb
.....
EXT_PRE_CLASSPATH=%SOA10G_ORACLE_HOME%\toplink\jlib\toplink.jar;%SOA10G_ORACLE
_HOME%\lib\xmlparserv2.jar
....
POST_CLASSPATH= ....
%SOA10G_ORACLE_HOME%\bpel\lib\oracle.soa.10.1.3.5.0.jar;%SOA10G_ORACLE_HOME%\s
oa\connectors\oracle.soa.adapters.10.1.3.5.0.jar ....
The value of SOA10G_ORACLE_HOME is used in setDomainEnv.cmd to prepend the
SOA_HOME to the variables. However , in the somes cases the value for
SOA10G_ORACLE_HOME seems to be empty ("") , hence the system properties ,
classpath entries etc.. are built incorrectly.
SOLUTION 1: RE-INSTALL SOA AS WINDOWS SERVICE
----------------------------------------------
Please make sure that the value for SOA10G_ORACLE_HOME in setDomainEnv.cmd
points to the SOA_HOME.
(e.g)set SOA10G_ORACLE_HOME=C:\product\10.1.3.1\WLS\OracleSOA
.
Uninstall the SOA Window Service.
Re-Install the SOA Window Service
Start SOA server.
The log should indicate the environment variables as follows :
orabpel.home = C:\product\10.1.3.1\SOAWLS\OracleSOA\bpel
oracle.home = C:\product\10.1.3.1\SOAWLS\OracleSOA
oraesb.home = C:\product\10.1.3.1\SOAWLS\OracleSOA\integration\esb
.....
java.class.path =
C:\product\10.1.3.1\SOAWLS\OracleSOA\toplink\jlib\toplink.jar;C:\product\10.1.
3.1\SOAWLS\OracleSOA\lib\xmlparserv2.jar;
........
.
SOLUTION 2:MODIFY THE REGISTRY MANUALLY
---------------------------------------
From Registry Editor , navigate to
HKEY_LOCAL_MACHINE->SYSTEM->CurrentControlSet->Services->{SOA_SERVICE}->Parame
ters->
Copy the Value Data for CmdLine into a Text Editor.
[make sure to back up the original values]
Search for "-classpath" . prepend the value for SOA10G_ORACLE_HOME to the
following libraries :
{SOA10G_ORACLE_HOME}\toplink\jlib\toplink.jar;
{SOA10G_ORACLE_HOME}\lib\xmlparserv2.jar;
{SOA10G_ORACLE_HOME}\bpel\domains\default\tmp\.generated;
{SOA10G_ORACLE_HOME}\bpel\system\classes;
{SOA10G_ORACLE_HOME}\bpel\system\services\config;
{SOA10G_ORACLE_HOME}\bpel\system\services\schema;
{SOA10G_ORACLE_HOME}\integration\esb\config;
{SOA10G_ORACLE_HOME}\integration\esb\system\classes;
{SOA10G_ORACLE_HOME}\owsm\lib\custom;
{SOA10G_ORACLE_HOME}\bpel\lib\oracle.soa.10.1.3.5.0.jar;
{SOA10G_ORACLE_HOME}\soa\connectors\oracle.soa.adapters.10.1.3.5.0.jar;
.
Search for -Dorabpel.home & -Doraesb.home . prepend the value for
SOA10G_ORACLE_HOME
-Dorabpel.home={SOA10G_ORACLE_HOME}\bpel
-Doraesb.home={SOA10G_ORACLE_HOME}\integration\esb
Add a new entry for oracle.home
-Doracle.home={SOA10G_ORACLE_HOME}
Where {SOA10G_ORACLE_HOME} = PATH_TO_SOA
(e.g) C:\product\10.1.3.1\SOAWLS\OracleSOA
Paste the modified value into CmdLine.
Start SOA server.
The log should indicate the environment variables as follows :
orabpel.home = C:\product\10.1.3.1\SOAWLS\OracleSOA\bpel
oracle.home = C:\product\10.1.3.1\SOAWLS\OracleSOA
oraesb.home = C:\product\10.1.3.1\SOAWLS\OracleSOA\integration\esb
.....
java.class.path =
C:\product\10.1.3.1\SOAWLS\OracleSOA\toplink\jlib\toplink.jar;C:\product\10.1.
3.1\SOAWLS\OracleSOA\lib\xmlparserv2.jar;
........
BPM WORKLIST User & Group Rules
Consider the following LDAP set-up:
Users - user1;user2;user3;adminuser
Group - group1
user1 & user2 are members of group1
adminuser has administrator privileges and is the owner of group1.
Use-Case 1 - User Rules:
--------------------------
1. A task is assigned to group1.
<participant name="default.DefaultPerformer">
<resource type="STATIC" identityType="group">group1</resource>
</participant>
2. Logging in as adminuser(owner of group1) into BPM Workspace , navigate to
Preferences -> Rules -> My Rules
3. Add a new User Rule with the following action {Assign To -> user3)
4. Execute the task from BPM workspace as adminuser.
Customer's Expectation:
The rule should take effect and the task should be assigned to user3.
Observed Behavior:
The task is assigned to group1
Expected Behavior:
The task should be assigned to group1 and not user3.
.
Reason:
The rules configured (both User & Group) would come into effect only when a task reaches the actual recipient.
(i.e) for a Group Rule to execute , the task should first reach the group,
then the rules specified for that particular group would take effect
Similarly,for a User Rule to execute , the task should first reach the user,
then the rules specified for that user would take effect
In this use-case , the task is assigned to a Group(group1), since there is no
Group Rule specified for group1 , the task remains with group1.
Now ,if the customer expects to configure a User Rule for the task , then:
1. The task should be assigned to an user , lets say user1
2. Logging in as user1 into BPM Workspace , navigate to
Preferences -> Rules -> My Rules
3. Add a new User Rule with the following action {Assign To -> user3)
(or)
2A. Logging in as as user with administrative rights (adminuser)into BPM
Workspace , navigate to Preferences -> Rules -> Other Rules
3A. Search for "user1" ,add a new User Rule with the following action {Assign To -> user3)
In this case , the task would first reach the intended recipient(user1),then
the rules engine would check for any rules specified for that user(user1).
Since user1 has a rule , the rule would be executed and the task assigned to user3.
So , to re-iterate , When a task is assigned to a Group
- the rules specified for the Group will take effect.
If the customer expects a User rule to be invoked , the task needs to be assigned to an user.
Use-Case 2 - Group Rules:
-------------------------
1. A task is assigned to group1.
<participant name="default.DefaultPerformer">
<resource type="STATIC" identityType="group">group1</resource>
</participant>
2. Logging in as adminuser(owner of group1) into BPM Workspace , navigate to
Preferences -> Rules -> My Rules
3. Add a new Group Rule (under group1) with the following action {Assign To
-> user3)
4. Execute the task from BPM workspace as adminuser.
Customer's Expectation:
The rule should take effect and the task should be assigned to user3.
Observed Behavior:
The task is assigned to group1
Expected Behavior:
The rule should take effect and the task should be assigned to user3.
For Group Rules to be executed , the following conditions needs to be met:
1. The group in LDAP should have an owner specified
2. The group's owner should create the Group Rules
3. The group needs to appear in the Preferences -> Rules -> My Rules tab for
the group owner
When these conditions are met , the conditions of the Rule gets executed as
expected.
Users - user1;user2;user3;adminuser
Group - group1
user1 & user2 are members of group1
adminuser has administrator privileges and is the owner of group1.
Use-Case 1 - User Rules:
--------------------------
1. A task is assigned to group1.
<participant name="default.DefaultPerformer">
<resource type="STATIC" identityType="group">group1</resource>
</participant>
2. Logging in as adminuser(owner of group1) into BPM Workspace , navigate to
Preferences -> Rules -> My Rules
3. Add a new User Rule with the following action {Assign To -> user3)
4. Execute the task from BPM workspace as adminuser.
Customer's Expectation:
The rule should take effect and the task should be assigned to user3.
Observed Behavior:
The task is assigned to group1
Expected Behavior:
The task should be assigned to group1 and not user3.
.
Reason:
The rules configured (both User & Group) would come into effect only when a task reaches the actual recipient.
(i.e) for a Group Rule to execute , the task should first reach the group,
then the rules specified for that particular group would take effect
Similarly,for a User Rule to execute , the task should first reach the user,
then the rules specified for that user would take effect
In this use-case , the task is assigned to a Group(group1), since there is no
Group Rule specified for group1 , the task remains with group1.
Now ,if the customer expects to configure a User Rule for the task , then:
1. The task should be assigned to an user , lets say user1
2. Logging in as user1 into BPM Workspace , navigate to
Preferences -> Rules -> My Rules
3. Add a new User Rule with the following action {Assign To -> user3)
(or)
2A. Logging in as as user with administrative rights (adminuser)into BPM
Workspace , navigate to Preferences -> Rules -> Other Rules
3A. Search for "user1" ,add a new User Rule with the following action {Assign To -> user3)
In this case , the task would first reach the intended recipient(user1),then
the rules engine would check for any rules specified for that user(user1).
Since user1 has a rule , the rule would be executed and the task assigned to user3.
So , to re-iterate , When a task is assigned to a Group
- the rules specified for the Group will take effect.
If the customer expects a User rule to be invoked , the task needs to be assigned to an user.
Use-Case 2 - Group Rules:
-------------------------
1. A task is assigned to group1.
<participant name="default.DefaultPerformer">
<resource type="STATIC" identityType="group">group1</resource>
</participant>
2. Logging in as adminuser(owner of group1) into BPM Workspace , navigate to
Preferences -> Rules -> My Rules
3. Add a new Group Rule (under group1) with the following action {Assign To
-> user3)
4. Execute the task from BPM workspace as adminuser.
Customer's Expectation:
The rule should take effect and the task should be assigned to user3.
Observed Behavior:
The task is assigned to group1
Expected Behavior:
The rule should take effect and the task should be assigned to user3.
For Group Rules to be executed , the following conditions needs to be met:
1. The group in LDAP should have an owner specified
2. The group's owner should create the Group Rules
3. The group needs to appear in the Preferences -> Rules -> My Rules tab for
the group owner
When these conditions are met , the conditions of the Rule gets executed as
expected.
Oracle Business Rules : Generating Xml Facts from schema - JAXB Restriction
PROBLEM STATEMENT:
-----------------
Consider the following schema structure:
<xsd:element name="Airport" type="Airport_Type"/>
<xsd:complexType name="Airport_Type">
<xsd:sequence>
<xsd:element ref="AirportTypeCd" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="AirportTypeCd" type="AirportType"/>
<xsd:complexType name="AirportType">
<xsd:sequence>
<xsd:element name="input" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
From Jdeveloper , create business rule based on the above schema.
Click on the "Create" XML Facts Icon in Business Rules.
Add the above schema
In the "Target Classes" frame , expand the tree structure.The structure would be :
org->test-> xml
-> AirportType
-> OjectFactory
Notice that the JAXB Class corresponding to element "Airport_Type" is missing.
EXPLANATION:
-------------------
The rules engine (and SOA in general) rely on glass-fish JAXB libraries for
converting XML facts to Java and vice-verse.
As per the default JAXB implementation , the JAXB engine ignores underscore
characters in the element's name when converting XML elements to JAXB classes.
(i.e)
An element like <xsd:complexType name="Airport_Type">
would be converted to a JAXB class "AirportType.class"
In general this default behavior should not be an issue , however in this case , the schema also contains another element with name <xsd:complexType name="AirportType">
When JAXB attempts to convert element "AirportType" into a JAXB class , it fails with the error
An error was encountered while migrating JAXB
A class/interface with the same name "org.test.AirportType" is already in use
This happens because the element Airport_Type was converted to AirportType.class as well.
The solution would be to use a custom binding and inform JAXB to retain
underscore elements as-is when converting them to JAXB classes.
This binding customizes JAXB's default implementation to not ignore
underscore's via : <jaxb:globalBindings underscoreBinding="asCharInWord"/>
[Refer to
http://docs.oracle.com/cd/E17802_01/webservices/webservices/docs/1.5/tutorial/doc/JAXBUsing4.html
for more details]
-----------------
Consider the following schema structure:
<xsd:element name="Airport" type="Airport_Type"/>
<xsd:complexType name="Airport_Type">
<xsd:sequence>
<xsd:element ref="AirportTypeCd" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="AirportTypeCd" type="AirportType"/>
<xsd:complexType name="AirportType">
<xsd:sequence>
<xsd:element name="input" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
From Jdeveloper , create business rule based on the above schema.
Click on the "Create" XML Facts Icon in Business Rules.
Add the above schema
In the "Target Classes" frame , expand the tree structure.The structure would be :
org->test-> xml
-> AirportType
-> OjectFactory
Notice that the JAXB Class corresponding to element "Airport_Type" is missing.
EXPLANATION:
-------------------
The rules engine (and SOA in general) rely on glass-fish JAXB libraries for
converting XML facts to Java and vice-verse.
As per the default JAXB implementation , the JAXB engine ignores underscore
characters in the element's name when converting XML elements to JAXB classes.
(i.e)
An element like <xsd:complexType name="Airport_Type">
would be converted to a JAXB class "AirportType.class"
In general this default behavior should not be an issue , however in this case , the schema also contains another element with name <xsd:complexType name="AirportType">
When JAXB attempts to convert element "AirportType" into a JAXB class , it fails with the error
An error was encountered while migrating JAXB
A class/interface with the same name "org.test.AirportType" is already in use
This happens because the element Airport_Type was converted to AirportType.class as well.
The solution would be to use a custom binding and inform JAXB to retain
underscore elements as-is when converting them to JAXB classes.
This binding customizes JAXB's default implementation to not ignore
underscore's via : <jaxb:globalBindings underscoreBinding="asCharInWord"/>
[Refer to
http://docs.oracle.com/cd/E17802_01/webservices/webservices/docs/1.5/tutorial/doc/JAXBUsing4.html
for more details]
Environment variables substitution in soa deployment plan
PROBLEM
---------------
1. Create a 'hello world' composite calling another hello1 composite
2. Create a deployment plan:
Jdeveloper -> composite.xml -> right click -> Generate deployment plan.
3. In the deployment plan change from
<replace>http://host:8001/soa-infra/services/default/hello1/bpelhello1_client_ep?WSDL</replace>
to
<replace>http://host:8001/soa-infra/services/default/${my_composite}/bpelhello1_client_ep?WSDL</replace>
where hello1 is changed to ${my_composite} as documented here:
4. Deploy composite.
5. Start soa_server with the following option: -Dmy_composite=hello1
During runtime the following error occurs:
<remoteFault>
<part name="summary">
<summary>oracle.fabric.common.FabricException: Cannot read WSDL
"{http://xmlns.oracle.com/bpel_owsm_osb/hello1/BPELHello1}bpelhello1_client_ep" from Metadata Manager.: mdm-url-resolver.xml not loaded</summary>
</part>
<part name="detail">
<detail>mdm-url-resolver.xml not loaded</detail>
</part>
</remoteFault>
SOLUTION:
---------
There are two ways to load custom properties :
OPTION 1: via System Property :oracle.soa.url.resolver.properties.file
-----------------------------------------------------------------------
Use the following system property
-Doracle.soa.url.resolver.properties.file={path_to_properties_xml}
[e.g
-Doracle.soa.url.resolver.properties.file=C:\properties.xml
]
The structure of the properties.xml would be :
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
<entry key="{key_name}">{value}</entry>
</properties>
[e.g
<entry key="my_composite">hello1</entry>
]
NOTE:
-----
1. We can add multiple key-value pair as multiple <entry> elements.
2. If the SOA server is being started using command line , then the system
property -Doracle.soa.url.resolver.properties.file={path_to_properties_xml}
needs to be added to JAVA_OPTIONS in startManagedServer.sh(bat)
3. If the SOA server is being started from WLS console , then the system
property -Doracle.soa.url.resolver.properties.file={path_to_properties_xml}
needs to be added to java start parameters
OPTION 2: via mdm-url-resolver.xml in fmwconfig directory
---------------------------------------------------------
Create file mdm-url-resolver.xml under {SOA_DOMAIN}\config\fmwconfig
The structure of the mdm-url-resolver.xml would be same as properties.xml
from OPTION 1
Restart SOA server for the changes to take effect.
NOTE:
-----
SOA first attempts to load the property file from the path specified using
oracle.soa.url.resolver.properties.file system property.
If it fails to find the system property then it attempts to load the property
file from {SOA_DOMAIN}\config\fmwconfig\mdm-url-resolver.xml.
If we decide to use OPTION 2 , then we should not set the system property.
---------------
1. Create a 'hello world' composite calling another hello1 composite
2. Create a deployment plan:
Jdeveloper -> composite.xml -> right click -> Generate deployment plan.
3. In the deployment plan change from
<replace>http://host:8001/soa-infra/services/default/hello1/bpelhello1_client_ep?WSDL</replace>
to
<replace>http://host:8001/soa-infra/services/default/${my_composite}/bpelhello1_client_ep?WSDL</replace>
where hello1 is changed to ${my_composite} as documented here:
4. Deploy composite.
5. Start soa_server with the following option: -Dmy_composite=hello1
During runtime the following error occurs:
<remoteFault>
<part name="summary">
<summary>oracle.fabric.common.FabricException: Cannot read WSDL
"{http://xmlns.oracle.com/bpel_owsm_osb/hello1/BPELHello1}bpelhello1_client_ep" from Metadata Manager.: mdm-url-resolver.xml not loaded</summary>
</part>
<part name="detail">
<detail>mdm-url-resolver.xml not loaded</detail>
</part>
</remoteFault>
SOLUTION:
---------
There are two ways to load custom properties :
OPTION 1: via System Property :oracle.soa.url.resolver.properties.file
-----------------------------------------------------------------------
Use the following system property
-Doracle.soa.url.resolver.properties.file={path_to_properties_xml}
[e.g
-Doracle.soa.url.resolver.properties.file=C:\properties.xml
]
The structure of the properties.xml would be :
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
<entry key="{key_name}">{value}</entry>
</properties>
[e.g
<entry key="my_composite">hello1</entry>
]
NOTE:
-----
1. We can add multiple key-value pair as multiple <entry> elements.
2. If the SOA server is being started using command line , then the system
property -Doracle.soa.url.resolver.properties.file={path_to_properties_xml}
needs to be added to JAVA_OPTIONS in startManagedServer.sh(bat)
3. If the SOA server is being started from WLS console , then the system
property -Doracle.soa.url.resolver.properties.file={path_to_properties_xml}
needs to be added to java start parameters
OPTION 2: via mdm-url-resolver.xml in fmwconfig directory
---------------------------------------------------------
Create file mdm-url-resolver.xml under {SOA_DOMAIN}\config\fmwconfig
The structure of the mdm-url-resolver.xml would be same as properties.xml
from OPTION 1
Restart SOA server for the changes to take effect.
NOTE:
-----
SOA first attempts to load the property file from the path specified using
oracle.soa.url.resolver.properties.file system property.
If it fails to find the system property then it attempts to load the property
file from {SOA_DOMAIN}\config\fmwconfig\mdm-url-resolver.xml.
If we decide to use OPTION 2 , then we should not set the system property.
SOA Identity Service's dependency on WLS Embedded LDAP
PROBLEM STATEMENT:
------------------
Configured a SOA managed server that relies on the embedded LDAP.
When the managed server starts without the admin server running(MSI Mode),
there is an exception in the log showing an attempt to connect to the admin server
internal LDAP instead of using the LDAP of the current managed server.
This problem prevents the customer from using WLS in Managed Server
Independence creating a single fault point in the admin server.
The exception reported in this case is :
Caused By: oracle.security.jps.service.idstore.IdentityStoreException:
JPS-01520: Cannot initialize identity store, cause:
oracle.security.idm.ConfigurationException:
javax.naming.CommunicationException: {host}:7001 [Root exception is
java.net.ConnectException: Connection refused].
at
oracle.security.jps.internal.idstore.util.IdentityStoreUtil.getIdentityStoreFa
ctory(IdentityStoreUtil.java:172)
at
oracle.security.jps.internal.idstore.AbstractIdmIdentityStore.getIdmFactory(Ab
stractIdmIdentityStore.java:273)
where 7001 is the AdminServer port.
EXPLANATION:
-----------
The exhibited behavior is expected and is not a product defect.
When using embedded LDAP , the Admin Server should be up and running for
SOA's authorization and look-up services to work.
This issue has already been dealt with in
The Admin server must be up for the user/role API's to work, hence in the MSI
mode we are unable to access the embedded LDAP.
The same information is also available in note :
Can not Login to BPMWorkspace application when the admin server is down [ID
1362545.1]
NOTE:
-----
If the customers wants SOA to work in MSI mode , they should set up an
external LDAP server and not reply on embedded LDAP.
DETAILED UPDATE:
----------------
When a managed server is started in MSI mode , the Embedded LDAP files are
copied over from the Admin Server to the managed server
- this LDAP detail would be used by the managed server for authentication.
[
This is the reason why authentication would work in SOA in-spite of Admin
Server being down , this can be confirmed by accessing
http://{host}:{port}/soa-infra
]
However , following authentication , some SOA applications would also perform
authorization & look-up [BPM , Worklist application etc ...].
Authorization/look-up functionality of SOA requires access to LDAP server.
Since embedded LDAP server is hosted on Admin Server , Admin Server needs
to be up and running for authorization to work.
To put it in generalized terms , the LDAP server (embedded or external)
should be accessible for SOA server to authorize users/groups/roles etc ...
------------------
Configured a SOA managed server that relies on the embedded LDAP.
When the managed server starts without the admin server running(MSI Mode),
there is an exception in the log showing an attempt to connect to the admin server
internal LDAP instead of using the LDAP of the current managed server.
This problem prevents the customer from using WLS in Managed Server
Independence creating a single fault point in the admin server.
The exception reported in this case is :
Caused By: oracle.security.jps.service.idstore.IdentityStoreException:
JPS-01520: Cannot initialize identity store, cause:
oracle.security.idm.ConfigurationException:
javax.naming.CommunicationException: {host}:7001 [Root exception is
java.net.ConnectException: Connection refused].
at
oracle.security.jps.internal.idstore.util.IdentityStoreUtil.getIdentityStoreFa
ctory(IdentityStoreUtil.java:172)
at
oracle.security.jps.internal.idstore.AbstractIdmIdentityStore.getIdmFactory(Ab
stractIdmIdentityStore.java:273)
where 7001 is the AdminServer port.
EXPLANATION:
-----------
The exhibited behavior is expected and is not a product defect.
When using embedded LDAP , the Admin Server should be up and running for
SOA's authorization and look-up services to work.
This issue has already been dealt with in
The Admin server must be up for the user/role API's to work, hence in the MSI
mode we are unable to access the embedded LDAP.
The same information is also available in note :
Can not Login to BPMWorkspace application when the admin server is down [ID
1362545.1]
NOTE:
-----
If the customers wants SOA to work in MSI mode , they should set up an
external LDAP server and not reply on embedded LDAP.
DETAILED UPDATE:
----------------
When a managed server is started in MSI mode , the Embedded LDAP files are
copied over from the Admin Server to the managed server
- this LDAP detail would be used by the managed server for authentication.
[
This is the reason why authentication would work in SOA in-spite of Admin
Server being down , this can be confirmed by accessing
http://{host}:{port}/soa-infra
]
However , following authentication , some SOA applications would also perform
authorization & look-up [BPM , Worklist application etc ...].
Authorization/look-up functionality of SOA requires access to LDAP server.
Since embedded LDAP server is hosted on Admin Server , Admin Server needs
to be up and running for authorization to work.
To put it in generalized terms , the LDAP server (embedded or external)
should be accessible for SOA server to authorize users/groups/roles etc ...
Fault Framework : Sync Process vs Async Process
I've dealt with many cases with SOA fault framework where the customer claims that scheduled recoveries don't work.
As an example :
Sync BPEL1 invokes Sync BPEL2.BPEL2 throws a fault and BPEL1 has fault policies defined as follows :
<faultName>
<condition>
<action ref="ora-retry"/>
</condition>
</faultName>
<Action id="ora-retry">
<retry>
<retryCount>3</retryCount>
<retryInterval>10</retryInterval>
<exponentialBackoff/>
<retryFailureAction ref="send-notification"/>
<!-- retrySuccessAction ref="ora-errorQ"/ -->
</retry>
</Action>
The expectation is that during fault handling , the framework should kick in and perform a retry thrice.However no retries are performed.
EXPLANATION:
------------------- The exhibited behavior is expected. Fault Frameworks works for asynchronous invocations only.
(i.e) The caller BPEL should be asynchronous
Sync Invocations request and wait for the response (response could be faults) on the same thread (say Thread A),while Fault framework takes action on a new thread(Thread B)
The solution would be to use an Async BPEL processes.
As an example :
Sync BPEL1 invokes Sync BPEL2.BPEL2 throws a fault and BPEL1 has fault policies defined as follows :
<faultName>
<condition>
<action ref="ora-retry"/>
</condition>
</faultName>
<Action id="ora-retry">
<retry>
<retryCount>3</retryCount>
<retryInterval>10</retryInterval>
<exponentialBackoff/>
<retryFailureAction ref="send-notification"/>
<!-- retrySuccessAction ref="ora-errorQ"/ -->
</retry>
</Action>
The expectation is that during fault handling , the framework should kick in and perform a retry thrice.However no retries are performed.
EXPLANATION:
------------------- The exhibited behavior is expected. Fault Frameworks works for asynchronous invocations only.
(i.e) The caller BPEL should be asynchronous
Sync Invocations request and wait for the response (response could be faults) on the same thread (say Thread A),while Fault framework takes action on a new thread(Thread B)
The solution would be to use an Async BPEL processes.
Subscribe to:
Posts (Atom)