Monday, December 27, 2010

Debatching in SOA suite 11g


Debatching is a feature where in you break a large input data in to a number of small inputs,this is generally done in order to reduce load on the server.

This will be very clear with the following example

Let suppose i have an input file with following data in a text file

called input.txt

ram,123,ibm
Shyam,234,cisco
Pasha,345,CTS
Kallol,456,TCS

As you can see it is a comma separated value.

We have a file adapter which will be polling for the record.
But assume that due to perfromance issue we want that the record
should be processed two at a time that is i want that first only

ram,123,ibm
Shyam,234,cisco

should be processed and then

Pasha,345,CTS
Kallol,456,TCS

should be processed in second stretch,however i dont want to intiate the process again.In this scenario i will use the debatcing feature of SOA Suite 11g.

This will process a single record twice using two records at a time thus will create two instance for the record.

We will see how we can achieve this target in SOA Suite.




My process will look something like this,

where in i am polling the same record which i have taken as example here

then finally in am just writing this to another file location.So its just a simple file inobund outbound scenario.

Now the only setting that you need to understand in debatching is in file filtering page as shown below




AS you can see we have selected the option

Files contain Multiple Messages PublishMessages in Batches of

and then i have chosen value as "2"

which means i want my data to be processed in a batch of "2"

Now if you will go to the code level .jca file for this

you will find that following property has been added for this

property name="PublishSize" value="2"

So now our requirement is fulfilled.

Now you can download my project ,change the location of input and output as per your server location and check the process with the same input as i have metioned here.

Two instance will be created and two output files will be generated for it.

Friday, December 24, 2010

failed to load resource: xmlGetAuditTrail.jsp?referenceId=bpel%3A//localhost/<<domain-name>>/<<process-name>>%7E1.0/5121210

you have recently upgraded to SOA Suite 10.1.3.5

and after that when you are trying to log in to BPEL console

you are getting some erros

It is something like this

failed to load resource: xmlGetAuditTrail.jsp?referenceId=bpel%3A//localhost/<<domain-name>>/<<process-name>>%7E1.0/5121210

this is beacuse of a jsp time out and can be resolved by increasing the
timeout values

go to the following location

$SOA_HOME\j2ee\oc4j_soa\applications\orabpel\console\ui\util2\1001.js

There search for rInfo.timeout

Increase this timeout from 20 to some higher value and try to open the console again ,it should work this time

Sunday, December 19, 2010

SOAScheduler in SOA Suite 11g

Got an excellent white paper on how to create a scheduler for SOA Suite 11g.

I have not implemented it by my self but the document seems preety clear with the implementation.Please try to follow the same and let me know if you face any issues.

Saturday, December 18, 2010

User is not authorized to login to Middleware Administration Server farm. User should be part of one or more Administrative roles to be able to login.

This issue mainly occurs when you have configured your SOA Suite with external ldap and you are tying to log in to the console with the users in your ldap.

There are lot of issues related to this.I will try to cover all the issue and try to explain this issue in detail.


I am covering this for SOA Suite 11g

When ever you create an authentication provider there are few things which you have to keep in mind.

1>The LDAP authentication provider should be first in the list of providers.
2>The control flag for LDAP and default authentication provider should be set to sufficient.

Once you do all these changes you should restart your server.

After restart you should be able to see all the users and groups in the weblogic console provided you have given the correct details for user and groups in configuration.


Now lets consider few error scenario and try to understand this.

Before that we will try to understand two terms

1>Authentication.
2>Autharization.

Authentication-Authentication is any process by which a system verifies the identity of a User who wishes to access it.

Now let suppose you will try to log in to the console with some unknown user and password so the system will not be able to authenticate it because it doesn't have any information on this user ,In that case you might receive an error like

Invalid User Name and/or Password.

This same error will occur even if you will try to use the LDAP user to login and use some different password as the user and password details provided in the ldap will not match the one provided by you that is authentication error.


Now next condition is that you will use the LDAP user which is shown up in weblogic console and you are also providing correct password but you are getting some different error

User is not authorized to login to Middleware Administration Server farm. User should be part of one or more Administrative roles to be able to login.

This is authorization error.

Authorization is the process of giving someone permission to do or have something.

In this case the user is authenticated but the user does not have the privilege to log in to the console this can be resolved by giving the user the roles to access the page.


Further there can be issue like

"@ User "weblogic" is not found in configuration "jazn.com" Check if the user
exists in the repository specified by the configurations. Check the error stack
and fix the cause of the error. Contact oracle support if error is not fixable."


this is a very known issue as been documented in following


It clearly says that if you have provider in this order

1>LDAP
2>Default

you will not be able to log in to the console using weblogic as provider.

These are the main issue which are being faced when ever we integrate our SOA with external ldap.

Getting Exception ORABPEL-11624 DBActivationSpec Polling Exception and BPEL instance are not created

You are on SOA Suite 10g and your BPEL process contains a database adapter.

Database adapter is polling data from a table and triggering bpel instances.

Adapter is polling the data but the bpel instance is not getting created.

