Friday 28 March 2014

java.sql.sqlexception ora-04063

Very often we tend to see this error while calling Database package/procedure from our oracle fusion middleware service.

Many times I have seen that this errror can be tackled easily with not much effort.I am not an admin guy so if you are a soa developer you can  try the below steps which might solve your problem.

Step 1 > Check if the procedure is running successfully on Ebiz side(end systems).

Step 2 > If error still persists try to recompile the code (procedure) from end systems.Many times it happens if source system makes any changes to existing procedure it needs good recomiple(min 2  times) to accept from middleware.

Step3: If error still persists try to call/invoke same  procedure again ,means if it fails on 1st attempt.


Tuesday 25 March 2014

FlowN activity in SOA Bpel 11g

FlowN activity used to invoke services parallel. It is especially useful when you need several time-consuming and independent tasks.

Please note the below statement which is important in running your flowN activity :

Often this activity is used to split up a message into parts and process those parts simultaneously. When using FlowN it is advisable to put a scope inside and use local variables. If you neglect to do that, the results can be different from what you might expect.
  



Below is  logic for flowN:

<scope name="Scope1">
      <variables>
        <variable name="Variable_bpel1" type="xsd:int"/>
        <variable name="Index_var" type="xsd:int"/>
      </variables>
      <sequence>
        <assign name="Assign_loop">
          <copy>
            <from expression="3"/>
            <to variable="Variable_bpel1"/>
          </copy>
          <copy>
            <from expression="1"/>
            <to variable="Index_var"/>
          </copy>
        </assign>
        <bpelx:flowN name="FlowN1" N="bpws:getVariableData('Variable_bpel1')"
                     indexVariable="Index_var">

          <sequence name="Sequence1">
            <assign name="Assign1">
              <copy>
                <from variable="inputVariable" part="payload"
                      query="/client:process/client:input"/>
                <to variable="Invoke1_process_InputVariable" part="payload"
                    query="/ns1:process/ns1:input"/>
              </copy>
            </assign>
            <invoke name="Invoke1" inputVariable="Invoke1_process_InputVariable"
                    outputVariable="Invoke1_process_OutputVariable"
                    partnerLink="PartnerLink1" portType="ns1:testbpel1sync"
                    operation="process" bpelx:invokeAsDetail="no"/>
          </sequence>
        </bpelx:flowN>
      </sequence>
    </scope>

Key Points:

1>Variables to invoke must be placed inside local scope activity.Check variables marked in blue.If someone dont create local one for invoke activity it will result in redundant information.

23>Place the logic  inside flowN.

4>For passing different xml payload in each loop ,one can follow the below simple logic :

query="/ns1:ListOfData/ns1:Data[$Index_var]/ns1:name"/> 



 

Happy Programming!!!

Friday 7 March 2014

javax.resource.spi.applicationserverinternalexception unable to create a connection

Very Often when we try to connect with Database from Bpel to perform any operations may be :insert or update or delete we face the below error :

"
JCA Binding Component was unable to establish an outbound JCA CCI connection due to the following issue: javax.resource.spi.ApplicationServerInternalException: Unable to get a connection for pool.weblogic.common.resourcepool.ResourceLimitException: Configured maximum limit of (0) on number of threads allowed to wait for a resource reached for pool :eis/db/Testjndi. Please make sure that the JCA connection factory and any dependent connection factories have been configured with a sufficient limit for max connections. Please also make sure that the physical connection to the backend EIS is available and the backend itself is accepting connections. ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution."

 Solution to the above error  is explained below :

1> Go to weblogic  console,example : http://host:port/console

2> Go to Environment->Services -> Data Sources

3> Select Your Data Source

4> From Top select Connection Pool tab

5> Go to  bottom of the page and see there is option called maximum capacity. Increase its value for example if its current is : 200 make it 500.Screenshot for sample shown below :



6> Click on save button at bottom..
7> Go back to home page of weblogic console
8> Select Deployments-> DB Adapter checkbox
9> Select option Update-> follow steps one by one default to finish and update.

Run your code this time it will not throw the above error.Hope it helps in solving!!!

Happy programming!!!!!