Monday, May 30, 2011

Synchronous Read in File adapter

I was trying to get a good explanation for synchronous read file operation in soa suite but couldn't get one.Here in this exercise i will try to explain the synchronous read operation of file Adapter.


A bit is mentioned in the Oracle document

It says

In the outbound direction, the Oracle File Adapter polls and reads the current contents of files. This section provides an overview of the outbound synchronous file reading capabilities of the Oracle File Adapter. For reading a file synchronously, you select Synchronous Read File operation.

I have tried several scenario to make it clear what exactly is synchronous read.

I created a simple bpel process

It will start with polling a file directory using read file operation and will invoke a process.


This was working as expected.


Then I thought of creating another process where in i will use synchread for polling but i was surprised that as soon as i finished the configuration the file adapter moved to external reference side as shown ,and i was expecting it should come in exposed service side.




So the first thing that i learned is the Synchronous read operation is an outbound operation and is not used for polling a folder to initiate a process.
So from this we can just get the idea that synchronous read is used in case when we want to read a file in mid of a process.

And you need to use an invoke activity to call synchronous read opearation.
So i create a simple BPEL process to call this opeartion and here is what my process looks like.



Now i copied the file in the location from where file adapter is doing a synchronous read and invoked the process and it completed successfully.So i believe this explanation might have cleared your query as what is synchronous read and when it should be used.

If you do not have a file in the location then you may face some error

<bpelFault><faultType>0</faultType><remoteFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="summary"><summary>Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'SynchRead' failed due to: No Data to process. No Data to process. File /refresh/home/Desktop/input/pox.txt to be processed was not found or not available or has no content Please make sure that the file exists in the specified directory. ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution. </summary></part><part name="detail"><detail>No Data to process. No Data to process. File /refresh/home/Desktop/input/pox.txt to be processed was not found or not available or has no content Please make sure that the file exists in the specified directory. </detail></part><part name="code"><code>null</code></part></remoteFault></bpelFault>


Exception occured when binding was invoked. Exception occured during invhttp://www.blogger.com/img/blank.gifocation of JCA binding: "JCA Binding execute of Reference operation 'SynchRead' failed due to: No Data to process. No Data to process. File /refresh/home/Desktop/input/pox.txt to be processed was not found or not available or has no content Please make sure that the file exists in the specified directory. ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution.

So make Sure you have the file in the location which is getting invoked.You can define your own fault handling mechanism to catch the fault.

for information on fault handling you can follow the following link

Foreign JMS to connect to MQ series in SOA suite 11g

You can do the configuration using the following document

http://download.oracle.com/docs/cd/E17904_01/web.1111/e13738/advance_config.htm#i1075774

http://weblogic-wonders.com/weblogic/2010/11/24/weblogic-foreign-jms-server-configuration-with-mq-series/

Friday, May 27, 2011

Application Integration Architecture - 11.1.1.2

You can follow the following document for db set up

http://soa-bpel-esb.blogspot.com/2009/08/installing-11g-database-for-11g-soa.html

Running RCU

http://soa-bpel-esb.blogspot.com/2009/08/11g-creating-dehydration-storerunning.html

SOA Suite 11g installation

http://soa-bpel-esb.blogspot.com/2009/08/11g-soa-suithttp://www.blogger.com/img/blank.gife-installation.html

These documents are for soa suite 11.1.1.1 but the same is applicable for 11.1.1.2

In this exercise we will asssume that you have already completed the installation of soa suite 11.1.1.2 and we will go ahead and do a set up of AIA 11.1.1.2 on top of it.

there are some pre-requisite to do the initial set up which you need to fulfill otherwise you might faces a lot of issues.


We will directly go ahead with the installation and see what all error we may face during its set up and then we will try to fix it up

Just double click on you AIA setup.exe















you will get following error

Please Ensure that the Remote JDBC parameter is set in the SetDomainEnv.sh/cmd file.

The tag Xgcprio is missing in USER_MEM_ARGS

Minimum recomended value for Xms is 1024 MB.Please check SetSOADomain.sh/cmd again.


Go to C:\Oracle\Middleware\user_projects\domains\soa_domain\bin

Open setDomainENV.cmd and make it to true

set WLS_JDBC_REMOTE_ENABLED=-Dweblogic.jdbc.remoteEnabled=true