checked the log files and got following error

ORABPEL-11624
DBActivationSpec Polling Exception.
Query name: [pollData], Descriptor name: [pollData.getData]. Polling the database for events failed on this iteration.
If the cause is something like a database being down successful polling will resume once conditions change. Caused by ORABPEL-00000
JTS transaction was marked rollback only.


Checked the thread dump and there found that most of the threads are waiting.

Don't know the exact reason of the issue.

But i made the following changes


as per the document

11.1 MaxTransactionSize Should be Limited for Oracle Database Adapter

In Database adapter, set a limited value for MaxTransactionSize. For example, set

MaxTransactionSize=10

Setting higher values to MaxTransactionSize will likely time out.


In my case it was set to unlimited.

Changed this to 100

Further i was sending data continuously send the data in a batch size of 200 and it started working

Request Entity Too Large While deploying a Process from BPEL Console

While trying to deploy a BPEL process from BPEL Console you are getting Following error message

Request Entity Too Large
The requested resource /BPELConsole/SupplyOrder/OrderToDisplay.jsp
does not allow request data with POST requests, or the amount of data provided in the request exceeds the capacity limit.

The reason is that the request entity size is much higher than the limit set in LImitRequestBody in apache server.

As per Apache document


LimitRequestBody directive

This directive specifies the number of bytes from 0 (meaning unlimited) to 2147483647 (2GB) that are allowed in a request body.

The LimitRequestBody directive allows the user to set a limit on the allowed size of an HTTP request message body within the context in which the directive is given (server, per-directory, per-file or per-location). If the client request exceeds that limit, the server will return an error response instead of servicing the request. The size of a normal request message body will vary greatly depending on the nature of the resource and the methods allowed on that resource. CGI scripts typically use the message body for passing form information to the server. Implementations of the PUT method will require a value at least as large as any representation that the server wishes to accept for that resource.

This directive gives the server administrator greater control over abnormal client request behavior, which may be useful for avoiding some forms of denial-of-service attacks.

If, for example, you are permitting file upload to a particular location, and wich to limit the size of the uploaded file to 100K, you might use the following directive:

LimitRequestBody 102400

The Oracle application server internally use Apache server.

We need to configure this to a higher value than the requested entity.

It can be set in following file

SOA_HOME\APache\APache\conf\httpd.conf

There you can set the limit request body to a value as per your requirement.

One thing you have to keep in mind is the value mentioned over there is in byte

We have

1 MB = 1024 KB

1 KB = 1024 Bytes

Therefor 1 MB = 1048576 Bytes.

So if you have a maximum of 1 MB of entity you need to set it to 1048576

SERVICEUNAVAILABLEEXCEPTION_STARTPAGE_STARTUP_INITIALIZE

You have installed SOA Suite 11.1.1.3 and created a domain for SOA and BAM.

Everything is up and running but while trying to log in to the BAM console you are getting following exception

SERVICEUNAVAILABLEEXCEPTION_STARTPAGE_STARTUP_INITIALIZE

BAM-0023: Service oracle.bam.adc.common.core.IDataStore is unavailable

EJB Exception occurred during invocation from home or business: weblogic.ejb.container.internal.StatelessEJBHomeImpl@b0e6d6e threw exception: oracle.bam.common.remoting.ServiceUnavailableException: BAM-00223: Service oracle.bam.adc.common.core.IDataStore is unavailable.>







Don't know the exact reason for this issue but the installation was done something like this by selecting following components



As you can see some extra components have been selected.

My requirement is only soa,bam and bpm server to be installed in the same domain

I recreated the domain this time by selecting first

Oracle SOA Suite(this automatically selected the related schema)
Oracle Enterprise Manager
Oracle Business activity Monitoring

Then created the domain and this time i was able to log in to the bam without any issues.

I further extended my domain again to contain BPM also.

Thursday, December 16, 2010

Performance issue in SOA Suite 11g (100% cpu)

In soa suite 11.1.1.3 ,i have deployed many processes

The soa-server hangs at 100% and both EM and Weblogic-Console do not respond.

The cpu shows 100% and everytime i have to restart the server to make it working ,it works for sometimes but again after some time it hangs saying 100% cpu

I got following exceptions

oracle.xml.xpath.XPathException: value does not match required type

Caused By: java.sql.SQLException: Connection has been administratively disabled. Try later.

Exception [TOPLINK-4002] (Oracle TopLink - 11g Release 1 (11.1.1.3.0) (Build 100323)): oracle.toplink.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Connection has been administratively disabled. Try later.
Error Code: 0
[TopLink Info]: 2009.11.07 10:59:45.125--ClientSession(89899333)--Communication failure detected when attempting to create transaction on database. Attempting to retry begin transaction.
Use JRockit instead of Sun's JDK

2>Review the performance tuning roadmap from oracle and find tune your jvm parameters.

3>There are lot of bugs associated with cpu utilization issue.
need to apply patches for those bugs,you can check with Oracle support on the patch fixes for the bugs.

4>Take heap dump and anaylse it using IBM memory analyzer tool.

