Timestamp format must be yyyy-mm-dd hh:mm:ss[.fffffffff in Weblogic 11g

org.apache.commons.beanutils.ConversionException: Timestamp format must be yyyy-mm-dd hh:mm:ss[.fffffffff  

Explanation:
Migrating your web application to Weblogic 11g, may give the above exception for date operations.

Possible Cause:
Weblogic 11g uses Apache common classes, whereas old version does not uses. And if your application uses the Apache common classes that were not part of Weblogic and you have explicitly uses in lib aka classpath. Therefore Weblogic 11g has to be configured to pick up the your application Apache common classes as there may be a version mismatch resulting this exception.


Solution:
Following entry should be added in weblogic-application.xml file to give the preference to your application's Apache common classes.

<prefer-application-packages>
    <package-name>org.apache.common.*</package-name>
</prefer-application-packages>

Image Courtesy: Oracle
As usual, thanks for reading! Please put your comments to share your views and feedback.
- InstantKick Team