ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Miller" <Mike.Mil...@jda.com>
Subject RE: sql task
Date Fri, 17 Mar 2006 17:25:39 GMT
Shouldn't the last entry you tried be jdbc:oracle:thin:@localhost:1521:harshal and not jdbc:oracle:thin:@localhosthost:1521:harshal
 with 2 host

-----Original Message-----
From: Harshal Chavda [mailto:h_ant@rediffmail.com] 
Sent: Friday, March 17, 2006 11:23 AM
To: user@ant.apache.org
Subject: sql task

  

Hello to all users
My configuration is 
--pentium 4,CPU  3GHz,512 MB RAM,windows XP professional
--JDK 1.5,Ant 1.6.3,Tomcat 4.1,Cruisecontrol 2.2.1


I ahve a problem regarding the sql task. I use the following code to which I get The following
error:

	<target name="sqltesting">
	<sql 
	driver="oracle.jdbc.driver.OracleDriver" 	
	url="jdbc:oracle:thin:@localhost:harshal"
   	userid="scott" 	password="tiger" >

	insert
    into table trainees
    values(naam,pataa);

	<classpath>
    	<pathelement location="G:\BE_Project\Ant\RG\RG\lib\classes12.jar"/>
 	 </classpath>
 	 </sql>
---------------------------------------------------------------------------------------------------------------------------
ERROR
BUILD FAILED
G:\BE_Project\Ant\RG\RG\Practice\prac.xml:48: java.sql.SQLException: Io exception: Invalid


connection string format, a valid format is: "host:port:sid"
---------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------
Line 48 is --------->   	userid="scott" 	password="tiger" >
---------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------

Assuming the above code to be the original one I made the following changes
All the changes are relative to the original code given above:::::::::::

CHANGE 1-----------------------------------------------------------------------------------------------------------

	url="localhost:1521:harshal"
ERROR
-------------
-------------

BUILD FAILED
G:\BE_Project\Ant\RG\RG\Practice\prac.xml:48: java.sql.SQLException: No suitable
 Driver for localhost:1521:harshal



CHANGE 2-----------------------------------------------------------------------------------------------------------

     url    =" jdbc:oracle:thin:@localhosthost:1521:harshal"
    


ERROR
---------------
---------------
BUILD FAILED
G:\BE_Project\Ant\RG\RG\Practice\prac.xml:48: java.sql.SQLException: Io exception: The Network
Adapter could not establish the connection



How can I get around this problem?

Thanks Harshal

-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.2.4/283 - Release Date: 3/16/2006
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.2.4/283 - Release Date: 3/16/2006
 

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


Mime
View raw message