5>If you are going for production it is suggested not to use embedded ldap server for storing the user and groups instead you should go for external ldap.

BPEL 10g purge Script

Bpel 10g purge script has been documented very well in the Oracle white paper

and this is the main concept in bpel 10g purge script

The purge only remove the rows from the extents and but does not coalesce the space.
To shrink the space:
1. Enable row movement for the table.
SQL> ALTER TABLE xml_document ENABLE ROW MOVEMENT;
Options:
2.1 Shrink table but don't want to shrink HWM (High Water Mark).
SQL> ALTER TABLE xml_document SHRINK SPACE COMPACT;
2.2 Shrink table and HWM too.
SQL> ALTER TABLE xml_document SHRINK SPACE;
2.3. Shrink table and all dependent index too.
SQL> ALTER TABLE xml_document SHRINK SPACE CASCADE;
3. Disable row movement for the table.
ALTER TABLE xml_document DISABLE ROW MOVEMENT;


Upgrade to the latest version to get the new purge script


If you will have a look in the purge script of ESB you will find that there are no script to delete the data from ESB_MONITOR topic and other topics this is because there are internal triggers implemented in code level which deletes the data from these tables also.

Tuesday, November 30, 2010

oracle.mds.config.MDSConfigurationException: MDS-01330: unable to load MDS configuration document

You are trying to deploy a composite to your SOA suite and you are getting following issues


[03:14:15 PM] Error deploying archive sca_ReSequencer_rev1.0.jar to partition "default" on server soa_server1 [celvpint0612.us.oracle.com:8001]
[03:14:15 PM] HTTP error code returned [500]
[03:14:15 PM] Error message from server:
Error during deployment: Error occured when creating target MDS instance.: oracle.mds.config.MDSConfigurationException: MDS-01330: unable to load MDS configuration document
MDS-01329: unable to load element "persistence-config"
MDS-01370: MetadataStore configuration for metadata-store-usage "soa-infra-store" is invalid.
MDS-00922: The ConnectionManager "oracle.mds.internal.persistence.db.JNDIConnectionManagerImpl" cannot be instantiated.
weblogic.common.resourcepool.ResourceDisabledException: Pool mds-soa is Suspended, cannot allocate resources to applications..
: MDS-01330: unable to load MDS configuration document
MDS-01329: unable to load element "persistence-config"
MDS-01370: MetadataStore configuration for metadata-store-usage "soa-infra-store" is invalid.
MDS-00922: The ConnectionManager "oracle.mds.internal.persistence.db.JNDIConnectionManagerImpl" cannot be instantiated.
weblogic.common.resourcepool.ResourceDisabledException: Pool mds-soa is Suspended, cannot allocate resources to applications..
.
[03:14:15 PM] Check server log for more details.
[03:14:15 PM] Error deploying archive sca_ReSequencer_rev1.0.jar to partition "default" on server soa_server1 [celvpint0612.us.oracle.com:8001]
[03:14:15 PM] #### Deployment incomplete. ####
[03:14:15 PM] Error deploying archive file:/C:/ComplexTypeSample/ComplexTypeSample/ReSequencer/deploy/sca_ReSequencer_rev1.0.jar
(oracle.tip.tools.ide.fabric.deploy.common.SOARemoteDeployer)


YOu might be checking from different version of jdeveloper and doing some changes in adf-config.xml

but the real issue is from the server side.As can be seen from the error message it is not able

to connect to the target MDS instance that is it is not able to connect to the MDS schema in the back end

I logged in to the soa server and machine and verified that my metadata repositories were not up

that is mds-soa and mds-owsm were not up and running for me.



I stopped my soa server(managed), stopped admin server

Restarted my listener and database then again restarted admin and managed server.

Now i checked the status of mds-soa and mds-owsm was up and running.

Now i tried to deploy the project and i was successful.

Saturday, October 30, 2010

Resequencing in SOA Suite 11g

As from the name it is clear it is used for sequencing,

Consider a scenario where in we have several input file coming into our process and it is in return producing some output ,The input file coming are in random order so the output produced will also be same random error.

From SOA Suite 10.1.3.5 and SOA Suite 11g PS2 we have this new feature called resequencer.IT will sequence the output file in a sequence independent of the input order.Earlier it was very difficult as we had to design xsd in order to sort the output element based on some element in the output.

ttp://soa-bpel-esb.blogspot.com/2010/05/sorting-elements-in-bpel.html


We will just see and example and try to understand how does this feature works in SOA Suite 11g


There are three type of resequencer

1>Standard Resequencer

2>FIFO Resequencer

3>BestEffort Resequencer

For more information on these you can refer to resequencer document in oracle




I have created a simple process to understand the use case of resequencer

It has a file adapter for receiving input

A mediator for resequencing and again a file adapter for generating output.

I am taking three variable as input

name,empid,comany from file adapter

In mediator i am using resequencer in standard mode

i have used the first field "name" as group id

and second field "empid" as Id with an increment of 1

There is a simple mapping in mediator where in i am copying the input to
output variable.

Now i have checked this process with following input in sequence as shown
below

ram,1,abc

ram,3,abc

ram,2,abc

What i have observed is that an output file is not generated for second input

ram,3,abc

Only when i place the third input file

ram,2,abc

All the three instances are generated,so it is working as expected.

Now i want to process it again from the beginning so i deleted all the
instance and all the file generated in output folder and rechecked it with
the same data in same sequence but this time instance were created but output
file was not created for me.

I put one more input file

ram,4,abc

and it was processed and an output file was created .

resequencig feature help in resequecing the data in a proper order.

Let suppose you are using a Standard Resequencer and sequencing on a

particular attibute "X" and the sequencing increment is provided as 1

Then the data will be processed only when you will provide the input in

a sequence of 1,2,3... of X.

If it happens to be 1,2,3,5

then it will stop after 3 and will wait for 4 to come

Once 4 will come it will then complete the 5th one and so on

One important thing is that once it has started processing data

from 1,2,3 onwards you can not use the same seauence again i.e. 1,2,3

because these data are stored in database so if you want to use the same

sequence again you need to manually clear it from database.

Keep in mind that reactivating the process will also not work for the

same sequence you will have to clear it from database.

Further you can create different groups for different sequence.

SubDeployment in SOA suite

I was trying to get more knowledge on subdeployment in weblogic server ,Did read some documents but was not convinced.Finally this Friday i was working on one project and got some idea about sub deployment which to me was very convincing.I will just share it with you,hope you may find it interesting.

We will try to create a JMS connection and try to understand the use case of Subdeployment.

In 10g we were having concept of connection factory.That is first we should create a connection

factory and then we should create the queue,again we refer the connection factory details in

queue.In Soa Suite 11g if you will create a queue and a connection factory both are independent

We can cor-relate them with the use of subdepoyment.

That is if we have many number of queues and many number of connection factory how we will know

which queue is using which connection factory.So for that purpose we use subdepoylment.

It will be very clear when i will create a simple queue and connection factory

the steps that i will follow will be

1>Create a JMS server


On admin console SErvices-->Messaging-->JMS Server


2>Create a JMS Module


Services--.Messaging-->JMS Module


3>Create connection factory and queue using the existing subdeployment or
if you want to create a new sub deployment you can go ahead with that.
both the Queue and connection factory should use the same subdeployment,
In this way we can make sure that which queue is making use of which
connection factory.


4>Now go to Deployment


JMS Adapter -->Configuration-->Outbound Connection Pool


Create a new outbound connection ,provide the details


Save the changes.


Now again go to Deployment


Select JMS Adapter and say update.This is the overall process

Friday, October 29, 2010

org.apache.commons.fileupload.FileUploadException: Processing of multipart/form-data request failed

YOu are trying to deploy a process from jdeveloper in SOA Suite 10g and you are getting following error


78: A problem occured while connecting to server "localhost" using port "7200": org.apache.commons.fileupload.FileUploadException: Processing of multipart/form-data request failed. C:\Temp\upload_00000000.tmp (The system cannot find the path specified)
at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:429)
at _deployHttpClientProcess._jspService(_deployHttpClientProcess.java:344)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
at oracle.security.jazn.oc4j.JAZNFilter$1.run(JAZNFilter.java:400)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:414)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:623)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:313)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:199)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)


Total time: 2 seconds


As you can see that it is giving some issues that C:/temp Directory doesn't exist.

Ok we will try to understand what exactly is happening.
Go to you sOA_HOME\opmn\conf directory and open your opmn.xml


you will get some entry like this

<environment>
<variable id="TMP" value="C:\Temp"/>
</environment>
<module-data>


Jdeveloper uses this temporary location while deploying the process to soa server.

So in order to resolve this issue either create a directory structure

C:\temp

or change it in opmn.xml

One important thing is that whenever you make a change is opmnn.xml you have to reload it

i.e go to SOA_HOME\opmn\bin and do opmnctl reload

it will reconfigure the opmn then you need to restart your server.

HOwever this is a long process and creating a directory structure directly will be a much easier and better option.

But the temporary location should be somewhere inside folder structure so that it can not be deleted acccidently.


Another important thing is that this directory structure is used to store some temporary file while deploying the service,once it is deployed it gets deleted automatically so after process is deployed if you will check this folder it will be empty.

"oracle.fabric.common.FabricException: oracle.mds.config.MDSConfigurationException: MDS-01330: unable to load MDS configuration document MDS-01329

Everything was working fine for me.I started my machine and started jdeveloper

i got following pop up message



I ignored it and started working on jdeveloper.

I created a simple process and tried to compile it and it gave me following error in jdeveloper


Error(8,61): Parse of component type files failed, check the adf-config.xml file : "oracle.fabric.common.FabricException: oracle.mds.config.MDSConfigurationException: MDS-01330: unable to load MDS configuration document
MDS-01329: unable to load element "persistence-config"
MDS-01370: MetadataStore configuration for metadata-store-usage "mstore-usage_2" is invalid.
MDS-01259: The metadata store "oracle.mds.persistence.stores.db.DBMetadataStore" cannot be instantiated.
MDS-00003: error connecting to the database
The Network Adapter could not establish the connection
Connection refused: connect
Connection refused: connect
: MDS-01330: unable to load MDS configuration document
MDS-01329: unable to load element "persistence-config"
MDS-01370: MetadataStore configuration for metadata-store-usage "mstore-usage_2" is invalid.
MDS-01259: The metadata store "oracle.mds.persistence.stores.db.DBMetadataStore" cannot be instantiated.
MDS-00003: error connecting to the database
The Network Adapter could not establish the connection
Connection refused: connect
Connection refused: connect
: oracle.mds.config.MDSConfigurationException: MDS-01330: unable to load MDS configuration document
MDS-01329: unable to load element "persistence-config"
MDS-01370: MetadataStore configuration for metadata-store-usage "mstore-usage_2" is invalid.
MDS-01259: The metadata store "oracle.mds.persistence.stores.db.DBMetadataStore" cannot be instantiated.
MDS-00003: error connecting to the database
The Network Adapter could not establish the connection
Connection refused: connect
Connection refused: connect
: MDS-01330: unable to load MDS configuration document
MDS-01329: unable to load element "persistence-config"
MDS-01370: MetadataStore configuration for metadata-store-usage "mstore-usage_2" is invalid.
MDS-01259: The metadata store "oracle.mds.persistence.stores.db.DBMetadataStore" cannot be instantiated.
MDS-00003: error connecting to the database
The Network Adapter could not establish the connection
Connection refused: connect
Connection refused: connect
"

Well for me the reason was the combine process as shown in the pop up message.

This process was having some connection information to external MDS repository

which i was not having access currently.

I shudown my jdeveloper

Deleted the combine process and restarted my jdeveloper and it started working fine.

Thursday, October 28, 2010

OSB Coherence Cache Provider has not been initialized

YOu have done a fresh isntallation of OSB 11.1.1.3

and when you are starting your admin server you are getting following
warning messages in you admin server logs


<OSB Kernel> <BEA-398316> <Error getting the Result Cache /osb/service/ResultCache because the OSB Coherence Cache Provider has not been initialized.

There are some more errors following this-

<June 07, 2010 9:25:27 AM > <Warning> <J2EE> <BEA-160195> <The application version lifecycle event listener oracle.security.jps.wls.listeners.JpsAppVersionLifecycleListener is ignored because the application em is not versioned.>
<June 07, 2010 9:25:57 AM > <Warning> <J2EE> <BEA-160140> <Unresolved optional package references (in META-INF/MANIFEST.MF): [Extension-Name: oracle.rules, referenced from: /osb/oracle/bea/user_projects/domains/base_domain/servers/AdminServer/tmp/_WL_user/emai/xalnv4]. Make sure the referenced optional package has been deployed as a library.>
[ERROR] AdapterManager - ServletContainerAdapter manager not initialized correctly.

Oracle Service Bus Debugger listening on port 7002.

<June 07, 2010 9:26:38 AM > <Warning> <EJB> <BEA-010061> <The Message-Driven EJB: PolledMessageListenerMDBEJB is unable to connect to the JMS destination: wlsb.internal.transport.task.queue.ftp. The Error was:
The destination for the MDB PolledMessageListenerMDBEJB(Application: Ftp Transport Provider, EJBComponent: ftp_transport.jar) could not be resolved at this time. Please ensure the destination is available at the JNDI name wlsb.internal.transport.task.queue.ftp. The EJB container will periodically attempt to resolve this MDB destination and additional warnings may be issued.>
<June 07, 2010 9:26:38 AM > <Warning> <EJB> <BEA-010061> <The Message-Driven EJB: PolledMessageListenerMDBEJB is unable to connect to the JMS destination: wlsb.internal.transport.task.queue.ftp. The Error was:
Can not get destination information. The destination JNDI name is wlsb.internal.transport.task.queue.ftp, the provider URL is null>
<June 07, 2010 9:26:38 AM > <Warning> <EJB> <BEA-010061> <The Message-Driven EJB: PolledMessageListenerMDBEJB is unable to connect to the JMS destination: wlsb.internal.transport.task.queue.email. The Error was:
The destination for the MDB PolledMessageListenerMDBEJB(Application: Email Transport Provider, EJBComponent: emailtransport.jar) could not be resolved at this time. Please ensure the destination is available at the JNDI name wlsb.internal.transport.task.queue.email. The EJB container will periodically attempt to resolve this MDB destination and additional warnings may be issued.>
<June 07, 2010 9:26:38 AM > <Warning> <EJB> <BEA-010061> <The Message-Driven EJB: PolledMessageListenerMDBEJB is unable to connect to the JMS destination: wlsb.internal.transport.task.queue.email. The Error was:
Can not get destination information. The destination JNDI name is wlsb.internal.transport.task.queue.email, the provider URL is null>
<June 07, 2010 9:26:38 AM > <Warning> <EJB> <BEA-010061> <The Message-Driven EJB: PolledMessageListenerMDBEJB is unable to connect to the JMS destination: wlsb.internal.transport.task.queue.file. The Error was:
The destination for the MDB PolledMessageListenerMDBEJB(Application: File Transport Provider, EJBComponent: filepoll.jar) could not be resolved at this time. Please ensure the destination is available at the JNDI name wlsb.internal.transport.task.queue.file. The EJB container will periodically attempt to resolve this MDB destination and additional warnings may be issued.>
<June 07, 2010 9:26:38 AM > <Warning> <EJB> <BEA-010061> <The Message-Driven EJB: PolledMessageListenerMDBEJB is unable to connect to the JMS destination: wlsb.internal.transport.task.queue.file. The Error was:
Can not get destination information. The destination JNDI name is wlsb.internal.transport.task.queue.file, the provider URL is null>


