How to resolve “DSP Taglib did not match expected version” error

In Oracle Commerce when an upgrade or patch is applied that updates either a TLD or jar associated with a tag library you might see an error in the logs like this:

The version of the DSP Taglib from the web-app "CRS" found within <path to jar>/dspjspTagLib1_0.jar did not match the expected version. Please update all copies of the DSP Taglib with the version in $DYNAMO_HOME/DAS/taglib/dspjspTaglib /1.0/lib/ and re-assemble your application. Enable loggingDebug on this component and restart to see which resource differs.

This happens because the version of the tag library (taglib) in your running web-app does not match the version of the updated taglib in DAS.

When you upgraded or ran the patch, the installation changed the taglib files in the ATG installation directory only. Your application still has the old version of the tag libraries. You need to update the taglibs in your application so it matches the version of the patched or updated libraries.
In J2EE the container looks for Tag files in four locations: 

1. Directly inside WEB-INF/tags directory

2. Inside a sub-directory of WEB-INF/tags

3. Inside the META-INF/tags directory which is inside a JAR file that is inside WEB-INF/lib

4. Inside a sub-directory of META-INF/tags which is inside a JAR file that’s inside WEB-INF/lib


To fix this problem you need to update the your project’s tag library, i.e. copy the DAS tag libraries to your application.

To find out all copies of the tag library you could run this in a linux command prompt:

$> find . -name \*.tld


Now you that know which projects have a tag library, the next step is to update their contents. You could create a script as in the example below to update all tag libraries in your web-app.

This script copies tag libraries to the web-app (project). Put this content in a file called The following was written for a Linux environment. If you have another OS then change the content accordingly.


# ==================================================================================================
# : Refresh the ATG OOTB assets copied into the projects.
# ==================================================================================================

# After a fix pack or hotfix is applied to the ATG installation, this script will refresh the
# copies of OOTB assets that may have been altered.
# J2EE standard

function refreshJ2EE {
    echo ' '
    echo Updating ${PROJECT} J2EE project ...
    echo ' '

    # dsp and JSTL Tag Library Definition files
    cp -v ${ATG_HOME}/DAS/taglib/jstl/1.1/tld/c.tld                       ${PROJECT}/j2ee/${WAR}/WEB-INF/tags/c.tld
    cp -v ${ATG_HOME}/DAS/taglib/dspjspTaglib/1.0/tld/dspjspTaglib1_0.tld ${PROJECT}/j2ee/${WAR}/WEB-INF/tags/dspjspTaglib1_0.tld
    cp -v ${ATG_HOME}/DAS/taglib/jstl/1.1/tld/fmt.tld                     ${PROJECT}/j2ee/${WAR}/WEB-INF/tags/fmt.tld
    cp -v ${ATG_HOME}/DAS/taglib/jstl/1.1/tld/fn.tld                      ${PROJECT}/j2ee/${WAR}/WEB-INF/tags/fn.tld

    # dsp and JSTL tag classes
    cp -v ${ATG_HOME}/DAS/taglib/dspjspTaglib/1.0/lib/dspjspTaglib1_0.jar ${PROJECT}/j2ee/${WAR}/WEB-INF/lib/dspjspTaglib1_0.jar
    cp -v ${ATG_HOME}/DAS/taglib/jstl/1.1/lib/standard.jar                ${PROJECT}/j2ee/${WAR}/WEB-INF/lib/standard.jar
    cp -v ${ATG_HOME}/DAS/taglib/jstl/1.1/lib/jstl.jar                    ${PROJECT}/j2ee/${WAR}/WEB-INF/lib/jstl.jar
    cp -v ${ATG_HOME}/DAS/taglib/json/0.4/lib/json-taglib-0.4.jar         ${PROJECT}/j2ee/${WAR}/WEB-INF/lib/json-taglib-0.4.jar

# CA Asset Manager UI
function refreshCA {
    echo ' '
    echo Updating ${PROJECT} CA project ...
    echo ' '

    cp -v ${ATG_HOME}/AssetUI/taglibs/asset-ui/tld/asset-ui-1_0.tld       ${PROJECT}/j2ee/${WAR}/WEB-INF/tags/asset-ui-1_0.tld
    cp -v ${ATG_HOME}/AssetUI/taglibs/asset-ui/lib/asset-ui-1_0.jar       ${PROJECT}/j2ee/${WAR}/WEB-INF/lib/asset-ui-1_0.jar

    refreshJ2EE ${PROJECT} ${WAR}

Then invoke the script replacing the project and war with your project name and war file name:

$> refreshJ2EE <project> <war>

Some organizations are very concerned with tight timelines and may feel the temptation to avoid this update. They are trying to reduce the number of moving parts and therefore reduce the scope of regression testing. Some may argue that these errors don’t product major malfunctions, and therefore they can operate temporarily with these errors in the logs. However it is very important to maintain an updated and supported environment. There are many side effects that could occur as a result of running an environment with mismatching version of the tag libraries. A couple of examples are: JSP pages throwing errors that should not occur, or run into value corruption in transfer between components and JSTL. Not to mention the expense and time consumed into troubleshooting. Therefore it is highly recommended that tag library versions are always matching.

Add Your Comment