Friday, April 29, 2011

Create an inbound scenario in B2B with Aq adapter

Could not load the DLL sqljdbc.dll, or one of the DLLs it references. Reason: 193(%1 is not a valid Win32 application.)

you have a SQl Server 2005 database.You have created your RCU in the database but while creating domain you are getting following error

Component Schema=SOA Infrastructure
Driver=weblogic.jdbcx.sqlserver.SQLServerDataSource
URL=jdbc:weblogic:sqlserver://localhost:1433
User=DEV_SOAINFRA
Password=*******
SQL Test=select count(*) from dbo.schema_version_registry where owner=(select system_user) and mr_type='SOAINFRA' and version='11.1.1.4.0'

[FMWGEN][SQLServer JDBC Driver][SQLServer]Could not load the DLL sqljdbc.dll, or one of the DLLs it references. Reason: 193(%1 is not a valid Win32 application.).
CFGFWK-60850: Test Failed!

Surprisingly other schemas are working fine but the issue is coming only from soainfra schema.





The main reason for this issus is that you have not configured XA for SOA Server.

XA configuration is required to start the soa infrastructure on sql server 2005.

You can follow the document to resolve this issue.

21.2.4 XA Configuration Required to Start the SOA Infrastructure on Microsoft SQL Server 2008

http://download.oracle.com/docs/cd/E15523_01/relnotes.1111/e10132/soa.htm#CDEIFEAC

Sometimes however for 32 bit windows sqljdbc.dll doesn't work.

In that case copy the X64sqljdbc.dll and rename it to sqljdbc.dll and check this issue.This should probably resolve the issue.

Tuesday, April 26, 2011

javax.transaction.SystemException: weblogic.transaction.loggingresource.LoggingR esourceException: java.sql.SQLException: JDBC LLR

you have created a new OSB domain and you have selected the

ORACLE SErvice Bus OWSM EXtension-11.1.1.4{Oracle_OSB1}

as shown in the diagram below.




now once you set up is complete you tried to start your OSB admin server and you are getting following error message at your end.

<Apr 26, 2011 3:08:15 PM IST> <Warning> <JDBC> <BEA-001110> <No test table set u
p for pool "wlsbjmsrpDataSource". Connections will not be tested.>
<Apr 26, 2011 3:08:15 PM IST> <Warning> <JDBC> <BEA-001552> <The Logging Last Re
source (LLR) data source wlsbjmsrpDataSource will not function when it is a part
icipant in a global transaction that spans multiple WebLogic Server instances be
cause remote JDBC support is disabled. LLR will function in single-server config
urations.>
<Apr 26, 2011 3:08:17 PM IST> <Critical> <JTA> <BEA-110482> <A logging last reso
urce failed during initialization. The server cannot boot unless all configured
logging last resources (LLRs) initialize. Failing reason:
weblogic.transaction.loggingresource.LoggingResourceException: java.sql.SQLExcep
tion: JDBC LLR, table verify failed for table 'WL_LLR_ADMINSERVER', row 'JDBC LL
R Domain//Server' record had unexpected value 'soa_domain//AdminServer' expected
'OSB_domain//AdminServer'*** ONLY the original domain and server that creates a
n LLR table may access it ***

weblogic.transaction.loggingresource.LoggingResourceException: java.sql.SQLExcep
tion: JDBC LLR, table verify failed for table 'WL_LLR_ADMINSERVER', row 'JDBC LL
R Domain//Server' record had unexpected value 'soa_domain//AdminServer' expected
'OSB_domain//AdminServer'*** ONLY the original domain and server that creates a
n LLR table may access it ***
at weblogic.jdbc.wrapper.JTSLoggableResourceImpl.recoverXARecords(JTSLog
gableResourceImpl.java:248)
at weblogic.transaction.internal.ServerTransactionManagerImpl.registerLo
ggingResourceTransactions(ServerTransactionManagerImpl.java:747)
at weblogic.jdbc.common.internal.RmiDataSource.recoverLoggingResourceTra
nsactions(RmiDataSource.java:302)
at weblogic.jdbc.common.internal.DataSourceManager.createAndStartDataSou
rce(DataSourceManager.java:148)
at weblogic.jdbc.common.internal.DataSourceManager.createAndStartDataSou
rce(DataSourceManager.java:97)
Truncated. see log file for complete stacktrace
Caused By: java.sql.SQLException: JDBC LLR, table verify failed for table 'WL_LL
R_ADMINSERVER', row 'JDBC LLR Domain//Server' record had unexpected value 'soa_d
omain//AdminServer' expected 'OSB_domain//AdminServer'*** ONLY the original doma
in and server that creates an LLR table may access it ***
at weblogic.jdbc.wrapper.JTSLoggableResourceTable.newVerifyException(JTS
LoggableResourceTable.java:244)
at weblogic.jdbc.wrapper.JTSLoggableResourceTable.findOrCreateTable(JTSL
oggableResourceTable.java:327)
at weblogic.jdbc.wrapper.JTSLoggableResourceImpl.findOrCreateBackingTabl
e(JTSLoggableResourceImpl.java:528)
at weblogic.jdbc.wrapper.JTSLoggableResourceImpl.recoverXARecords(JTSLog
gableResourceImpl.java:241)
at weblogic.transaction.internal.ServerTransactionManagerImpl.registerLo
ggingResourceTransactions(ServerTransactionManagerImpl.java:747)
Truncated. see log file for complete stacktrace
>
<Apr 26, 2011 3:08:17 PM IST> <Critical> <JTA> <BEA-110482> <A logging last reso
urce failed during initialization. The server cannot boot unless all configured
logging last resources (LLRs) initialize. Failing reason:
, table verify failed for table
'WL_LLR_ADMINSERVER', row 'JDBC LLR Domain//Server' record had unexpected value
'soa_domain//AdminServer' expected 'OSB_domain//AdminServer'*** ONLY the origin
al domain and server that creates an LLR table may access it ***