As per the Oracle coherence document

BEA-2032480


Error: Unable to initialize OSB Coherence Cache Provider because Oracle Coherence is not installed.
Description
Unable to initialize OSB Coherence Cache Provider because Oracle Coherence is not installed.

Action
Ensure that Oracle Coherence is installed

BEA-2032481


Error: Unable to initialize OSB Coherence Cache Provider because there was an error starting Coherence:\nt\n \n The error can be caused by one of the following:\n \n 1) The operational configuration file is invalid (see $DOMAIN_DIR$/config/osb/coherence/osb-coherence-override.xml)\n 2) The cache configuration file is invalid (see $DOMAIN_DIR$/config/osb/coherence/osb-coherence-cache-config.xml)

Description
Unable to initialize OSB Coherence Cache Provider because there was an error starting Coherence. The error can be caused by one of the following: 1) The operational configuration file is invalid (see $DOMAIN_DIR$/config/osb/coherence/osb-coherence-override.xml) 2) The cache configuration file is invalid (see $DOMAIN_DIR$/config/osb/coherence/osb-coherence-cache-config.xml) The exception message should provide more detail as to the actual cause.

Action
Correct the errors details in the exception message.


I verified the files but just was not aware of what all needs to be verified.

Did compared my installation and found that BEA_HOME/coherence_3.5/lib/coherence.jar was not existing for me.

Thought of copying it from other environment but then i process with creating a new domain again.

Created a new domain and this time it was working fine for me.

Friday, October 22, 2010

Display state of composite in SOA Suite 11g

You might have faced some issues in Your SOA Suite 11g em console

That the process which are completed,the states for the process are

not appearing ,rather it will show some question mark "? --" like character

This is not a bug but by default this is the state value.

If you want to change the default settings you need to configure it.

Log in to em console

http://host:port/em


Click on SOA-Infra

Go to SOA ADministration

and common properties



Now you can see here something called as

Capture Composite instance state

You can read its description

Select it and apply the changes



now create a new instance and check out its state

As you can see the new instance that i have created shows the state as completed

however those who were created earlier are in ?== state.

Thursday, October 21, 2010

Working with Ant script in SOA Suite 11g

The various ant script available in SOA suite 11g can be found in the following location

Middleware_Home\SOA_Server1\bin

We have different xml file to compile, deploy retire upgrade and many more options

For additional information on ant you can go to following http://ant.apache.org


OK i have created a simple process in jdeveloper 11g and and will try to deploy it using command console.

Open up a command console and move to SOA_HOME\bin directoy

First of all we will check by compiling the project if everything is working fine.

I executed the compilation command and it got failed for me with error

D:\oracle\Middleware\Oracle_SOA1\bin>ant -f ant-sca-compile.xml -Dscac.input=C:\
JDeveloper\mywork\arpit\QueryDatabase\composite.xml
Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre1.6.
0_07\lib\tools.jar
Buildfile: ant-sca-compile.xml

scac:
[scac] Validating composite : 'C:\JDeveloper\mywork\arpit\QueryDatabase\com
posite.xml'

BUILD FAILED
D:\oracle\Middleware\Oracle_SOA1\bin\ant-sca-compile.xml:264: Java returned: 1 C
heck log file : C:\DOCUME~1\arahi\LOCALS~1\Temp\/out.err for errors

Total time: 8 seconds




so the reason was my java home was not set properly

i did set it to my middleware jdk

This i done intentionally

Baiscally we need to set three important parameters before we could just run the ant command

1>JAVA_HOME
2>ORACLE_HOME and
3>ANT_HOME


so i ran three command to set it


D:\oracle\Middleware\Oracle_SOA1\bin>set JAVA_HOME=D:\oracle\Middleware\jdk160_1
4_R27.6.5-32

D:\oracle\Middleware\Oracle_SOA1\bin>set ORACLE_HOME=D:\oracle\Middleware\Oracle
_SOA1

D:\oracle\Middleware\Oracle_SOA1\bin>set ANT_HOME=D:\oracle\Middleware\modules\o
rg.apache.ant_1.7.0


now i will run the compile command again

and this time it ran successfully for me





Now we will try to deploy this project,as you can see in the Oracle documentation to deploy a process it needs the sar location.


So first of all we will create a sar file out of our project file.

