Thursday, December 24, 2015

File/FTP adapter is not able to pick file from a location


While working in an upgrade project i got this issue.

The process was working fine in 10g but when we upgraded it to 12c via 11g, it wasn't polling from the location.

If you are facing this issue then you can look in to the following details

1> Location where the file/ftp adapter is polling has the permission to read/write file.
2> File placed in the polling location has correct naming convention.
3> File placed has input file which can be validated against schema defined in the BPEL process.


This was more of a lesson learned, I did all these steps but still was not able to read the file from the location.

Now when you upgrade your code from a lower version it does add some additional parameter to your file naming convention.

In my case the process was looking for any file with following naming convention

edi*.txt

So in the JCA file it should ideally be updated as edi.*\.txt

However if you migrate this code it adds additional parameters to this naming convention in JCA file.

So post migration the naming convention got change to edi.*\\.*.txt

Even though it gets changed to the incorrect format, Ideally changing it in run time should enable the process to read file

YOu can go to the process in em console

Select the file read adapter and go to adapter properties to change the value of jca in run time



But to my surprise even after changing the value in em console this was not picking the data.

This is because of a know bug in 12c.

Once you change the jca values at run time you should restart your service from em console.

You can select the process --> Shut it down and then Restart.

Once i did followed the steps my process was able to pick the file from the location.

You still might face issue even after doing all these steps in case of a logical directory.

This is because when a process with logical directory is migrated to 12c the logical path name is moved out of binding in composite.xml

So in order to make sure your logical path gets changed from em console , ensure that your logical name is defined within the binding.jca

<Service>
<interface.wsdl/>
<bindind.jca>
<property name="InputDirectory">/home/Oracle/Poll</property>
</bindind.jca>
</Service>

If you follow all these steps you should be able to poll file

Archieve file in File/FTP adapter


In a normal File/FTP adapter we do not specify the naming convention for File.

In SOA 10g by default it used to append timestamp in the existing file name before writing it to the archieve file.

However in case of 11g or 12c this is totally different.

10g -filename_yyyymmdd_hh24mmss

11g/12c -filename_encryptedToken_yyyymmdd_hh24mmss

If you are working in a migration project this might be a big issue and you will have to fight big time to resolve this issue.

This issue can be resolve by using following propery




By default UseDigest is set to true which leads to the encrypted token being appended in the filename and timestamp as filename_digest_timestamp.
Setting this property to false will change the format to filename_timetamp.

11g

Edit the .jca file to include this property as given below.

<property name="UseDigest" value="false"/>



In 12c

Open the composite.xml

go to the file adapter

and define the property within the jca-binding tab

<jca-binding>
<property name="UseDigest" value="false"/>
</jca-binding>


Wednesday, November 04, 2015

[java.net.connectexception: connection refused: connect while publishing data in to OER from JDeveloper


while publishing data in to OER from Jdeveloper 12c i got below error

introspect-project:
[repository.submit] failed to get authtoken due to: [{http://schemas.xmlsoap.org/soap/envelope/}server.userexception] [java.net.connectexception: connection refused: connect] [java.net.connectexception: connection refused: connect]
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.net.ConnectException: Connection refused: connect
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFactory.java:153)
at org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFactory.java:120)
at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)
at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
at org.apache.axis.client.Call.invoke(Call.java:2748)
at org.apache.axis.client.Call.invoke(Call.java:2424)
at org.apache.axis.client.Call.invoke(Call.java:2347)
at org.apache.axis.client.Call.invoke(Call.java:1804)
at com.flashline.registry.openapi.service.v300.FlashlineRegistryTrSoapBindingStub.authTokenCreateWithLicense(FlashlineRegistryTrSoapBindingStub.java:7646)
at com.oracle.oer.sync.plugin.writer.oer.ALERConnectionCache.getAuthToken(ALERConnectionCache.java:136)
at com.oracle.oer.sync.plugin.writer.oer.ALERAssetQueries.getToken(ALERAssetQueries.java:82)
at com.oracle.oer.sync.plugin.writer.oer.ALERAssetQueries.assetTypeQueryByUUID(ALERAssetQueries.java:172)
at com.oracle.oer.sync.framework.MetadataManager.putAssetType(MetadataManager.java:206)
at com.oracle.oer.sync.framework.impl.DefaultPluginManager.processIntrospector(DefaultPluginManager.java:105)
at com.oracle.oer.sync.framework.impl.DefaultPluginManager.<init>(DefaultPluginManager.java:74)
at com.oracle.oer.sync.framework.MetadataManager.init(MetadataManager.java:308)
at com.oracle.oer.sync.framework.ant.IntrospectTask.createMetadataManager(IntrospectTask.java:404)
at com.oracle.oer.sync.framework.ant.IntrospectTask.getMetadataManager(IntrospectTask.java:389)
at com.oracle.oer.sync.framework.ant.IntrospectTask.performRepositoryWork(IntrospectTask.java:346)
at com.oracle.oer.sync.framework.ant.RepositoryTaskBase.execute(RepositoryTaskBase.java:182)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.Main.runBuild(Main.java:851)
at org.apache.tools.ant.Main.startAnt(Main.java:235)
at org.apache.tools.ant.Main.start(Main.java:198)
at org.apache.tools.ant.Main.main(Main.java:286)

{http://xml.apache.org/axis/}hostname:XXXX

java.net.ConnectException: Connection refused: connect
at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:154)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
at org.apache.axis.client.Call.invoke(Call.java:2748)
at org.apache.axis.client.Call.invoke(Call.java:2424)
at org.apache.axis.client.Call.invoke(Call.java:2347)
at org.apache.axis.client.Call.invoke(Call.java:1804)
at com.flashline.registry.openapi.service.v300.FlashlineRegistryTrSoapBindingStub.authTokenCreateWithLicense(FlashlineRegistryTrSoapBindingStub.java:7646)
at com.oracle.oer.sync.plugin.writer.oer.ALERConnectionCache.getAuthToken(ALERConnectionCache.java:136)
at com.oracle.oer.sync.plugin.writer.oer.ALERAssetQueries.getToken(ALERAssetQueries.java:82)
at com.oracle.oer.sync.plugin.writer.oer.ALERAssetQueries.assetTypeQueryByUUID(ALERAssetQueries.java:172)
at com.oracle.oer.sync.framework.MetadataManager.putAssetType(MetadataManager.java:206)
at com.oracle.oer.sync.framework.impl.DefaultPluginManager.processIntrospector(DefaultPluginManager.java:105)
at com.oracle.oer.sync.framework.impl.DefaultPluginManager.(DefaultPluginManager.java:74)
at com.oracle.oer.sync.framework.MetadataManager.init(MetadataManager.java:308)
at com.oracle.oer.sync.framework.ant.IntrospectTask.createMetadataManager(IntrospectTask.java:404)
at com.oracle.oer.sync.framework.ant.IntrospectTask.getMetadataManager(IntrospectTask.java:389)
at com.oracle.oer.sync.framework.ant.IntrospectTask.performRepositoryWork(IntrospectTask.java:346)
at com.oracle.oer.sync.framework.ant.RepositoryTaskBase.execute(RepositoryTaskBase.java:182)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.Main.runBuild(Main.java:851)
at org.apache.tools.ant.Main.startAnt(Main.java:235)
at org.apache.tools.ant.Main.start(Main.java:198)
at org.apache.tools.ant.Main.main(Main.java:286)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFactory.java:153)
at org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFactory.java:120)
at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)
at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
... 38 more
[repository.submit] An error occurred performing the Repository operation:
[repository.submit] com.oracle.oer.sync.framework.MetadataIntrospectionException: com.oracle.oer.sync.framework.MetadataIntrospectionException: Unable to read plugin file: C:\Oracle\Middleware\Oracle_Home\jdeveloper\harvester\plugins\biz.introspector

The reason for the error was that the oer managed server was not properly up and running.

I restarted the admin server and OER managed server and i was then able to resolve this issue.

Make sure OER server is up and running before you run the wizard to publish the artifacts to OER From JDeveloper

Sunday, October 25, 2015

Error: Unable to find asset type in OER: ed1ed5 34-39b8-11de-bee0-79d657a0a2b0


I was trying to submit a project from Jdeveloper in Oracle enterprise repository and i got below error

NOTE: To harvest Oracle Service Bus 10 projects, please use osb10harvest.bat
com.oracle.oer.sync.framework.MetadataIntrospectionException: com.oracle.oer.syn
c.framework.MetadataIntrospectionException: com.oracle.oer.sync.framework.Metada
taIntrospectionRuntimeException: Error: Unable to find asset type in OER: ed1ed5
34-39b8-11de-bee0-79d657a0a2b0. Please make sure that the Harvester Solution Pa
ck is installed in OER.
at com.oracle.oer.sync.framework.MetadataManager.init(MetadataManager.ja
va:317)
at com.oracle.oer.sync.framework.Introspector.(Introspector.java:2
61)
at com.oracle.oer.sync.framework.Introspector.main(Introspector.java:537
)
Caused by: com.oracle.oer.sync.framework.MetadataIntrospectionException: com.ora
cle.oer.sync.framework.MetadataIntrospectionRuntimeException: Error: Unable to f
ind asset type in OER: ed1ed534-39b8-11de-bee0-79d657a0a2b0. Please make sure t
hat the Harvester Solution Pack is installed in OER.
at com.oracle.oer.sync.framework.impl.DefaultPluginManager.processIntros
pector(DefaultPluginManager.java:157)
at com.oracle.oer.sync.framework.impl.DefaultPluginManager.(Defaul
tPluginManager.java:99)
at com.oracle.oer.sync.framework.MetadataManager.init(MetadataManager.ja
va:315)
... 2 more
Caused by: com.oracle.oer.sync.framework.MetadataIntrospectionRuntimeException:
Error: Unable to find asset type in OER: ed1ed534-39b8-11de-bee0-79d657a0a2b0.
Please make sure that the Harvester Solution Pack is installed in OER.
at com.oracle.oer.sync.framework.MetadataManager.putAssetType(MetadataMa
nager.java:220)
at com.oracle.oer.sync.framework.impl.DefaultPluginManager.processIntros
pector(DefaultPluginManager.java:130)
... 4 more


The solution for this issue is to import the harvest solution pack in OER.

Login to OER

go to admin and import export tab



once the gui comes up.

Go to import tab and locate the zip file.

For a 12c installation it should be in following location

SOA_HOME\oer\modules\tools\solutions

Say import and finish the wizard.



Once completed try to resubmit the data and see if you get any issue.

Friday, October 23, 2015

Disable auto built in Jdeveloper 12c on Saving project


I was quite annoyed with this feature of Jdeveloper 12c as whenever i save the project it tries to compile the project.

This is a default feature in Jdeveloper 12c.

It is good if you are working in a local machine

But if you are working in a remote machine which is already very slow this feature is quite annoying.

Luckily you can remove this feature.

In order to remove this

Go to Jdeveloper

Tools--->Preference

Go to Code Editor --> Save action.

there by default "Build project after save" option is added.

Select that option and remove it.



Say ok and restart Jdeveloper.

Now you should not face this issue.

Tuesday, October 13, 2015

Upgrade BAM 11g to BAM 12c-Issues in BAM 12c


If you are working in a project where there is a requirement to upgrade BAM 11g artifacts to BAM 12c.

Be very careful while giving the estimates to client for the migration.

Make sure you know some facts on BAM 12c before you make any commitment or provide estimates.


1> Only data source and EMS can be migrated in BAM 12c

Oracle has published a very nice document on how to upgrade these artifacts

http://www.oracle.com/technetwork/middleware/bam/learnmore/bam11g-12cmigration-2389379.pdf


2> BAM reports is no longer existing in BAM 12c. We have a dashboard now.

So all the BAM reports now needs to be recreated in BAM dashboard.
This again involves a lot of steps as now we have Business query-->Business View and then dashboard.

3> ALerts can also be not migrated as alerts might have reference to BAM 11g report and now in BAM 12c we can send the BAM dashboard link.


4> Most important BAM 12c has lot of bugs

Batch parameter does not work

Null parameter can not be inserted in BAM

parameter does not show up in business query.

Further a lot of patch needs to be applied in the BAM 12c.

So make sure you are taking more than enough buffer time for the development.

BAM 12c needs to be more stabilized.

Friday, October 09, 2015

Getting issue in JDeveloper 12c while creating a connection with BAM server



I tried to create a connection to BAM server from JDeveloper 12c and i got below error



The reason for this error was that i was using JDK 1.8 and after i changed my JDK to 1.7 it worked fine.

There are some patches that needs to be applied on Jdeveloper and you can eaily get the list of

patches from Metalink


Wednesday, August 19, 2015

Not able to input data in BPM process at run time


I created a sample BPM process to take few parameters as input and deployed this code to the integrated server.

After that I logged in to BPM workspace page and invoked the service.

However when I invoked the service it was not allowing me to input data as the input section was greyed out.

Since I have captured the screen shot of my development I went back to check the issue.

I realized I have not selected the option Editable for the data object while creating the human task flow.



I am not sure of the way how to change it post deployment so I recreated a new human task and ensured that the Editable section is selected.

I went ahead and deployed the project and now I am able to input data in the BPM process.

Wednesday, August 12, 2015

After deployment of product line the New model is not reflected




I was working in Oracle cloud cpq (big machines) and i found this issue.

I create a new Model in my prodcut line, added few configurable attirbutes to it then created a

configuration flow and attached a desktop layout to the same.

After configuration i deployed the product line using the deployment center.

However to my surprise even though after deployment i was not able to see my model in the product line page.


The reason for the issue was that we need to deploy the home page as well
This is a one time activity and should be done to reflect the changes.

In order to deploy the code

Go to Admin tab

Now in the list of options

Go to Style and Templates and select Home page

Now here select your Product family and refresh the product line.

After refresh click on deployment center and deploy the changes.

Go back to your product family and validate if you are now able to see the model.


Wednesday, August 05, 2015

BAM 02518 unrecognized parameter type


While trying to migrate bam components from one instance to another

I got this error

BAM-02518: unrecognized parameter: type
ErrorSource="ImportExport", ErrorID="ExportImport.InvalidParameter

I was trying to import the data object and specified the type as dataobject and landed up with the error above.

Then i tried the following command


icommand -cmd import -updatelayout 1 -file "c:\temp\test.xml"

and i was able to migrate the component.

Again what i observed is that many a tine specifying type leads to an issue so you can simply escape the type parameter and try to import the artifacts.


Tuesday, July 14, 2015

XML-20129: (Error) Namespace prefix 'wsp' used but not declared.


I was trying to call a secured service from SOA , I added the Ws policies in Jdevloper

passed the user name and password in composite.xml and tried to compile the project and i got below error in compilation

Error(35,59): : XML-20129: (Error) Namespace prefix 'wsp' used but not declared.
Error(35,59): : XML-20129: (Error) Namespace prefix 'orawsp' used but not declared.

The reason for this error was that some how the namespace was not declared for the policies

the actual policies files were using these two namespace prefix


wsp:PolicyReference URI="oracle/wss_username_token_client_policy"
orawsp:category="security"
orawsp:status="enabled"

To resolve this issue i added the following two namespace declaration in the composite and i was able to compile and deploy the project

xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
xmlns:orawsp=http://schemas.xmlsoap.org/ws/2004/09/policy





Thursday, July 09, 2015

SCA Engine deployment failure.: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException


In continuation of the previous exercise


I created a simple spring project and tried to deployed it to the integrated weblogic server and i got below error