javax.transaction.SystemException: weblogic.transaction.loggingresource.LoggingR
esourceException: java.sql.SQLException: JDBC LLR, table verify failed for table
'WL_LLR_ADMINSERVER', row 'JDBC LLR Domain//Server' record had unexpected value
'soa_domain//AdminServer' expected 'OSB_domain//AdminServer'*** ONLY the origin
al domain and server that creates an LLR table may access it ***
at weblogic.transaction.internal.ServerTransactionManagerImpl.registerLo
ggingResourceTransactions(ServerTransactionManagerImpl.java:752)
at weblogic.jdbc.common.internal.RmiDataSource.recoverLoggingResourceTra
nsactions(RmiDataSource.java:302)
at weblogic.jdbc.common.internal.DataSourceManager.createAndStartDataSou
rce(DataSourceManager.java:148)
at weblogic.jdbc.common.internal.DataSourceManager.createAndStartDataSou
rce(DataSourceManager.java:97)
at weblogic.jdbc.module.JDBCModule.activate(JDBCModule.java:359)
Truncated. see log file for complete stacktrace
Caused By: weblogic.transaction.loggingresource.LoggingResourceException: java.s
ql.SQLException: JDBC LLR, table verify failed for table 'WL_LLR_ADMINSERVER', r
ow 'JDBC LLR Domain//Server' record had unexpected value 'soa_domain//AdminServe
r' expected 'OSB_domain//AdminServer'*** ONLY the original domain and server tha
t creates an LLR table may access it ***
at weblogic.jdbc.wrapper.JTSLoggableResourceImpl.recoverXARecords(JTSLog
gableResourceImpl.java:248)
at weblogic.transaction.internal.ServerTransactionManagerImpl.registerLo
ggingResourceTransactions(ServerTransactionManagerImpl.java:747)
at weblogic.jdbc.common.internal.RmiDataSource.recoverLoggingResourceTra
nsactions(RmiDataSource.java:302)
at weblogic.jdbc.common.internal.DataSourceManager.createAndStartDataSou
rce(DataSourceManager.java:148)
at weblogic.jdbc.common.internal.DataSourceManager.createAndStartDataSou
rce(DataSourceManager.java:97)
Truncated. see log file for complete stacktrace
Caused By: java.sql.SQLException: JDBC LLR, table verify failed for table 'WL_LL
R_ADMINSERVER', row 'JDBC LLR Domain//Server' record had unexpected value 'soa_d
omain//AdminServer' expected 'OSB_domain//AdminServer'*** ONLY the original doma
in and server that creates an LLR table may access it ***
at weblogic.jdbc.wrapper.JTSLoggableResourceTable.newVerifyException(JTS
LoggableResourceTable.java:244)
at weblogic.jdbc.wrapper.JTSLoggableResourceTable.findOrCreateTable(JTSL
oggableResourceTable.java:327)
at weblogic.jdbc.wrapper.JTSLoggableResourceImpl.findOrCreateBackingTabl
e(JTSLoggableResourceImpl.java:528)
at weblogic.jdbc.wrapper.JTSLoggableResourceImpl.recoverXARecords(JTSLog
gableResourceImpl.java:241)
at weblogic.transaction.internal.ServerTransactionManagerImpl.registerLo
ggingResourceTransactions(ServerTransactionManagerImpl.java:747)
Truncated. see log file for complete stacktrace
>
<Apr 26, 2011 3:08:17 PM IST> <Error> <Deployer> <BEA-149231> <Unable to set the
activation state to true for the application 'wlsbjmsrpDataSource'.
weblogic.application.ModuleException:
at weblogic.jdbc.module.JDBCModule.activate(JDBCModule.java:362)
at weblogic.application.internal.flow.ModuleListenerInvoker.activate(Mod
uleListenerInvoker.java:227)
at weblogic.application.internal.flow.DeploymentCallbackFlow$2.next(Depl
oymentCallbackFlow.java:541)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD
river.java:52)
at weblogic.application.internal.flow.DeploymentCallbackFlow.activate(De
ploymentCallbackFlow.java:175)
Truncated. see log file for complete stacktrace
Caused By: java.sql.SQLException: JDBC LLR, table verify failed for table 'WL_LL
R_ADMINSERVER', row 'JDBC LLR Domain//Server' record had unexpected value 'soa_d
omain//AdminServer' expected 'OSB_domain//AdminServer'*** ONLY the original doma
in and server that creates an LLR table may access it ***
at weblogic.jdbc.wrapper.JTSLoggableResourceTable.newVerifyException(JTS
LoggableResourceTable.java:244)
at weblogic.jdbc.wrapper.JTSLoggableResourceTable.findOrCreateTable(JTSL
oggableResourceTable.java:327)
at weblogic.jdbc.wrapper.JTSLoggableResourceImpl.findOrCreateBackingTabl
e(JTSLoggableResourceImpl.java:528)
at weblogic.jdbc.wrapper.JTSLoggableResourceImpl.recoverXARecords(JTSLog
gableResourceImpl.java:241)
at weblogic.transaction.internal.ServerTransactionManagerImpl.registerLo
ggingResourceTransactions(ServerTransactionManagerImpl.java:747)
Truncated. see log file for complete stacktrace
>