This can be done from jdeveloper.

Select your process and say deploy





when option will come just choose deploy to SAR



Provide the version number and say finish to deploy it





YOu can see in the jdeveloper where is the .jar file created,by default it is created in the location where project is stored and within that deploy folder so for my case it was stored in following location

C:\JDeveloper\mywork\arpit\QueryDatabase\deploy\sca_QueryDatabase_rev1.0.jar


Ok just to let you know if you have this jar file you can directly go to your em console and deploy this project.


For that purpose just log in to em console

Right click on SOA_Infra

then click on SOA Deployment and click on deploy when new page comes just locate the .jar file thus created and keep on saying next and your process will be deployed.

However in this post we are discussing about deploying a file using ant script so we will go ahead with that.

So i post the following command now and for me it deployed successfully

D:\oracle\Middleware\Oracle_SOA1\bin>ant -f ant-sca-deploy.xml -DserverURL=http:
//localhost:8001 -DsarLocation=C:\JDeveloper\mywork\arpit\QueryDatabase\deploy\s
ca_QueryDatabase_rev2.0.jar -Doverwrite=true -Duser=weblogic
Buildfile: ant-sca-deploy.xml
[echo] oracle.home = D:\oracle\Middleware\Oracle_SOA1\bin/..

deploy:
[input] skipping input as property serverURL has already been set.
[input] skipping input as property sarLocation has already been set.
[deployComposite] Processing sar=C:\JDeveloper\mywork\arpit\QueryDatabase\deploy
\sca_QueryDatabase_rev2.0.jar
[deployComposite] Adding sar file - C:\JDeveloper\mywork\arpit\QueryDatabase\dep
loy\sca_QueryDatabase_rev2.0.jar
[deployComposite] Creating HTTP connection to host:localhost, port:8001
[deployComposite] Enter username and password for realm 'default' on host localh
ost:8001
[deployComposite] Authentication Scheme: Basic
[deployComposite] Username:
weblogic
[deployComposite] Password:

[deployComposite] Received HTTP response from the server, response code=200
[deployComposite] ---->Deploying composite success.


YOu will be once asked to provide the user and password for weblogic server once you will provide that it will go ahead and deploy your process to the server ,you can make changes in the project by referring to different configuration plan.

How to use function query-database() to return data from the database in SOA Suite 11g

I created a new user in database

create user arpit identified by arpit;

then grant dba to arpit;

Now just log in to database and

I just created a simple table in database

create table customer(name varchar(20),empid varchar(20));

Then i inserted some data in to the table as can be seen




NOw log in to admin console

http://localhost:port/console and go to

Services--->Jdbc---->Data Sources and create a new data source





Provide some data source name as per your requirement



Provide database details

Test the configuration and target it to soa_server1 and say finish





So now you can see the new data source created in the list as shown





As per oracle document

the syntax for query -database is

oraext:query-database(sqlquery as string, rowset as boolean, row as boolean, data source as string)

and these are the arguments

Arguments:

sqlquery - The SQL query to perform.

rowset - Indicates if the rows should be enclosed in an element.

row - Indicates if each row should be enclosed in an element.

data source - Either a JDBC connect string (jdbc:oracle:thin:username/password@host:port:sid) or a JNDI name for the database.


Now i am creating just a simple bpel process that is a default asynchronous bpel process,i will just modify it for my use case.

I choose the default option for creating a bpel process and it fetches me following xsd file

<?xml version="1.0" encoding="UTF-8"?>
<schema attributeFormDefault="unqualified"
elementFormDefault="qualified"
targetNamespace="http://xmlns.oracle.com/arpit_jws/QueryDatabase/BPELProcess1"
xmlns="http://www.w3.org/2001/XMLSchema">
<element name="process">
<complexType>
<sequence>
<element name="input" type="string"/>
</sequence>
</complexType>
</element>
<element name="processResponse">
<complexType>
<sequence>
<element name="result" type="string"/>
</sequence>
</complexType>
</element>
</schema>

Now as you can see we have one input variable and one output variable but for our results to be stored we must have two elements in output and again since we don't know how many rows will be returned from sql query so we too have to design our xsd in according to that.


I would recommend to refer to this post

http://soa-bpel-esb.blogspot.com/2010/04/how-to-create-business-process-for.html

This was one of my best post for understanding namespace so if you are clear with this we will go ahead and design our xsd.

So based on that i have changed my xsd as below

<?xml version="1.0" encoding="UTF-8"?>
<schema attributeFormDefault="unqualified" elementFormDefault="qualified"
targetNamespace="http://xmlns.oracle.com/arpit_jws/QueryDatabase/BPELProcess1"
xmlns:arpit="http://xmlns.oracle.com/arpit_jws/QueryDatabase/BPELProcess1"
xmlns="http://www.w3.org/2001/XMLSchema">
<element name="process" type="string"/>
<element name="processResponse" type="arpit:productType"/>
<complexType name="productType">
<sequence>
<element name="listElement" type="arpit:listElementType"
maxOccurs="unbounded"/>
</sequence>
</complexType>
<complexType name="listElementType">
<sequence maxOccurs="unbounded">
<element name="itemID" type="string"/>
<element name="itemValue" type="string"/>
</sequence>
</complexType>
</schema>


