javax.validation.ValidationException: HV000028: Unexpected exception during isValid call - bean-validation

#size(max =241) is given for string validation and if the string length is less than 112 characters the validation is passing but if it is more than 112 then it is throwing exception :
javax.validation.ValidationException: HV000028: Unexpected exception during >isValid call.
How should i fix it ?

I was using hibernate-validator-4.3.0-Final.jar for email validation, there was a bug in when handling large string, hence it was throwing the error, once updated the jar file.hibernate-validator-4.3.2-Final.jar this fixed.

Related

typeMismatcch sting to long binding exception

My set up is Spring 4.25 and hibernate validator 4.3
I have a form that has a string , in the model its a Long. I ??.properties file with many typeMismatch = user friendly message or typeMismatch.amount=another user friendly message
why am I unable to pick up the 'user friendly message' instead I get a Failed to convert property value of type [java.lang.String] to required type [java.lang.Long] for property 'amount'; nested exception is java.lang.NumberFormatException: For input string: "dfg".
Do I need a custompropertyeditor ?
I can't make any sense?
Regards,
jemrug

Conversion from string "valor" to type 'Integer' is not valid in VB.NET

I'm a C# programmer but now I have to code VB.NET and I having a situation trying to translate this line of C# code to VB.NET
what I want is to check if the value that I obtained via MySQLDataReader is DBNull, in C# I use this to check if a string value is null or not
data.empName = dr.IsDBNull(1) ? "No name !!!" : dr.GetString(1).ToString();
But now I need the same verification but in VB.NET and also the data type retrieved via MySQLDataReader is decimal, this is what I got for the time beign
IIf(dr.IsDBNull("valor"), 0.0, dr.GetDecimal(dr.GetOrdinal("valor")))
but when I debug the app got the error message:
An exception of type 'System.InvalidCastException' occurred in Microsoft.VisualBasic.dll but was not handled in user code
Additional information: Conversion from string "valor" to type 'Integer' is not valid.
the data type in the MySQL table is Decimal(10,2), could you please help me and tell me what am I doing wrong
The line should have read, the evaluation of dr.IsDBNull("valor") was incorrect and caused the exception. To remedy, try this
IIf(dr.IsDBNull(dr.GetOrdinal("valor")), 0.0, dr.GetDecimal(dr.GetOrdinal("valor")))

Flex- handle error thrown by decodeURIComponent component for some utf-8 encoded strings

How to I handle the erros thrown by the decodeURIComponent. By handling I mean that when the decodeURIComponent throws some error I want that the characters which caused the issue to be stripped out or replaced by some default charcters.
In my case i have an encoded string which contains the 'emojis' url encoded like this '%20%f0%9f%98%8f'. So when i try to decode it using decodericomponent it creates an error may be beacuse doesn't support unicoded character.
One way i thought of handling this is
If the decodeuricomponent throws an error then create a custom function that would first replace all emojis utf-8 represtations (http://apps.timwhitlock.info/emoji/tables/unicode) with some default characters and then deocde it.
Say for eg: replace occurence of '%F0%9F%98%8A' with ':)' and so on.
But what if there are still some cases left out. Then it would again throw an error.
Can anybody help out.
Thanks in advance.

Cryptic errormessage from asp.net ajax updatepanel?

Where to fix this errormessage?
41|error|500|Input string was not in a
correct format.|
I'm confused
looks like server 500 error, line 41, with error message "Input string was not in a correct format", best to debug and break on all errors, assuming you are using VS you will break on the line of question
Input string was not in a correct format is typically an invalid integer cast somewhere. Make sure in your update panel you're not sending an improper string to an integer cast.

RunTimeError in ASP.Net

I am doing .net application which is in vb.I am getting an runtime error when running in Internet Explorer,but its running in mozilla. Error as following
Error:SysArgumentTypeException:Object
of type
'AjaxControlToolKit.Animation.Length
Animation' cannot be converted to type
;AjaxControlToolKit.Animation'.Parameter
Instance.
Error is getting in MicrosoftAjax.debug.js
if(!this.isInstanceOfType(instance)) throw Error.argumentType('instance',ObjectgetType(instance))
What may be the reason for this error.What can i do to resolve this? Can anybody help?
The error indicates, that you are trying to cast a type called Length Animation to a type called Parameter. In VB and VB.NET, the cast is tried implicitly if the types of an assignment doesn't match. Please have a further look at the stack-trace to find the exact line of the error.
PS: I didn't know that there could be spaces in a .NET type name...

Resources