ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "meindert" <meind...@eduflex.com>
Subject RE: com.ibatis.sqlmap.client.SqlMapException: There was an error while building the SqlMap instance
Date Mon, 21 Dec 2009 12:39:33 GMT
I can be wrong but isn't sqljdbc.jar for MS sql server? You are using the
mysql for the driver class


-----Original Message-----
From: nath1 [mailto:vishwanath.manchala@yahoo.co.in] 
Sent: 21 December 2009 01:46 PM
To: user-java@ibatis.apache.org
Subject: com.ibatis.sqlmap.client.SqlMapException: There was an error while
building the SqlMap instance


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-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 9.0.717 / Virus Database: 270.14.116/2578 - Release Date: 12/20/09
21:35:00


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


Mime
View raw message