Here OSB_domain is the name of my domain which i have created and trying to start as shown below.




This issue occurs because by default RECORDSTR in WL_LLR_ADMINSERVER is set to

'JDBC LLR Domain//Server' and when we create a new domain it just contradict with the name of the domain.We can esily get rid of this by either delete the record itslelf before the installation or we can just update it using the following command

update WL_LLR_ADMINSERVER set RECORDSTR = 'OSB_domain//AdminServer' where XIDSTR= 'JDBC LLR Domain//Server';

commit;


Here OSB_domain in the name of my domain inyou case you have to replace this value with the name of your domain.

Once you change this try to restart the server and it will run fine.

Once more thing you have to log in to your SOAINFRA schema to perform this action as shown below

Monday, April 25, 2011

How to secure an OSB service

http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/security/owsm.html

Have written a simple java programme as shown below.

package classes;

public class Test {
public String getValue(String name) {
return("hello " + name + " How are you?");
}

public static void main(String[] args) {
Test test = new Test();
System.out.println(test.getValue("arpit"));
}
}

I am creating a web service out of it.

This is the same programme with a bit of modification as i have used in my following post.

http://soa-bpel-esb.blogspot.com/2011/04/how-to-get-wsdl-of-proxy-service-in-osb.html

So now once the web service is created.

Tuesday, April 19, 2011

Distributed Queue in SOA Suite 11g

A distributed queue is a set of physical queue across cluster.When you use distirbuted queue the message can be send to any one of the queue.It is used because it provides load balancing and failover,Hence it is reuired to have a cluster set up so that if queue in node has some issue the message can be redirected to other queue in other node.

You can review following documents initially to get some idea on Uniform distributed queue

http://download.oracle.com/docs/cd/E13222_01/wls/docs90/jms/dds.html

http://download.oracle.com/docs/cd/E12839_01/apirefs.1111/e13952/taskhelp/jms_modules/distributed_queues/CreateUniformDistributedQueues.html

Now we will start will our configuration and see how does it work actually.

I am using a SOA Suite cluster which is spread across two physical machine.

soa_server1 and soa_server2

Have configured two migratable server also for the same.

We will now see how we can do the configuration.


Steps are as follow

1>Log in to admin console

Go to messaging and create a JMS server

Point it to a file store.

Use a local location for the persistent store.

In the target server use soa_server(migratable)



Similarly create a second file store and point it to the same file store location in your local machine.

We will now target it to soa_server2(migratable)



So now your configuration should contain two jms server as shown below



Create a JMS module and target it to the soa cluster as shown



Create a new sub deployment and target it to the JMS server that we have created earlier



create a connection factory and target it to cluster.
Add the subdeployment that we have create earlier to the connection factory.



Now create a sub deployment and also attach the subdeployment to it.



So now your configuration should look something like this.



This is the only configuration we need to do from console,

Now we are good to go ahead with testing of this process.

We will use the QueueSend.java programme that is provided with default installation

We will just change the connection factories and queue values.

Will do the setEnv.cmd and will run this java programmer to insert the data in the queue.

Since distributed queue is distributed across server.

Try to insert data in one of the server and you will find the messages gets distributed evenly

on all the servers in the cluster.

there is one more configuration which needs to be checked,The Server Affinity Enabled parameter should be un-checked in Connection factory –> Configuration –> Load Balance

Monday, April 18, 2011

java.lang.NoClassDefFoundError: oracle/tip/adapter/file/FileLogger

you are getting the following error messages while starting your soa server and when the soa server starts you find that the FTPAdapter is in Failed state

<Apr 19, 2011 10:08:10 AM IST> <Error> <Deployer> <BEA-149231> <Unable to set th
e activation state to true for the application 'FtpAdapter'.
java.lang.NoClassDefFoundError: oracle/tip/adapter/file/FileLogger
at oracle.tip.adapter.ftp.FTPManagedConnectionFactory.createConnectionFa
ctory(FTPManagedConnectionFactory.java:154)
at weblogic.connector.security.layer.AdapterLayer.createConnectionFactor
y(AdapterLayer.java:787)
at weblogic.connector.outbound.ConnectionPool.getConnectionFactory(Conne
ctionPool.java:2013)
at weblogic.connector.outbound.RAOutboundManager.activatePool(RAOutbound
Manager.java:1076)
at weblogic.connector.outbound.RAOutboundManager.activate(RAOutboundMana
ger.java:183)
Truncated. see log file for complete stacktrace
Caused By: java.lang.NoClassDefFoundError: oracle/tip/adapter/file/FileLogger
at oracle.tip.adapter.ftp.FTPManagedConnectionFactory.createConnectionFa
ctory(FTPManagedConnectionFactory.java:154)
at weblogic.connector.security.layer.AdapterLayer.createConnectionFactor
y(AdapterLayer.java:787)
at weblogic.connector.outbound.ConnectionPool.getConnectionFactory(Conne
ctionPool.java:2013)
at weblogic.connector.outbound.RAOutboundManager.activatePool(RAOutbound
Manager.java:1076)
at weblogic.connector.outbound.RAOutboundManager.activate(RAOutboundMana
ger.java:183)
Truncated. see log file for complete stacktrace
>
<Apr 19, 2011 10:08:10 AM IST> <Error> <Deployer> <BEA-149250> <Unable to unprep
are application 'FtpAdapter'.
weblogic.application.ModuleException: Error occurred while trying to rollback th
e module: weblogic.connector.exception.RAException:

There are 1 nested errors:



There are 1 nested errors:

ObjectLifeCycleException: weblogic.common.resourcepool.ObjectLifeCycleException:
Attempted to shutdown the pool eis/Ftp/HAFtpAdapterDB2 when it is currently not
in SUSPENDED state (Running)
at weblogic.common.resourcepool.ResourcePoolImpl.shutdown(ResourcePoolIm
pl.java:299)
at weblogic.connector.outbound.ConnectionPool.shutdown(ConnectionPool.ja
va:355)
at weblogic.connector.outbound.RAOutboundManager.internalShutdownPool(RA
OutboundManager.java:346)
at weblogic.connector.outbound.RAOutboundManager.rollback(RAOutboundMana
ger.java:305)
at weblogic.connector.common.RAInstanceManager.rollbackRAOutboundMgr(RAI
nstanceManager.java:623)
at weblogic.connector.common.RAInstanceManager.rollback(RAInstanceManage
r.java:566)
at weblogic.connector.deploy.ConnectorModule.unprepare(ConnectorModule.j
ava:268)
at weblogic.application.internal.flow.ModuleListenerInvoker.unprepare(Mo
duleListenerInvoker.java:285)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.previous(
DeploymentCallbackFlow.java:523)
at weblogic.application.utils.StateMachineDriver.previousState(StateMach
ineDriver.java:223)
at weblogic.application.utils.StateMachineDriver.previousState(StateMach
ineDriver.java:215)
at weblogic.application.internal.flow.DeploymentCallbackFlow.unprepare(D
eploymentCallbackFlow.java:211)
at weblogic.application.internal.flow.DeploymentCallbackFlow.unprepare(D
eploymentCallbackFlow.java:202)
at weblogic.application.internal.BaseDeployment$1.previous(BaseDeploymen
t.java:619)
at weblogic.application.utils.StateMachineDriver.previousState(StateMach
ineDriver.java:223)
at weblogic.application.utils.StateMachineDriver.previousState(StateMach
ineDriver.java:215)
at weblogic.application.internal.BaseDeployment.unprepare(BaseDeployment
.java:248)
at weblogic.application.internal.SingleModuleDeployment.unprepare(Single
ModuleDeployment.java:43)
at weblogic.application.internal.DeploymentStateChecker.unprepare(Deploy
mentStateChecker.java:205)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.unprepare(A
ppContainerInvoker.java:117)
at weblogic.deploy.internal.targetserver.BasicDeployment.unprepare(Basic
Deployment.java:287)
at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromSer
verLifecycle(BasicDeployment.java:363)
at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(De
ploymentAdapter.java:51)
at weblogic.management.deploy.internal.DeploymentAdapter.activate(Deploy
mentAdapter.java:200)
at weblogic.management.deploy.internal.AppTransition$2.transitionApp(App
Transition.java:30)
at weblogic.management.deploy.internal.ConfiguredDeployments.transitionA
pps(ConfiguredDeployments.java:240)
at weblogic.management.deploy.internal.ConfiguredDeployments.activate(Co
nfiguredDeployments.java:169)
at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(Conf
iguredDeployments.java:123)
at weblogic.management.deploy.internal.DeploymentServerService.resume(De
ploymentServerService.java:180)
at weblogic.management.deploy.internal.DeploymentServerService.start(Dep
loymentServerService.java:96)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)



at weblogic.connector.deploy.ConnectorModule.unprepare(ConnectorModule.j
ava:273)
at weblogic.application.internal.flow.ModuleListenerInvoker.unprepare(Mo
duleListenerInvoker.java:285)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.previous(
DeploymentCallbackFlow.java:523)
at weblogic.application.utils.StateMachineDriver.previousState(StateMach
ineDriver.java:223)
at weblogic.application.utils.StateMachineDriver.previousState(StateMach
ineDriver.java:215)
Truncated. see log file for complete stacktrace
Caused By: weblogic.connector.exception.RAException:

There are 1 nested errors:



There are 1 nested errors:

ObjectLifeCycleException: weblogic.common.resourcepool.ObjectLifeCycleException:
Attempted to shutdown the pool eis/Ftp/HAFtpAdapterDB2 when it is currently not
in SUSPENDED state (Running)
at weblogic.common.resourcepool.ResourcePoolImpl.shutdown(ResourcePoolIm
pl.java:299)
at weblogic.connector.outbound.ConnectionPool.shutdown(ConnectionPool.ja
va:355)
at weblogic.connector.outbound.RAOutboundManager.internalShutdownPool(RA
OutboundManager.java:346)
at weblogic.connector.outbound.RAOutboundManager.rollback(RAOutboundMana
ger.java:305)
at weblogic.connector.common.RAInstanceManager.rollbackRAOutboundMgr(RAI
nstanceManager.java:623)
at weblogic.connector.common.RAInstanceManager.rollback(RAInstanceManage
r.java:566)
at weblogic.connector.deploy.ConnectorModule.unprepare(ConnectorModule.j
ava:268)
at weblogic.application.internal.flow.ModuleListenerInvoker.unprepare(Mo
duleListenerInvoker.java:285)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.previous(
DeploymentCallbackFlow.java:523)
at weblogic.application.utils.StateMachineDriver.previousState(StateMach
ineDriver.java:223)
at weblogic.application.utils.StateMachineDriver.previousState(StateMach
ineDriver.java:215)
at weblogic.application.internal.flow.DeploymentCallbackFlow.unprepare(D
eploymentCallbackFlow.java:211)
at weblogic.application.internal.flow.DeploymentCallbackFlow.unprepare(D
eploymentCallbackFlow.java:202)
at weblogic.application.internal.BaseDeployment$1.previous(BaseDeploymen
t.java:619)
at weblogic.application.utils.StateMachineDriver.previousState(StateMach
ineDriver.java:223)
at weblogic.application.utils.StateMachineDriver.previousState(StateMach
ineDriver.java:215)
at weblogic.application.internal.BaseDeployment.unprepare(BaseDeployment
.java:248)
at weblogic.application.internal.SingleModuleDeployment.unprepare(Single
ModuleDeployment.java:43)
at weblogic.application.internal.DeploymentStateChecker.unprepare(Deploy
mentStateChecker.java:205)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.unprepare(A
ppContainerInvoker.java:117)
at weblogic.deploy.internal.targetserver.BasicDeployment.unprepare(Basic
Deployment.java:287)
at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromSer
verLifecycle(BasicDeployment.java:363)
at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(De
ploymentAdapter.java:51)
at weblogic.management.deploy.internal.DeploymentAdapter.activate(Deploy
mentAdapter.java:200)
at weblogic.management.deploy.internal.AppTransition$2.transitionApp(App
Transition.java:30)
at weblogic.management.deploy.internal.ConfiguredDeployments.transitionA
pps(ConfiguredDeployments.java:240)
at weblogic.management.deploy.internal.ConfiguredDeployments.activate(Co
nfiguredDeployments.java:169)
at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(Conf
iguredDeployments.java:123)
at weblogic.management.deploy.internal.DeploymentServerService.resume(De
ploymentServerService.java:180)
at weblogic.management.deploy.internal.DeploymentServerService.start(Dep
loymentServerService.java:96)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)



