• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

invalid SQL url specified

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Pro.:
i tried to test my driver version, and the error message is:
Exception in thread "main" java.sql.SQLException: Invalid Oracle URL specified
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:273)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:182)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at Test.main(Test.java:6)
i used thin driver, my database is wendb, user is wen, pwd is wen
below is my tnsnames.ora data:
# TNSNAMES.ORA Network Configuration File: D:\oracle\ora81\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
WENDB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = wenkai)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = WENDB)
)
)
INST1_HTTP =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = wenkai)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = SHARED)
(SERVICE_NAME = WENDB)
(PRESENTATION = http://admin) )
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
what would be the correct URL:
Connection conn=DriverManager.getConnection ("jdbc racle:thin:@?:?:?","wen","wen");
thank you...
 
Author
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does
Connection conn = DriverManager.getConnection ("jdbc: oracle:thin:@wendb","wen","wen");
work?
[ May 26, 2002: Message edited by: Greg Barish ]
 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The URL I use looks like this:
"jdbc:oracle:thin:USERID/PASSWD@HOST:PORT:DBNAME";
So...
"jdbc:oracle:thin:wen/wen@wenkai:1521:wendb"
Try that.
You may have to specify the full name of the host/server. I specify HOST.companyname.com for the host name.
--Amy
[ Edited by Dave to remove smilies ]
[ May 28, 2002: Message edited by: David O'Meara ]
 
Then YOU must do the pig's work! Read this tiny ad. READ IT!
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic