On 17 Apr 2013, at 12:06, Marek Slama wrote:

This is method signature:
public class MediaHandler {

    private static final Logger logger = LoggerFactory.getLogger(MediaHandler.class);

    public static String processMediaFile(String inputDocxPath, String imagePath, String docNumber,
        String relationshipId, String counter) throws Exception {

In Jboss7 I get following error:

2013-04-17 12:51:57,141 ERROR [com.idc.publishing.commons.transformations.SaxonParserUtility] (Thread-78) SaxonParserUtilityErrorListener FATAL:: net.sf.saxon.trans.XPathException: Cannot find a matching 5-argument function named {com.idc.publishing.commons.transformations.mediahandler.MediaHandler}processMediaFile(). The namespace URI and local name are recognized, but the number of arguments is wrong

This looks to me like a version mismatch problem of some kind. If Saxon has found a method with the right name but the wrong number of arguments, then presumably it has found a different version than the one you are showing us.

The -TJ trace might be useful.

Michael Kay