10 Mart 2011 Perşembe

error: A truncation error was encountered trying to shrink CLOB to length : org.apache.derby.iapi.services.io.DerbyIOException'.

The error
A truncation error was encountered trying to shrink CLOB to length : org.apache.derby.iapi.services.io.DerbyIOException'.
is thrown from apache ode while trying to do binary data transfer through bpel..
so, seperating the binary transfer from the process can be a workaround..

here is an explanation from ode FAQ (http://ode.apache.org/faq.html):
Q. I'm getting data truncation errors, what does that mean?
A. We try to use sensible sizes for the database columns that contain messages and variables in ODE. However if you're manipulating large quantities of data that may not e enough. The solution in that case is to alter the column that's too short to reserve enough database space for your needs.

warning C4996: 'fopen' was declared deprecated

in visual studio 2008 environment, to get rid of warnings such as
warning C4996: 'fopen' was declared deprecated
do the following:

add _CRT_SECURE_NO_DEPRECATE to Project Properties -> Configuration Properties -> C/C++ -> Preprocessor -> Preprocessor Definitions.

error: error spawning cmd.exe

While trying to build a component in Visual Studio 2008 environment, i got the error error spawning cmd.exe

sorry, i could not remember where i discovered this solution, but it worked:

In the Options go into Projects and Solutions -> VC++ Directories page and place this rows:

$(SystemRoot)\System32

3 Mart 2011 Perşembe

javax.xml.ws.soap.SOAPFaultException: axis2ns2:selectionFailure

The error javax.xml.ws.soap.SOAPFaultException: axis2ns2:selectionFailure shows up, while the process is running in apache ode (tried with versions 1.3.4 and 1.3.5).

The following assignment is successful:

<copy>
<from>
<literal>
<ns2:operationResponse>
<ns2:return> </ns2:return>
</ns2:operationResponse>
</literal>
</from>
<to variable="OperationOut" part="parameters"/>
</copy>

the definition:

<xs:complexType name="operationResponse">
<xs:sequence>
<xs:element name="return" type="ns1:returnMessage" minOccurs="0"></xs:element>
</xs:sequence>
</xs:complexType>

.. however, this one results in axis2ns2:selectionFailure error

<assign name="InitOperation">
<copy>
<from>$OperationWsdlOperationIn.identity/username</from>
<to>$OperationIn.parameters/username</to>
</copy>
<copy>
<from variable="OperationWsdlOperationIn" part="password"/>
<to>$OperationIn.parameters/password</to>
</copy>
</assign>


despite this initialization:

<copy>
<from>
<literal>
<ns2:operation>

<username> </username>
<password> </password>

</ns2:operation>
</literal>
</from>
<to variable="OperationIn" part="parameters"/>
</copy>

<xs:complexType name="operation">
<xs:sequence>
<xs:element name="username" type="xs:string" minOccurs="0"></xs:element>
<xs:element name="password" type="xs:string" minOccurs="0"></xs:element>
</xs:sequence>
</xs:complexType>

There is an explanation for this situation in Apache ODE FAQ (http://ode.apache.org/faq.html), i copied here for convenience:

Q. My process fails with a selectionFailure; What can I do? A. BPEL expects a single element to be selected when evaluating and expressions, and a selectionFailure fault is thrown if zero or more than one element are selected.

If you get zero element, double-check your namespace prefix and bindings. Also, remember that you must initialize your variables (most often with 's) before assigning into them, unless your are reassigning the whole variable (e.g. directly into $variable, or $variable.part). To debug assignments, you can set the "org.apache.ode" logging category to DEBUG in order to see the content of variables as the process executes.

This links say that it is due to namespace error:

http://stackoverflow.com/questions/4498982/soap-exception-axis2ns2selectionfailure

http://old.nabble.com/assign-with-complex-types-td20919141.html

Solution:

The following assignment lucily solved the error:

<copy>
<from>
<literal>
<operation xmlns="">

<username> </username>
<password> </password>

</operation>
</literal>
</from>
<to variable="OperationIn" part="parameters"/>
</copy>

2 Mart 2011 Çarşamba

variable initilalization in bpel

while using openEsb, variable initilialization is not a problem, since i think openEsb has an extention for this..
however, during ode migration, i get javax.xml.ws.soap.SOAPFaultException: axis2ns1:selectionFailure errors from some of my processes..
i must say, i think variable initialization is the most annoying part of developing bpel processes..
so, i decided to note down some basics about that:


ODE doesn't support variable initialization yet. See here:
http://ode.apache.org/ws-bpel-20-specification-compliance.html
The only way to initialize a message variable is through a copy operation within an assign activity.
You can initialize all of the parts of a message at once if you are copying from another message variable of the same message type.
If you are copying from an expression, literal, or other variable type then you need to specify the message part in the to specification.


Variables need to be initialized before they are assigned from or when
assigned to using a query or an expression or if they are used as to
input to an invoke or in conditional expressions.
If you are just assigning directly to a variable's message part with no query then no
initialization is needed.