Using myBatis standAlone (Atlassian jira plugin(OSGi) environmnent)
The following error has occurred.
[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
Source Code
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 {
}
}
When adding xalan, the following error occurs.
Caused by: java.lang.ClassCastException: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl cannot be cast to javax.xml.parsers.DocumentBuilderFactory
This error did not occur in Pure Java Application environment.
I wonder why this error occurs.
Please help me.
Thanks.