[11:38:01 AM] Error deploying archive sca_HelloWorld_rev1.0.jar to partition "default" on server DefaultServer [http://localhost:7101]
[11:38:01 AM] HTTP error code returned [500]
[11:38:01 AM] Error message from server:
There was an error deploying the composite on DefaultServer: Error occurred during deployment of component: Spring to service engine: implementation.spring, for composite: HelloWorld: SCA Engine deployment failure.: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 6 in XML document from URL [oramds:/deployed-composites/default/HelloWorld_rev1.0/Spring/Spring.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 6; columnNumber: 1523; : XML-24500: (Error) Can not build schema 'http://www.springframework.org/schema/util' located at 'http://www.springframework.org/schema/util/spring-util.xsd'.

[11:38:01 AM] Check server log for more details.
[11:38:01 AM] Error deploying archive sca_HelloWorld_rev1.0.jar to partition "default" on server DefaultServer [http://localhost:7101]
[11:38:02 AM] Deployment cancelled.
[11:38:02 AM] ---- Deployment incomplete ----.
[11:38:02 AM] Error deploying archive file:/C:/JDeveloper/mywork/OSBApplication/HelloWorld/deploy/sca_HelloWorld_rev1.0.jar
(oracle.tip.tools.ide.fabric.deploy.common.SOARemoteDeployer)


The reason for this issue is because of xml parsing as explained in the http://stackoverflow.com/questions/5005901/duplicated-definition-for-identifiedtype

Using the information in the post i changed the following entry in my spring.xml

xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/tool http://www.springframework.org/schema/tool/spring-tool.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee.xsd http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc.xsd http://www.springframework.org/schema/jms http://www.springframework.org/schema/jms/spring-jms.xsd http://www.springframework.org/schema/oxm http://www.springframework.org/schema/oxm/spring-oxm.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd http://xmlns.oracle.com/weblogic/weblogic-sca META-INF/weblogic-sca.xsd"


to

xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://xmlns.oracle.com/weblogic/weblogic-sca META-INF/weblogic-sca.xsd"


After this i was able to deploy my process to the integrated server.

Wednesday, July 08, 2015

Spring in SOA 12c


I was trying to find sample of Spring in SOA 12c but some how i was not able to get any sample in the intenet, so i thought of creating my own sample so that others can benefit from that.

Using spring component requires you to have some basic concepts of Java.

If you do not have basic concepts of JAVA i will recommend first get the basics of Java and try this exercise.

Create a new project in SOA 12c




Give the project a name and select SOA



Select SOA with spring as option and say finish



Name the context



Now create a new interface



Specify the name of the interface



An interface declares the method so we will just try to declare a method and later we will define it in a class



Just define a simple method



Create a new class



select the interface you have created earlier for the class





Now implement the class for the business logic you wanted to have



Now define the sca service

type should point to the Interface definition i.e package.interface name

and

class should point to the actual class who is defining the interface

it will represented as package.class name




Now drag and drop the spring content to the exposed service swim lane and select web service as option



After selecting the service you will following service design



Deploy the service to the server and test it

Sunday, July 05, 2015

Logging in BPMN 12c


This is in continuation to my previous blogs on BPMN

Part1 and Part2

In this part we will use the first exercise itself to show how logging can be implemented in BPMN process.


The transaction was rolled back.


I was tyring to insert data in to MS SQL table using Oracle SOA suite DB adpater and i got this error

The transaction was rolled back. The work performed for bpel instance "1001" was rolled back, but the audit trail has been saved for this instance.If this is a sync request, please resubmit the request from the client. If it is an async request, please recover from the recovery console by resubmitting the invoke message.

My SQL Server connection was supporting Global transaction and i was using XA data source for the same.

I was using DB adapter feature to insert the data in to the SQL table.

Ideally with oracle db xa data source works fine but surprisingly for MS SQL this didn't worked fine for me so i did the following changes


I unchecked the Support global transaction button in the datasource



Then i used this data source as a non xa datasource while creating the jndi and the process worked fine for me.


java.sql.BatchUpdateException: String or binary data would be truncated


I was trying to insert data in to MS SQL server table using db adapter in Oracle SOA Suite and my process was giving this error.


Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'insert' failed due to: DBWriteInteractionSpec Execute Failed Exception. insert failed. Descriptor name: [MS.Errors]. Caused by java.sql.BatchUpdateException: String or binary data would be truncated.. Please see the logs for the full DBAdapter logging output prior to this exception. This exception is considered not retriable, likely due to a modelling mistake. To classify it as retriable instead add property nonRetriableErrorCodes with value "-8152" to your deployment descriptor (i.e. weblogic-ra.xml). To auto retry a retriable fault set these composite.xml properties for this invoke: jca.retry.interval, jca.retry.count, and jca.retry.backoff. All properties are integers. ". The invoked JCA adapter raised a resource exception. Please examine the above error message


The reason for this error is data issue. I checked the data i was passing to insert into the MS SQL table and then i compared it with the actual XML schema that get generated by default for the db adapter and i found that one of the field was having a restiction on length as 10 digit however in my actual payload i was sending a 17 digit number.

After fixing the payload my process ran fine.

Sunday, June 28, 2015

Session expired. Try to relogin. Client received SOAP Fault from server


I was trying to call an external web service in my project.

Recently the external web service got changed and they gave me a new url

I replace the new url with old url and tried to test my interface and i was getting below error

Unable to invoke endpoint URI "http://abasadasdasdasdasdasd" successfully due to: java.lang.RuntimeException: oracle.j2ee.ws.saaj.soap.SOAPVersionMismatchException: Mime Header Content-Type: text/xml requires SOAP envelope namespace: http://schemas.xmlsoap.org/soap/envelope/


The reason for this issue is that the WSDL content has changed in the process, however the end point URL is same.

This kind of issue mainly occurs in Siebel or magento services where in we have a local copy of WSDL.

In order to resolve the issue.

download the latest WSDL file from the URL

Replace it with the existing content of WSDL in Jdeveloper or in MDS.

Redeploy the process and you should be able to resolve this issue.



ConnectionFactory property platformClassName was set to org.eclipse.persistence.platform.database.oracle.Oracle10Platform but the database you are connecting to is Microsoft SQL Server.


I create a connection to MS SQL server in weblogic admin console and tried to test one of my process and i go the error below

Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'write' failed due to: DBWriteInteractionSpec Execute Failed Exception. write failed. Descriptor name: [WriteToDD.InterfaceErrors]. Caused by weblogic.jdbc.sqlserverbase.ddc: [FMWGEN][SQLServer JDBC Driver][SQLServer]String or binary data would be truncated.. Please see the logs for the full DBAdapter logging output prior to this exception. ConnectionFactory property platformClassName was set to org.eclipse.persistence.platform.database.oracle.Oracle10Platform but the database you are connecting to is Microsoft SQL Server. Please validate your platformClassName setting. This mismatch can cause the adapter to trigger runtime exceptions or execute SQL that is invalid for the database you are connected to. This exception is considered not retriable, likely due to a modelling mistake. To classify it as retriable instead add property nonRetriableErrorCodes with value "-8152" to your deployment descriptor (i.e. weblogic-ra.xml). To auto retry a retriable fault set these composite.xml properties for this invoke: jca.retry.interval, jca.retry.count, and jca.retry.backoff. All properties are integers. ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution.


The reason for this issue was that by default when we create a jndi it takes org.eclipse.persistence.platform.database.oracle.Oracle10Platform as platformClassName

I changed it to oracle.toplink.platform.database.SQLServerPlatform





AFter making the changes i updated the configuration plan and then i didn't get this issue.

Sunday, June 21, 2015

ORA-00604: error occurred at recursive SQL level 1


I was trying to call a DB procedure with complex (record/table types) parameters. When i tried to test the procedure i got the below error

ORA-00604: error occurred at recursive SQL level 1
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'SYNCRN'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored


This is a known issue as identified by oracle and a patch is already provided for DB. This issue is related to incompatible standard procedure with db version. Please refer to doc 1586704.1 for more details on this issue.

Thursday, June 18, 2015

Upgrade SOA Suite 10g project to SOA Suite 11g/12c


This document we will try to get details on how we can migrate the existing code in soa 10g to SOA11g/12c

First thing to understand is that there is no direct way to migrate SOA 10g code to SOA 12c.

You will have to redesign the code if you want to directly migrate the code.

However a hop approach is always recommended where in the 10g code are first migrate to SOA 11g and then to SOA 12c.

There are lot of things and points that must be taken care of while upgrading you project.

I have captured few of them in this exercise that will help to estimate the user how much complexity or time it will take for the whole migration.

Oracle Web cache as a load balancer



Oracle Web cache is a content management system. It works as a cache layer, as well as a load balancing layer for the underlying server. It is mainly used for load-balancing servers. Any website can be served by multiple origin server. Web cache balances the load among origin servers by determining the percentage of the available capacity, the weighted available capacity of each origin server.
The weighted available capacity is determined by the following formula:
(Capacity -Load)/Capacity
Where:
Capacity is the maximum number of concurrent connections that the origin server can accept.
Load is the number of connections currently in use.
If there are multiple origin servers and their available capacity is equal, the load balancing will be done based on round-robin algorithm.
To configure load balancing for a site, set the capacity of each origin server and create one site to server mapping that maps all the applicable origin servers to the site.
The diagram below represents a typical load-balancing pattern using Oracle Web cache. There are multiple host, which are hosting the application. The end user will pass the call to the Web cache which will redirect it to any of the host based on the routing algorithm defined for load balancing.



In order to achieve load balancing using Web cache, we will take two publicly available end-point URL. In this exercise, I will take oracle.com and ibm.com as the two end-point URLs. We will configure a front-end for the Web cache, which will be nothing but the front-end page for the client. We will configure this front-end page with the two end-point URLs we have defined. We will assign equal capacity to both the origin servers so that round-robin algorithm is followed, and we can call each of these end point on alternate calls. This is an example to depict the power of Web cache as a load balancer. However, in the actual context, Web cache is used for load balancing fusion applications, e.g., Service Oriented Architecture (SOA) server, OSB services, report server, etc.
Following are the steps that needs to be done in order to configure a load balancer. The assumption is that the Web cache set up is already done, please refer to the Appendix section for the installation details.
1. Access the Web cache page.
Login to the home page of Web cache using the following URL:
http://host:port
By default, the user will be ias_admin and password will be the one which you have used during installation.





Once you are logged in to Web cache you will get the following page.



Configure load balancing
Go to the following location.
(Windows) ORACLE_INSTANCE\\config\WebCache\\ webcache.xml
Locate the CACHE element at the last of the file.
Add the ROUTINGONLY=”YES” attribute to the CACHE element.





Save webcache.xml.
3. Restart Oracle Web Cache.
Use the following command:
opmnctl restartproc ias-component=component_name
This executable is found in the following directory:
(Windows) ORACLE_INSTANCE\bin




After restarting, if you will log in to the Web cache console, you will find that it is now configured for route only that appears at the top of the screen as shown below




Define Origin Server.
Go to the origin server and define two servers which you wanted to be load balanced.





Go to the site-to-server mapping and create a new mapping which will map the existing defined site to multiple origin server as shown below.




Submit and apply the changes and restart Web cache to take effect.







Validate configuration
Restart and now again check with the defined site and port.
In the first hit it, will redirect to the Oracle home page.

The second hit will redirect to the IBM home page.

As we have defined the capacity for both the servers to be equal, the load balancer is redirecting it in a round robin fashion.
In an ideal situation, all the managed servers in a cluster are defined in the origin server and they are load balanced by the Web cache layer


Wednesday, June 17, 2015

Oracle Service Bus as load balancer


OSB has a built-in support for load balancing as business services in OSB allows multiple end points to be added that can be load balanced using predefined load-balancing algorithm.
The load balancing will be achieved by creating two business services:
• Business Service A — This will be a real business service which will accept an input and will reply with some output.
• Business Service B — This will be a pass-through service which will not give any response.
A proxy service will be created later which will load balance between these two business services. Based on the load-balancing algorithm, one of the business service will be called. For e.g., if it is a round-robin algorithm — for the first invocation of proxy service, it will call Business Service A and for the subsequent invocation it will call the Business Service B.


As discussed earlier, we will create two business services first, then a proxy to call them in load-balancing algorithm. The assumption is that user has the basic knowledge of OSB.
1. Create Business Services
Log in to OSB console using the following URL:
http://host:port/sbconsole
Once you are logged in to OSB console, create an OSB session.




After the session is created, go to project explorer and create a new folder for your project.
The business service we are going to use in our implementation is following:
http://www.html2xml.nl/Services/Calculator/Version1/Calculator.asmx?WSDL
Create a Web Service Description Language (WSDL) resource in your project.
Specify it a unique name and paste the content of the WSDL mentioned in the high-level solution.



Save the changes for the WSDL and create a business service based on the above WSDL as shown below:



Select CalculatorSoap port and complete the wizard.



The actual end-point location of the calculator Web service gets added in the list.
It uses a round robin load-balancing algorithm by default.
2. Add service for load balancing
Click on add and you will find that one more address in added in the existing URLs list.





Now, here the second URL that we have added is not an actual Web service, it is a dummy end-point URL added by the wizard itself. (This is the second dummy service which we will use in this case to be load balanced.)
As per the current configuration, it says that we now have two end-point URL’s in the business service which are load balanced internally using a round-robin algorithm.
You can change the algorithm based on your requirement, keep the default format for testing.
Complete the wizard

Save the change and activate your OSB session.
3. Create Proxy Service
Create a wrapper OSB proxy service to call this business service.
Go to your project explorer.
Create a proxy service from the resource wizard and just call the business service you have created now.





Complete the configuration. Save the configuration and activate the changes.
This is the proxy service which will call the two business services in a load balancer.
4. Test the configuration
Test the proxy service.
Test the proxy service with the default input.
You will get two sets of output when two consecutive tests are performed.
One will fetch you a correct result and other will say the business service does not exist.
This happens because internally the two end-point URL’s specified in the business service are load balanced using round-robin algorithm, which means the services will be called on a round robin fashion, i.e., if first call fails (calling the dummy end point), the second call will succeed.
Below is the output for a consecutive call to the proxy service.









As discussed in the log balancing algorithm, the load balancer moves from one service to another as per the algorithm. In this scenario, it was round-robin algorithm, hence the proxy service first called the business service that is developed and then it called the dummy end point URL.

Tuesday, June 16, 2015

Mobile App in Jdeveloper

"

Dynamic partnerlink in OSB


Dynamic Partnerlink in OSB can be implemented in two ways.
1> URI override to achieve dynamic service invocation.
This sample is already provided by oracle and can be downloaded from the following link
http://java.net/projects/oracleservicebus1031/downloads/download/DYNAMIC-DISPATCH.zip
2> Dynamic routing based on input values.
When you do not know the service you need to invoke from the proxy service you are creating, you use dynamic routing. In this use case a scenario will be created where in, based on the input values business process will be invoked. Two business service will be created which will be writing data to two different folder. A proxy service will be created which will be exposed to client. This proxy service will be the entry point for the interface. Depending upon the input request from the proxy service one of the business service will be chosen at run time and the file will be written to the corresponding folder defined by business services. In order to choose the business service dynamically an XQuery file will be created which will contain the location of the business services. Based on input parameter the location of the business service will be retrieved from the XQuery file. This will be passed to a dynamic routing link which will route the request to the corresponding business service.

Create two business services which will write to two different folder location and name them as GoldClass and SilverClass.

Create two business Service to write file into a particular folder location. Here are the steps for one of the business process, the same steps can be followed to create other one too.
Create a business service of Any XML type




Make sure you already have created two folders named “GoldClass” and “SilverClass” where data file can be written to.
Choose file as protocol and add the GoldClass folder location as shown




Click on next and save the changes.



Follow the same steps and create one more business service for SilverClass.
Once completed you should be able to see the two business service in your folder.





Create an XML document for XQuery
Use the following xml document for the XQuery
Here logical name is the name which will come as input parameter from the client and the physical name is the name of the actual business service.
<routing>
<row>
<logical>Gold</logical>
<physical>default/GoldClass</physical>
</row>
<row>
<logical>Silver</logical>
<physical>default/SilverClass</physical>
</row>
</routing>

As you can see the physical location is nothing but the path of business service in OSB. Since we have created two business service GoldClass and SilverClass within Default folder the path to reach them will be default/GoldClass and default/SilverClass




Create an XQuery file and copy the contents




Create a proxy service



Keep the default properties and save the proxy service.
Save the Proxy service.
Edit the message flow.
Add a pipeline pair
Add a stage in request pipeline




Edit the Stage1
Add an assign activity and assign the XQuery to a temp variable. This is done so that later point of time it can be used




Retrieve the logical data from the input payload using the following XPath
$body/routing/row/logical
This assign activity will try to retrieve the logical location from the input parameter that will be passed from the proxy service.
Again use an assign activity and assign this value to another temp variable






Now use one more assign activity and this activity the actual physical location will be identified based on the logical input. Use the following routing code to retrieve the actual physical location and assign it to a temp variable. This code compares the logical identifier received from the proxy service and the logical identifier defined in XQuery file and output the corresponding physical location of the business service.
<ctx:route>
<ctx:service isProxy=’false'>
{$RouteTable/row[logical/text()=$logicalIdentifier]/physical/text()}
</ctx:service>
</ctx:route>






Save the output of this expression to a temp variable output.
This variable will now contain the actual location of the business service.
Save your process.
Go back to pipeline and add a route action





Add a dynamic routing and route it to the temp variable where you have retrieved the actual physical location of the business service. Since output is the variable where the actual location is saved we will use the same in dynamic routing.





Save the process and activate the changes.

Test the proxy service

Use following input






You will get the following invocation