Also set the following value in your setDomainEnv.cmd

USER_MEM_ARGS=-Xms1536m -Xmx1536m -Xgcprio:throughput.
http://www.blogger.com/img/blank.gif
As per the document
http://www.blogger.com/img/blank.gif
http://download.oracle.com/docs/cd/E17904_01/doc.1111/e14772/aiafp.htm

Now retry this and you will not get this error again.

There can be an issue with node manager for which you can refer to the following post






Ensure you have specified the correct schema name,database and password details









And the final exception which you are bound to get

It will fail for sure in this step with errors like this

I have tried setting up in windows as well as unix and i got the same error in both the cases.

checking for hardnofiles=4096;hardnofiles=1024.Failed <<<< WLSTException:Error occurred while performing activate: Error while activating changes. : Use dumpStack() to view the full stacktrace WLContext.close() was called in a different thread than the one in which it was created.

This is where you need to do a number of steps

1>Go to the nodemanager.properties file located in BEA_HOME/wlserver_10.3/common/nodemanager.

Check ff the property StartScriptEnabled is set to false,if yes then change it to true

2>GO to BEA_HOME/user_projects/domains/ and delete the edit.lok file.

3> GO to BEA_HOME/user_projects/domains/pending and delete all the files over there.

4> Log into the weblogic console and activate all the changes.

5> Stop managed server from admin console,Stop node manager,stop admin server.

6> Start node manager,Start admin server,start managed server from admin console.

7> In the installation screen of AIA press on retry button as shown above and check if the issue is resolved.






now log in to AIA console to verify if it is set up correctly

use http://host:managed server port/AIA




Verify the components



Now if you will log in to em console you will find that some default process are already deployed for AIA as shown

Concept of leasing in Weblogic(SOA Suite)

Some services are required to run only in a single member of a cluster.These are used basically for pinned services which are running on a single node of a cluster.The concept of leasing enable us to migrate the service to other node in case of failover.YOu can get more details on the same from the following documents

http://download.oracle.com/docs/cd/E11035_01/wls100/cluster/migration.html#wp1047105

http://download.oracle.com/docs/cd/E11035_01/wls100/cluster/service_migration.html

There are two type of leasing

1>Database leasing-Where in database is used for storing leasing information.

2>consensus leasing-where leasing information is stored in memory.

We will try to create a simple scenario and will see how leasing works in weblogic.

Requirement for this is that you should have a cluster with atleast two nodes.

Tuesday, May 24, 2011

Starting Business Processes with the E-mail Activation Agent

I was looking for this feature in SOA suite as it was a requirement in one of the project to initiate a process from email notification and i got the following document

http://download.oracle.com/docs/cd/B31017_01/integrate.1013/b28981/notif.htm#CHDJECIF

11g doesn't have the similar feature.
You can create you own custom code to poll and initiate process

Monday, May 23, 2011

Pinned services/Migratable services

Messaging-related services,JTA Transaction Recovery Service, and user-defined singleton services which are hosted on individual server instances within a cluster are called as pinned services.They are not supported by failover for failure recovery but by weblogic server migration framework hence they are also called as migratable services.

you can get more details on the same from following location

http://download.oracle.com/docs/cd/E11035_01/wls100/cluster/service_migration.html

Sunday, May 22, 2011

weblogic.nodemanager.NMException: Access to domain 'soa_domain' for user 'weblogic' denied

You have installed SOA Suite 11g.

You have started your admin server,node manager and managed server

Now open a command console and navigate to following location

BEA_HOME\wlserver_10.3\common\bin\wlst.cmd

Now type in following command to connect to the node manager

