Java Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesJava Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old April 14th, 2000, 08:05 AM
ajay ajay is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2000
Posts: 1 ajay User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
i have installed jserv module on my unix server with virtual BSD flavour.the servlets are running fine there. now i want to connect mysql database to the servlets.i have installed the mm mysql driver at /usr/local/jdk1.1.8 and set the classpath.
But it was not working the ..mm.mysql.Driver class was not found. then i put all the org.gjt... class package to the /sr/etc/httpd/servlets directory ,
now my servlet could find the mm.mysql.Driver class but the connection is not made with the server.
the connection string i have passed is
"jdbc:mysql://myhost(localhost):3306/databasename?user=username&password=pass"; i have created a seperate user and permitted all the access to him in the mysql user database.

i have tried all the option in the connection string but i am still getting the error message
-------------------------------------
java.sql.SQLException: Server configuration denies access to data source

Connection null Exception is here java.lang.NullPointerException
------------------------------------------


Reply With Quote
  #2  
Old April 18th, 2000, 07:14 AM
plato plato is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2000
Posts: 8 plato User rank is Private First Class (20 - 50 Reputation Level)plato User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hi,

Firstly make sure you have added the mysql driver to your classpath, and then make sure you have given the mysql user you created access from localhost. If you have done these then ignore this

plato
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by ajay:
i have installed jserv module on my unix server with virtual BSD flavour.the servlets are running fine there. now i want to connect mysql database to the servlets.i have installed the mm mysql driver at /usr/local/jdk1.1.8 and set the classpath.
But it was not working the ..mm.mysql.Driver class was not found. then i put all the org.gjt... class package to the /sr/etc/httpd/servlets directory ,
now my servlet could find the mm.mysql.Driver class but the connection is not made with the server.
the connection string i have passed is
"jdbc:mysql://myhost(localhost):3306/databasename?user=username&password=pass"; i have created a seperate user and permitted all the access to him in the mysql user database.

i have tried all the option in the connection string but i am still getting the error message
[/quote]


Reply With Quote
  #3  
Old April 21st, 2000, 06:58 AM
Amit Amit is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2000
Posts: 6 Amit User rank is Private First Class (20 - 50 Reputation Level)Amit User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Amit
i am also facing the same problem and the error i am getting is unauthorised access to user@localhost. Now i'll try to run it on remote server and then will see whether it works or not.

Reply With Quote
  #4  
Old April 21st, 2000, 02:32 PM
Robman Robman is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 1999
Location: SLC, UT, USA
Posts: 47 Robman User rank is Private First Class (20 - 50 Reputation Level)Robman User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
Try taking the "username=" and "password=" out of the string and just use the actual users name (and password if necessary). I had done the same thing and this fixed it for me.

Reply With Quote
  #5  
Old April 22nd, 2000, 03:41 AM
Amit Amit is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2000
Posts: 6 Amit User rank is Private First Class (20 - 50 Reputation Level)Amit User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Amit
Finally my problem is fixed. I made a newuser in MySQL and granted him all the priviliges. But there is one thing, the password must be of eight characters else java program is giving unauthorized access exception.

Reply With Quote
  #6  
Old December 11th, 2000, 11:28 AM
Levisek Levisek is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2000
Posts: 0 Levisek User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I've got the same problem. I've installed JServ, JDBC v 1.2b, and MySQL 3.22.32 running on Linux. When I try to connect do my DataBase i get following exception:
Server configuration denies access to data source
When I try to connect to the same DB (same tables) but running on NT it works fine.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesJava Help > running jdbc with servlet


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway