This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes JDBC and the fly likes URL settings in Java Mail server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "URL settings in Java Mail server" Watch "URL settings in Java Mail server" New topic
Author

URL settings in Java Mail server

vivek makode
Greenhorn

Joined: Oct 01, 2001
Posts: 27
I am using Java Mail server for sending and receiving mails using java mail API.
While configuring the settings for JDBC connection in the Java Mail server the test fails due to bad URL..
The JDBC driver class name text field works fine but the text field for URL to access database is giving error.
JDBC Driver class name : sun.jdbc.odbc.JdbcOdbcDriver ( works fine)
URL to access database : I have tried the syntax given in the sample templae file but it does not work.
my url is : jdbc dbc:vivek
user is abc
password is abc .
how do i set the url?
please help
vivek
Carl Trusiak
Sheriff

Joined: Jun 13, 2000
Posts: 3340
Since you are using jdbcdbc, you need to ensure you have the ODBC configured for your database.
On Windows, you can check this from Control Panel - ODBC (Note on Win2000 it's under Control Panel - Administration Tools - ODBC) You have to have one configured as a User or System DSN. Consult the Help in getting this properly configured.

------------------
I Hope This Helps
Carl Trusiak, SCJP2


I Hope This Helps
Carl Trusiak, SCJP2, SCWCD
vivek makode
Greenhorn

Joined: Oct 01, 2001
Posts: 27
Thanks for the reply.
I am aware of the those settings since we have been using it in our work.
Everything about database and their DSN's is configured on my pc since other programs are working fine.
The problem is I do not know the proper syntax of the URL for settings to be done while testing the JDBC connection in JMail
server.
I have tried the sample syntax given along with download but it does not work.
Here is the sample (URL to access database) syntax given with the download files :
jdbc:mysql://www.jps.at:3306/MAIL?User=Johannes&Password=q1w2e3&autoReconnect=true
my data are
DSN: xyz
user:abc
password:abc
local domain: psvsvs.com
I have tried replacing my data in the sample URL but it does not work. It gives an error "the connection to the JDBC Datasource failed the URL seems to be either wrong or incomplete
or the server cannot be reached"
Also I do not know what is 3306 and MAIL in the sample URL. Is it required?
Please help.
Thanks
Vivek
 
Consider Paul's rocket mass heater.
 
subject: URL settings in Java Mail server