Announcement Announcement Module
Collapse
No announcement yet.
DB connection through mybatis Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • DB connection through mybatis

    Hello All,
    im new to mybatis and facing issues with DB connectivity.
    i have specified connection URL, driverclassname, usrName and Pwd in mybatis-config.xml. And i have given its reference in my application-context.xml.
    But when my local tomcat server starts, it will throw an error saying
    'org.springframework.beans.factory.BeanDefinitionS toreException: IOException parsing XML document from ServletContext resource [/WEB-INF/mybatis-config.xml]; nested exception is java.net.ConnectException: Connection timed out: connect'

    Can anyone help me in this?

    TIA.

  • #2
    seems a XML validation problem. Make sure your DTDs are:

    config:

    PUBLIC "-//mybatis.org//DTD Config 3.0//EN"

    "http://mybatis.org/dtd/mybatis-3-config.dtd"

    mapper:

    PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"

    "http://mybatis.org/dtd/mybatis-3-mapper.dtd"

    And not www.mybatis.org...

    Comment

    Working...
    X