Hi
Am very new to iBATIS. Am facing com.ibatis.sqlmap.client.SqlMapException:
There was an error while building the SqlMap instance Exception. 

below is the SQLMapConfig.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMapConfig
  PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN"
  "http://ibatis.apache.org/dtd/sql-map-config-2.dtd";>

<sqlMapConfig>

  <settings useStatementNamespaces="true"/>
  
  <transactionManager type="JDBC" commitRequired="false">
    <dataSource type="SIMPLE">
      <property name="JDBC.Driver" value="com.mysql.jdbc.Driver"/>
      <property name="JDBC.ConnectionURL"
        value="jdbc:mysql://localhost:3306/junk"/>
      <property name="JDBC.Username" value="root"/>
      <property name="JDBC.Password" value=""/>
    </dataSource>
  </transactionManager>

  <sqlMap resource="Contact.xml"/>
 
</sqlMapConfig>


Contact.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap
  PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN"
  "http://ibatis.apache.org/dtd/sql-map-2.dtd";>

<sqlMap namespace="Contact">

        <!--- Inserting data in table -->

        <insert id="insert" parameterClass="Contact">
                insert into contact (firstName,lastName,email)
                values (#firstName#, #lastName#, #email#)
                <selectKey resultClass="int" keyProperty="id">
                                select last_insert_id() as id
                </selectKey>
     </insert>

        <!--- Showing all data of table -->

        <select id="getAll" resultClass="Contact">
                select * from contact
        </select>

</sqlMap>


I used jar files:

ibatis-common-2.jar      
ibatis-dao-2.jar         
ibatis-sqlmap-2.jar      
sqljdbc.jar              
commons-logging-1.0.4.jar

Please help to rectify the error....

Exception in Detail:



:com.ibatis.sqlmap.client.SqlMapException: There was an error while building
the SqlMap instance.
--- The error occurred in the SQL Map Configuration file.
--- Cause: com.ibatis.sqlmap.client.SqlMapException: XML Parser Error. 
Cause: java.net.ConnectExcep
tion: Connection timed out: connect
Caused by: java.net.ConnectException: Connection timed out: connect
Caused by: com.ibatis.sqlmap.client.SqlMapException: XML Parser Error. 
Cause: java.net.ConnectExcep
tion: Connection timed out: connect
Caused by: java.net.ConnectException: Connection timed out: connect

-- 
View this message in context: 
http://old.nabble.com/com.ibatis.sqlmap.client.SqlMapException%3A-There-was-an-error-while-building-the-SqlMap-instance-tp26872916p26872916.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
For additional commands, e-mail: user-java-h...@ibatis.apache.org

Reply via email to