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