wls:/offline> nmConnect('weblogic','welcome1','localhost','5556','soa_domain
','C:\Oracle\Middleware\user_projects\domains\soa_domain','ssl')

Here

weblogic is the user and welcome1 is password

Localhost is name of my host and 5556 is the listener port for node manager.

soa_domain is the name of my domain

When you will execute this command you will find following error


wls:/offline> dumpStack()
This Exception occurred at Mon May 23 10:49:12 IST 2011.
weblogic.nodemanager.NMException: Access to domain 'soa_domain' for user 'weblog
ic' denied
at weblogic.nodemanager.client.NMServerClient.checkResponse(NMServerClie
nt.java:299)
at weblogic.nodemanager.client.NMServerClient.checkResponse(NMServerClie
nt.java:312)
at weblogic.nodemanager.client.NMServerClient.connect(NMServerClient.jav
a:254)
at weblogic.nodemanager.client.NMServerClient.checkConnected(NMServerCli
ent.java:199)
at weblogic.nodemanager.client.NMServerClient.checkConnected(NMServerCli
ent.java:205)
at weblogic.nodemanager.client.NMServerClient.getVersion(NMServerClient.
java:52)
at weblogic.management.scripting.NodeManagerService.verifyConnection(Nod
eManagerService.java:175)
at weblogic.management.scripting.NodeManagerService.nmConnect(NodeManage
rService.java:168)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.python.core.PyReflectedFunction.__call__(Unknown Source)
at org.python.core.PyMethod.__call__(Unknown Source)
at org.python.core.PyObject.__call__(Unknown Source)
at org.python.core.PyObject.invoke(Unknown Source)
at org.python.pycode._pyx2.nmConnect$3(:118)
at org.python.pycode._pyx2.call_function()
at org.python.core.PyTableCode.call(Unknown Source)
at org.python.core.PyTableCode.call(Unknown Source)
at org.python.core.PyFunction.__call__(Unknown Source)
at org.python.core.PyObject.__call__(Unknown Source)
at org.python.pycode._pyx20.f$0(:1)
at org.python.pycode._pyx20.call_function()
at org.python.core.PyTableCode.call(Unknown Source)
at org.python.core.PyCode.call(Unknown Source)
at org.python.core.Py.runCode(Unknown Source)
at org.python.core.Py.exec(Unknown Source)
at org.python.util.PythonInterpreter.exec(Unknown Source)
at org.python.util.InteractiveInterpreter.runcode(Unknown Source)
at org.python.util.InteractiveInterpreter.runsource(Unknown Source)
at org.python.util.InteractiveInterpreter.runsource(Unknown Source)
at weblogic.management.scripting.WLST.main(WLST.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at weblogic.WLST.main(WLST.java:29)
weblogic.nodemanager.NMException: Access to domain 'soa_domain' for user 'weblog
ic' denied

as shown below



The reason is that user and password for nodemanager is not mentioned correctly.

Go to following location

C:\Oracle\Middleware\user_projects\domains\soa_domain\config\nodemanager

There you will find a file called nm_password.properties

Take a backup of it and open the file and provide the two attributes

username=weblogic
password=welcome1

Save the file and try to connect again you will be able to connect this time.

The server soa_server1 does not have a machine associated with it.

Have you ever encountered this issue at your end.

You just have installed SOA Suite and now you are trying to start your managed server from admin console and you get following messages.

Warning The server soa_server1 does not have a machine associated with it.

Warning All of the servers selected are currently in a state which is incompatible with this operation or are not associated with a running Node Manager or you are not authorized to perform the action requested. No action will be performed.

This is same error as shown below.




To resolve the issues do the following

1>Go to Machine in left panel

Create a new Machine

Name-Machine(you can provide your own name)

Machine OS: I kept it as other as i am on Windows



Say ok

Click on Machine

Go to server tab and add the managed server over there.



Now try to start the Managed server from admin console and you will see it can now be started.

Thursday, May 19, 2011

How to find the list of users in database

These two queries can be used to list down the users in your database.

select username from dba_users;

select * from all_users;

How to find the list of users in database

These two queries can be used to list down the users in your database.

select username from dba_users;

select * from all_users;

Create a domain from SOA 11.1.1.5 and OSB 11.1.1.5

This is a follow up of post

Go to following location

C:\Oracle\Middleware\Oracle_SOA1\common\bin

Click on config.cmd









Make sure that you have changed the JDBC driver type for OSB JMS provider as by default it uses Derby.Change it to oracle.1 more thing i have observer is that for other schemas i have to specify domain name also along with SID that is orcl.mydomain.company.com however for OSB JMS provider only orcl works













STart admin server and verify if you have all the server

Saturday, May 14, 2011

SOA Suite 11.1.1.5

SOA Suite 11.1.1.5 is released.

You can download the software from the following link

Just quick steps to do the set up

Install database.

Run RCU 11.1.1.5











================
WLS 10.3.5











OSB 11.1.1.5
===================














==============================

SOA 11.1.1.5