DAts it once you have created your xsd you are done with most of the complexity,

Create a new string variable as shown below




NOw just drag and drop a assign activity in the bpel process and copy the input variable to the new string variable you have created.





NOw create one more copy operation and use the data base function to query the database.



this is the expression in my case as per my configuration

oraext:query-database(bpws:getVariableData('query'),true(),true(),'jdbc/DataSource1')

So now the process is complete now deploy it to the server.


Just to let you know what exactly output i am expecting.

I have created a database connection to the schema i have created and i will run an sql query

select * from customer it will fetch me the result of all the records in the table customer as can be seen



MY aim is to get the same output from my process.

So i will pass the same input to my bpel process




NOw you can check the flow of output to get the result as shown



Further you can use your own transformation to copy it to our own created variable .
Hope this would have given you some idea on how to work with query-database()

How to give read-only roles to a user in SOA Suite

In SOA Suite 10g we were not having this feature to provide read only roles to the user.It was provided out of box as mentioned in the Chintansah blog post in 11g it is possible to give users read only roles.

We will see in this exercise how we can do it.

For this purpose first of all we need to create a user.

Log in to the admin console

http://host:port/console

Now in the left hand side go to Security realm



Now go to myrealm



Now go to user and groups tab and create a new user




now you can provide the details of your user



Now you can see the user here.

Click on the user and move to groups tab



now in groups tab move monitor to right hand side and save the configuration



Now log in to em console

Go to SOA-infra

Go to Security and choose Application roles as shown



Click on search icon
to get the details of roles,now in all the roles select SOAMonitor



now go there and click on add user , a new popl up will come up there in search for

user and then select the user you have created and move it to right hand side.

Save the changes



Now log out of the console and try to log in with new user.

Tuesday, October 19, 2010

How to use Shared Meta data in SOA suite 11g

In the previous post

http://soa-bpel-esb.blogspot.com/2010/10/how-to-deploy-shared-metadata-in-soa.html

we saw how to deploy shared metadata ,this is just a continuation of previous post,in this exercise we will learn how to use this shared metadata in some different application.

Create a new SOA-MDS connection



When asked create a new database connection.As you can seen i have used my DEV_MDS as user name as it is the name of my soa-infra schema.




now just choose db based MDS,choose the connection that you have created and choose SOA-INFRA as mds partition type




Now you can expand the mds connection to see the xsd that you have created in your previous process.




Now we will create a new project and see how we can use this xsd,

Create a new project



Give it some logical name




Create a process with BPEL




Now you need to perform steps as shown in number



Once you select this xsd will be imported to your project



Now for input choose process and for output choose process response




You can see the xsd used belongs to the previous process




Now you can say ok and give any logic to your bpel process .

This is an example sample but one can use this feature for multiple designing pattern.

in the wsdl file you can find a reference to this xsd as schemaLocation="xsd/BPELProcess2.xsd"

This is because i have made a local copy of this in to my project ,if i haven't made a local

connection it should have come something like this

oramds:/apps/xsd/BPELProcess2.xsd

If you want to remove the shared metadata using WLST you can refer to the following post

http://blogs.oracle.com/nreyes/2010/08/removing_shared_metadata_from_soa_mds.html

http://download.oracle.com/docs/cd/E14571_01/web.1111/e13813/custom_soa.htm#CDEHHJBG

Monday, October 18, 2010

How to Deploy Shared Metadata in SOA Suite 11g

We have earlier seen how to deploy your data in to MDS using ANT script in following

fault-handling-in-oracle-soa-suite post in previous blog

In this exercise we will see how we can do it by creating the jar file.There are three steps for it.



Create a JAR profile and include the artifacts to share

Create a SOA bundle that includes the JAR profile

Deploy the SOA bundle to the application server


Select the project whose artifacts you want to send in MDS and right click on it,

select project properties as shown




Now click on deployment and then create a new.

Choose jar as option and give it some logical name



Deselect Include Manifest File

This prevents the archive generator from adding the manifest file (META-INF/MANIFEST.MF) into the JAR file.



Deselect the Project Output Directory and Project Dependencies options
This prevents the archive generator from adding the contents of the project output and project dependencies into the archive.





Now click on add-->then browse and add your project into it.



Select File Groups > Project Output > Filters from the navigational tree on the left.

Select only thing which you want to store in your MDS as in my case i want to store only xsd so i have choosen only xsd file



Say ok and you will find a jar file getting created



save all



Now From the Application Menu, select Application Properties > Deployment.

Click New to create a SOA bundle profile.

The Create Deployment Profile dialog appears.


From the Archive Type list, select SOA Bundle. A bundle is a collection of multiple SOA composite applications.

give some logical name




Now select dependencies on left hand side and then choose the project and its jar file as shown



Save it and now you are ready to deploy it.

Go to application---Deploy--->your bundle



Deploy it to your application server