Erro XPathFactoryImpl não encontrado (usando myBatis)

Usando o myBatis standAlone (ambiente Atlassian jira plugin (OSGi))

O seguinte erro ocorreu.

[INFO] [talledLocalContainer] org.apache.ibatis.exceptions.PersistenceException:
[INFO] [talledLocalContainer]     ### Error building SqlSession.
[INFO] [talledLocalContainer]     ### Cause: java.lang.RuntimeException: XPathFactory#newInstance() failed to create an XPathFactory for the default o
bject model: http://java.sun.com/jaxp/xpath/dom with the XPathFactoryConfigurationException: javax.xml.xpath.XPathFactoryConfigurationException: java.
util.ServiceConfigurationError: javax.xml.xpath.XPathFactory: Provider org.apache.xpath.jaxp.XPathFactoryImpl not found
[INFO] [talledLocalContainer] ### Cause: java.lang.RuntimeException: XPathFactory#newInstance() failed to create an XPathFactory for the default object model: http://java.sun.com/jaxp/xpath/dom with the XPathFactoryConfigurationException:javax.xml.xpath.XPathFactoryConfigurationException: java.util.ServiceConfigurationError: javax.xml.xpath.XPathFactory: Provider org.apache.xpath.jaxp.XPathFactoryImpl not found

Código fonte

static {
    try {
        // set SessionFactory
        if (MyBatisConnectionFactory.sqlSessionFactory == null) {
            MyBatisConnectionFactory.sqlSessionFactory = new SqlSessionFactoryBuilder().build(Resources.getResourceAsStream("/mybatisConfig.xml"));
        }

    } catch (final Exception e) {
        MyBatisConnectionFactory.LOGGER.error(e.getMessage());
    } finally {
    }
}

Ao adicionar xalan, ocorre o seguinte erro.

Caused by: java.lang.ClassCastException: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl cannot be cast to javax.xml.parsers.DocumentBuilderFactory

Este erro não ocorreu no ambiente Pure Java Application.

Eu me pergunto por que esse erro ocorre.

Por favor me ajude.

Obrigado.

questionAnswers(1)

yourAnswerToTheQuestion