at weblogic.connector.common.RAInstanceManager.rollback(RAInstanceManage
r.java:552)
at weblogic.connector.deploy.ConnectorModule.unprepare(ConnectorModule.j
ava:268)
at weblogic.application.internal.flow.ModuleListenerInvoker.unprepare(Mo
duleListenerInvoker.java:285)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.previous(
DeploymentCallbackFlow.java:523)
at weblogic.application.utils.StateMachineDriver.previousState(StateMach
ineDriver.java:223)
Truncated. see log file for complete stacktrace
>
<Apr 19, 2011 10:08:16 AM IST> <Warning> <oracle.wsm.resources.policyaccess> <WS
M-06219> <A task scheduler was not available for configuring the oracle.wsm.poli
cymanager.accessor.BeanAccessor repository accessor for the default context.>
Warning: Starting ADF Library jar post-deployment on WebLogic Server. Is "provid
er-lazy-inited" init-param missing from LibraryFilter? Ignore this warning if th
e ADFJspResourceProvider is not being used.
Started: ADF Library non-ADFJspResourceProvider post-deployment
Finished: ADF Library non-ADFJspResourceProvider post-deployment (millis): 578



I will tell you the scenario how we can create this error

By default the File adapter has a deployment order of 321 and FTP adapter has a deployment order of 325.


I logged in to the admin console

http://localhost:port/console

Went to deployment,stopped and deleted FTP adapter from admin console deployment

Then i redeployed it from the FTPAdapter.rar file located in BEA_HOME/Oracle_SOA1/soa/connectors

When redeploying it takes a deployment order of 100 by default.

It completed successfully and i can see that now FTP adapter is in running state in my deployment list.



So everything is working fine but if you will restart the server now you will get an exception as i have pointed above and also FTP server will be in failed state.



This is because FTP adapter needs some class file from FileAdapter so once the deployment order of FTP adapter is 100 it is less than FileAdapter's 321 hence it will try to deploy FTP first rather than FileADapter and hence will cause this error.SO in order to overcome this issue



I changed the order of deployment back to 325

and restarted the server and this time FTP adapter comes fine with new Deployment order of 325 as shown below.



There is an another alternative for this issue also that is

Put the FileAdapter.rar file in the $domain_home/lib and restart the server.

As you will go through the readme.txt located in this folder,it says these rar files will be picked onrun time.

so as soon as you will start the server the F‎ileAdapter will be picked up from this location much before as per the deployment order hence FTP adpater will come up fine.But i prefer to change the deployment order as it is not a good practice to use File ADapter uploaded at run time.Moreover you may come across other issues also when you will restart your server.

Thursday, April 14, 2011

Automatically purge versions of metadata documents older than the given time interval.

It is mentioned properly in the following document

6.3 Purging Document Version History

http://download.oracle.com/docs/cd/E14571_01/core.1111/e10108/mds.htm#BEIFIBEF

Automatic purge can be performed in two ways

1>Add the following to your adf-config.xml and then deploy it to your project

<persistence-config>
<auto-purge seconds-to-live="T"/>
</persistence-config>


You can get the adf-config.xml in your jdeveloper as shown below.
Here time out is in seconds




You can also set the same from em console also

Log in to your em console

http://host:port/em

Go to Soa-infra-->Administration-->System MBean Browser

as shown below



Now Navigate to following path

Application Defined MBeans-->oracle.adf.share.config-->Server:AdminServer

-->Application:sos-infra-->ADFConfig-->MDSAppConfig as shown below

Here you can see a property called as AutoPurgeTimeToLive

you can set the value as per your requirement and it will have same result

as the changes done in adf-config.xml

Tuesday, April 12, 2011

ORA-00845: MEMORY_TARGET not supported on this system

It is a very common issue that we always encounter while installing or starting database.You have started your listener and now when you are trying to start your database it comes up with errors

SQL> connect / as sysdba
Connected to an idle instance.
SQL> startup;
ORA-00845: MEMORY_TARGET not supported on this system

I followed the following document

http://forums.oracle.com/forums/thread.jspa?threadID=1113265

I am not at all aware of any command given in this link

I opened a command console ,went to DB_HOME\bin location and did

