Friday, December 26, 2008

Magikkk of 'Translate'

Ahhh...Writing blog after a longtime. During this time, got an oppurtunity to diagonise BPEL...so now thinking of sharing some of my knowledge and experiences with all.

INTRODUCTION:
Here I am going to discuss a very small function of XSLT:- TRANSLATE.
Translate function returns inputString with occurrences of characters in fromString replaced by the character at the corresponding position in toString. This function takes 3 parameters.

SYNTAX: translate(inputString as string,fromString as string,toString as string)

SCENARIO:
If we deal in currency values, often we see that the value is separated by commas. For example, Value1=2,000,000/Value2=3,000/Value3=30,000

Now suppose you need to store this value in the database. To acheive this you need to remove all the commas from the incoming value. For this purpose we have to use the TRANSLATE function.

SOLUTION:
For the above scenario, use Translate as:
translate(inputString as string,fromString as string,toString as string)

Here,
inputString as string= Your input XPath, for instance, /ns0:Order/ns0:Lines/ns0:UnitPrice/ns0:Money
fromString as string=","
toString as string=""

Now use a conversion function 'Number' to convert the string in number. Thats it and you are done.
Hope I have cleared my point.

Keep learning with me and MERRY CHRISTMAS to all the readers.

Tuesday, November 18, 2008

What, if you forget the Password?

PROBLEM:
What, if you forgot the password for logging into BPEL, ESB or EM? Is there any way to reset it?

SOLUTION:
Step-wise solution to the above problem is mentioned below:

1) Look for the file system-jazn-data.xml under location:
SOA_HOME/j2ee/<home_container>/config
2) Open the file system-jazn-data.xml in your editor.
3) Edit credentials tag for the corresponding name tag as shown below:
<name>oc4jadmin</name>
.
.
<credentials>!<your_new_password></credentials>

Note:Do remember to add ! sign before your password.
4) Restart the SOA Server.
5) You are all set to use new paasword.

Note2: If you encounter any errors after doing this, follow the steps provided in my blog dated 21st June 2008.

Keep learning with me.

Saturday, November 15, 2008

Timed out problem of OPMN

PROBLEM:
Why OPMN (SOA Server) sometime gives timed out message/error during shutdown?

SOLUTION:
Here is the solution. To resolve this issue:
1) Shutdown OPMN completely
2) Goto the location where resides opmn.xml and edit it.
3) Add the -Djava.net.preferIPv4Stack=true option to all the start/stop-args command sections.

EXAMPLE:
<ias-component id="default_group">
<process-type id="home" module-id="OC4J" status="enabled">
<module-data>
<category id="start-parameters">
<data id="java-options" value="-Xrs -server -XX:MaxPermSize=128M -ms512M -mx1024M -XX:AppendRatio=3 -Djava.net.preferIPv4Stack=true -Djava.security.policy=$ORACLE_HOME/j2ee/home/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false -Doraesb.home=C:\product\10.1.3.1\OracleAS_1\integration\esb -Dhttp.proxySet=false -Doc4j.userThreads=true -Doracle.mdb.fastUndeploy=60 -Dorabpel.home=C:\product\10.1.3.1\OracleAS_1\bpel -Xbootclasspath^/p:C:\product\10.1.3.1\OracleAS_1\bpel/lib/orabpel-boot.jar -Dhttp.proxySet=false"/>
</category>
<category id="stop-parameters">
<data id="java-options" value="-Djava.net.preferIPv4Stack=true -Djava.security.policy=$ORACLE_HOME/j2ee/home/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false"/>
</category>
</module-data>
<start timeout="600" retry="2"/>
<stop timeout="300"/>
<restart timeout="720" retry="2"/>
<port id="default-web-site" range="8888" protocol="http"/>
<port id="rmi" range="12401-12500"/>
<port id="rmis" range="12701-12800"/>
<port id="jms" range="12601-12700"/>
<process-set id="default_group" numprocs="1"/>
</process-type>
</ias-component>

Keep learning with me...

Wednesday, October 15, 2008

Oracle JDeveloper 11g Released

Introduction:
Oracle JDeveloper 11g showcases new features to provide a full development environment for Java EE 5 – including EJB 3.0 and JSF 1.2 – and rounded out with new features for AJAX developers, including an impressive new ADF Faces rich client set of components as well as Javascript editing and debugging.

JDeveloper 11g marks a significant milestone in the progress of application development.Web services development is greatly improved with updated support for JAX-WS, a complete Web services test framework, and a comprehensive WSDL editor. There are also many developer productivity enhancements to the IDE and Java development features to explore. And, building applications with Oracle ADF has been dramatically improved with the addition of ADF Faces rich client, a new JSF-based ADF controller framework, and countless productivity-boosting enhancements.

JDeveloper now makes use of an installer to prevent errors during installation.

Features of the installer include:
a. Platform-specific(native) installers for Windows & Linux,including a bundled JDK.
b. Generic installer (without a JDK) for all other platforms.
c. Install into a new or existing Middleware home.
d. Perform a complete installation, or install just the components you need.
e. Create shortcuts in the Start menu on Windows.
f. QuickStart page after installation provides easy access to common tasks.
g. Installer supports 3 modes: GUI/graphical, console, and silent.

For more information, you can visit:
http://www.oracle.com/technology/products/jdev/collateral/papers/11/newfeatures/index.html

BPEL : ORABPEL-11622

Problem:
A "javax.transaction.RollbackException" is thrown when BPEL PM is under heavy load.

Error:
Caused by: ORABPEL-11622
Could not create/access the TopLink Session.
This session is used to connect to the datastore. [Caused by: Transaction has been marked for rollback: Timed out]
See root exception for the specific exception. You may need to configure the connection settings in the deployment descriptor
(i.e. $J2EE_HOME/application-deployments/default/DbAdapter/oc4j-ra.xml) and restart the server. Caused by Exception [TOPLINK-23005]
(Oracle TopLink - 10g Release 3 (10.1.3.1.0) (Build 061004)):
oracle.toplink.exceptions.TransactionException
Exception Description: Error binding to externally managed transaction
Internal Exception: javax.transaction.RollbackException: Transaction has been marked for rollback

Solution:
A step by step solution for this error is shown as under:
a. Goto SOA_HOME/bpel/domains//config

b. Open domain.xml and change syncMaxWaitTime to 1800.
(If the existing value is more than this don't make any changes here)

c. Goto SOA_HOME/j2ee/OC4J_SOA/application-deployments/orabpel/ejb_ob_engine

d. Open orion-ejb-jar.xml and change all the transaction-timeout values to 3600. (If the existing value is more than this don't make any changes here).

e. Goto SOA_HOME/j2ee/OC4J_SOA/config

f. Open transaction-manager.xml and change transaction-timeout value to 7200. (This value you could use as high as 60000, if needed).

Thursday, October 9, 2008

Setting Log level

Setting Log Level for BPEL

Steps:
1) Log in BPEL Console
2) Click on Manage BPEL Domain
3) Goto auditLevel and set the property to production, then click Apply.
4) Goto Logging, on the same page, and set all loggers to error and click on Apply.

Keep Learning...