AnsweredAssumed Answered

Error while building ibatis SqlSessionFactory: Error creating document instance.  Cause: java.net.UnknownHostException:

Question asked by hardik.thakkar1 on Aug 13, 2014
Latest reply on May 7, 2015 by jbarrez
Hello,

I am currently facing issue with calling activiti from web application. I am getting below exception. I explored activiti forums for this issue. I could not find any concrete resolution. I am already connected to internet so network issue can not be main cause of this issue.

Any help on this would be much appreciated.

PS - If I run this program standalone then it is working fine. But when I run it in web application, it fails.

6 [http-8080-1] DEBUG org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl  - database product name: 'MySQL'
6 [http-8080-1] DEBUG org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl  - using database type: mysql
6 [http-8080-1] DEBUG org.apache.ibatis.datasource.pooled.PooledDataSource  - Returned connection 29585115 to pool.
0 [http-8080-1] ERROR org.activiti.engine.ProcessEngines  - Exception while initializing process engine: Error while building ibatis SqlSessionFactory: Error creating document instance.  Cause: java.net.UnknownHostException: mybatis.org
.activiti.engine.ActivitiException: Error while building ibatis SqlSessionFactory: Error creating document instance.  Cause: java.net.UnknownHostException: mybatis.org
     at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.initSqlSessionFactory(ProcessEngineConfigurationImpl.java:649)
     at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.init(ProcessEngineConfigurationImpl.java:386)
     at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:362)
     at org.activiti.engine.ProcessEngines.buildProcessEngine(ProcessEngines.java:194)
     at org.activiti.engine.ProcessEngines.initProcessEnginFromResource(ProcessEngines.java:167)
     at org.activiti.engine.ProcessEngines.init(ProcessEngines.java:98)
     at org.activiti.engine.ProcessEngines.getProcessEngine(ProcessEngines.java:224)
     at org.activiti.engine.ProcessEngines.getDefaultProcessEngine(ProcessEngines.java:217)
     at com.rbos.workflow.main.FinancialApp.executeWorkflow(FinancialApp.java:29)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
     at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvide
ava:185)
     at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
     at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
     at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
     at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
     at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
     at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1542)
     at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1473)
     at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419)
     at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409)
     at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409)
     at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:540)
     at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:715)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
     at java.lang.Thread.run(Thread.java:619)
sed by: org.apache.ibatis.builder.BuilderException: Error creating document instance.  Cause: java.net.UnknownHostException: mybatis.org
     at org.apache.ibatis.parsing.XPathParser.createDocument(XPathParser.java:136)
     at org.apache.ibatis.parsing.XPathParser.<init>(XPathParser.java:32)
     at org.apache.ibatis.builder.xml.XMLConfigBuilder.<init>(XMLConfigBuilder.java:47)
     at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.initSqlSessionFactory(ProcessEngineConfigurationImpl.java:640)
     … 39 more
sed by: java.net.UnknownHostException: mybatis.org
     at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)

Outcomes