SQL> startup
ORA-00845: MEMORY_TARGET not supported on this system
SQL> df -k
SP2-0042: unknown command "df -k" - rest of line ignored.
SQL> quit
Disconnected
bash-3.2$ df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda2 6092388 3379808 2398108 59% /
/dev/hda3 3050092 77600 2815056 3% /tmp
/dev/hda5 35448964 29045060 4574104 87% /refresh
/dev/hda1 101086 27987 67880 30% /boot
tmpfs 1558032 0 1558032 0% /dev/shm
bash-3.2$ mount -t tmpfs shmfs -o size=2048m /dev/shm
mount: only root can do that
bash-3.2$ su -oracle
su: invalid option -- o
Try `su --help' for more information.
bash-3.2$ su
Password:
su: incorrect password
bash-3.2$ su root
Password:
[root@192-168-203-10 bin]# mount -t tmpfs shmfs -o size=2048m /dev/shm

[root@192-168-203-10 bin]# su oracle
$ su oracle
Password:

$ ./sqlplus

SQL*Plus: Release 11.2.0.1.0 Production on Tue Apr 12 00:54:42 2011

Copyright (c) 1982, 2009, Oracle. All rights reserved.

Enter user-name: sys as sysdba
Enter password:
Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 2042241024 bytes
Fixed Size 1337548 bytes
Variable Size 1342179124 bytes
Database Buffers 687865856 bytes
Redo Buffers 10858496 bytes
Database mounted.
Database opened.
SQL>

Sunday, April 10, 2011

How to create partition in soa suite 11g.

In SOA suite 10g we were having concept of creating separate domains to separate the applications for different domain,In soa suite 11g we do not have the concept of creating a domain however we have something different that is called as creating partition,which is used to separte the box where you can deploy your process.It will be more clear with the following exercise.


Open a command prompt and set your JAVA_HOME,ORACLE_HOME and ANT_HOME as shown below.




Now go the your ORACLE_SOA home/bin folder and execute the following command

ant -f ant-sca-mgmt.xml createPartition -Dhost=localhost -Dport="managed server port" -Duser=weblogic -Dpassword=welcome1 -Dpartition="name of partition"




Verify if it is completed ,It should show a success message as shown below



Now just log in to em console and you can see a new partition is created called "ankit" now you can deploy your process to this new partition.



now if you will right click on soa-infra you will get an extra option that is manage partition which otherwise you will not get in a default installation.Click on that and you can list down the partition available.you can now create new partition from console itself.





Now if you will try to deploy a process from jdeverloper you will get two option in the list of partition as a drop down to select the partition you wanted to deploy your project or you can also deploy the sar file directly to the partition from the em console.

Tuesday, April 05, 2011

Understanding and Configuring Store and Forward(SAF) in SOA Suite 11g

Store and Forward has basically the same functionality as that of Bridge however the main extra point here is that the message are store in the source also.You can get a better definition of S-A-F from this documentation.It provides reliable messaging because even thought the target is not available it will keep the message in persistence store and will try once the target system will be active.


I am using two domains to configure the same.In this exercise we will configure the JMS Server,JMS module,Sub deployment and connection factory and simple queue ,we will create SAF agent,SAF context and SAF imported destination queue.This will be more clear as we will move forward in our exercise.

At my end i have two domain

DomainA running in 7001 port
DomainB running in 7777 port

I have not created a separate managed server the soa server is running in adminserver itself.

I will first create the required fileds in DomainA

In domainA we will create JMS Server,JMS Module,Subdeployment,Connection Factory and Queue in the same order.

So log in to Admin console

http://localhost:7001/console

Create a JMS Server and point it to your admin server.



Now create a JMS module also and target it to admin server.



Create a subdeployment and target it to the JMS Server you have just created.



Create a connection Factory and a Queue with their target pointed to the subdeploymnet which you have just created.

Give some jndi name to connection factory and queue as shown




Now log in to the other domain and Create a Store and Forward AGent

Go to Services-->Messaging-->Store and Forward AGents

and make it as Sending only as shown



Create a JMS module and target it to the admin server.



create a subdeployment and target it to the SAF agent that you have created as shown below



Now create a Remote SAF context and in the url specify the url for the DomainA.
Specify the user name and password.



create a remote SAF destination.

Choose the remote SAF context as the one you have created earleir.

Give some JNDI prefix.



NOw go to queue tab in SAF imported destination and create a queue.

Here specify the JNDI name of the remote queue as the JNDI name of queue which you have created in domain A.

Specify some local JNDI name also for local server to interact with queue.



You have to make sure that the SAF imported Destination is pointing to the Subdeployment which you have created.



now create a conenction factory and also point it to the subdeployment which you have created.So in all your JMS module will contain following



so now we are done with the set up

Now the only thing is to post the message to the SAF queue.

For this purpose we will use the Default sample that is provided in

WL_HOME\samples\server\examples\src\examples\jms\queue folder to send messgaes to the SAFQueue.

The Java program is QueueSend.java.

I am not good in java programming otherwise i would have wished to write my own java program ,however you can do a search in google and find a number of links which says how to post a message to a queue.

Again while posting your message to the SAF queue you have to take care of two things

Since we have defined our SAF context and SAF remote destination in Domain B we have to use the conenction factory that we have defined in domain B.

Further one important point is that name of the queue

The name of queue which should be provide is prefix+local JNDI name of queue

In my case i have give prefix as "Ankit" and the local JNDI name for my queue is

LocalSAFqueue

So the name of queue which i should use in my case is

AnkitLocalSAFqueue.

Now once you have made the changes in your QueueSend.java code.

YOu can compile it.

Save the project in some folder location.

Open a command prompt and navigate to the location where java program is saved and do a javac QueueSend.java

And as expected you will a series of error like this


C:\SendQueueJava>javac QueueSend.java
QueueSend.java:7: package javax.jms does not exist
import javax.jms.*;
^
QueueSend.java:31: cannot find symbol
symbol : class QueueConnectionFactory
location: class QueueSend
private QueueConnectionFactory qconFactory;
^
QueueSend.java:32: cannot find symbol
symbol : class QueueConnection
location: class QueueSend
private QueueConnection qcon;
^
QueueSend.java:33: cannot find symbol
symbol : class QueueSession
location: class QueueSend
private QueueSession qsession;
^
QueueSend.java:34: cannot find symbol
symbol : class QueueSender
location: class QueueSend
private QueueSender qsender;
^
QueueSend.java:35: cannot find symbol
symbol : class Queue
location: class QueueSend
private Queue queue;
^
QueueSend.java:36: cannot find symbol
symbol : class TextMessage
location: class QueueSend
private TextMessage msg;
^
QueueSend.java:48: cannot find symbol
symbol : class JMSException
location: class QueueSend
throws NamingException, JMSException
^
QueueSend.java:65: cannot find symbol
symbol : class JMSException
location: class QueueSend
public void send(String message) throws JMSException {
^
QueueSend.java:74: cannot find symbol
symbol : class JMSException
location: class QueueSend
public void close() throws JMSException {
^
QueueSend.java:97: cannot find symbol
symbol : class JMSException
location: class QueueSend
throws IOException, JMSException
^
QueueSend.java:50: cannot find symbol
symbol : class QueueConnectionFactory
location: class QueueSend
qconFactory = (QueueConnectionFactory) ctx.lookup(JMS_FACTORY);
^
QueueSend.java:52: cannot find symbol
symbol : variable Session
location: class QueueSend
qsession = qcon.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
^
QueueSend.java:53: cannot find symbol
symbol : class Queue
location: class QueueSend
queue = (Queue) ctx.lookup(queueName);
^
14 errors


This is because you have not set the JAVA HOme and other necessary jar file in the path.

In order to make it simle just execute the setWLSEnv.cmd command

C:\SendQueueJava>C:\SOA\wlserver_10.3\server\bin\setWLSEnv.cmd

It will automatically set everything for you.



now run your program

java QueueSend t3://localhost:7777



Now you can check the data is publised in the remote queue of domainA

Now for testing purpose if SAF really works the way it is supposed to way . I shut down the domainA and then tried to insert the data in the SAF queue.

I send another data to check if any error occurs,I couldn't got any exception in my command console.Now i started the domainA server also.

and with all my expectation as soon as i started domainA all the data got published to remote queue

Configure Message bridge in Weblogic server(SOA Suite)

Message Bridge is a forwarding mechanism which help us in forwarding message through a bridge from source to destination.A much better definition along with diagram you can find in the following location



In this exercise we will see how we can create a message bridge to forward message from queue in one domain to queue in other domain.

for this Exercise you need essentially two domain.

Let suppose the two domains are DomainA and DomainB

We will create JMS Server,JMS Module,Subdeployment,JMS connection factory and JMS queue in both the domains.

Then in one of the domain we will create a Source and destination JMS Bridge destination and will create a bridge to forward the message from Source to Target destination.

In my set up i have two domain

DomainA has admin server running in 7777 and SOA_server running in 8888 port

DomainB has admin server running in 7001 and SOA_server running ins 8001 port

Now go to domainB and start doing the configuration

First of all i will create a JMS Server



Target it to the soa server



Create JMS Module



Target it to server



Create Sub Deployment



Target it to the JMS SErver you have created earlier.



create connection factory



Target to subdeployment




Create Queue



Target it to SubDeployment



Similarly for the other node we will do the similar configuration

Create JMS Server




Create JMS Module





Create SubDeployment



Create Connection factory



Create Queue





Create a Bridge Destination on First node
Source Bridge Destination will be basically using the connection factory and queue of the server where you are doing the configuration



Provide details for source bridge



Similarly configure Target bridge destination



Now Configure a Bridge



Select source destination



select message provider for source



Choose target destination



Choose message provider for destination also



Target it to your managed server



finish the wizard and restart both the managed server in two domains.



Now once you restart the server.Go again to your Bridge -->Monitoring tab and verify the bridge is active and is forwarding the message as shown below.






If this is not active that means you have done some misconfiguration.Or it has not started properly.Go to Bridge General tab and unselect started button save it and again click on start and save,It will ask you to restart the server.Restart and check if it is now active.



So now all your configuration are complete.

Now just create a outbopund connection pool to connect to the local queue

Create a simple process in jdeveloper or if you are good in java create a java program to insert some data in local queue of domain A.

Test this.

As soon as you will pass the data it will pass from the source queue to the destination queue in other domain.This worked fine at my end let me know if you have issue in the same.