aspose file tools*
The moose likes Other Java Products and Servers and the fly likes Getting Error Message from Server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Java Products and Servers
Bookmark "Getting Error Message from Server" Watch "Getting Error Message from Server" New topic
Author

Getting Error Message from Server

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    6

Ok, I am trying to work with Resin and I am using it's Connection Pool to connect to a database from a Servlet.
Below is the relevent information
resin.conf - <Database>

Servlet - NewPostServlet

web.xml

And when I run this using the following http
http : //localhost : 8081/JBB/Connection (space for smilies)
I get the following error:
General error, message from server: "No Database Selected"
I have used the same Connectin Pool and used JSP - sql syntax to do the exact same thing I am doing in my Servlet and it works just fine. So I am not sure if the problem is my Servlet or my resin.conf file or my web.xml file. It all seems fine to me.
Thanks for any help.
The reason this is in the Resin Forum is because I don't know if it is a Resin problem or not. Move it if it is a Servlet problem.
Thanks.


GenRocket - A Test Data Generation Platform
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    6

UPDATE
I have determined that the error message is coming from an SQLException so the Driver is returning that message to me. However, I still don't know why. I specified the database in the resin.conf file.
So again, if this needs to be moved....
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    6

UPDATE
If I execute a USE dbname command before the query, it works just fine. But I don't understand why I would have to do this. It doesn't seem like I should if the ConnectionPool has already connected to the database n number of times and the connections are just sitting there.
Chad McGowan
Ranch Hand

Joined: May 10, 2001
Posts: 265
Here's how I have my data source configured in Resin:

I haven't had any problems with this.
Matthew Phillips
Ranch Hand

Joined: Mar 09, 2001
Posts: 2676
The sample resin.conf file has the following configuration.


Matthew Phillips
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    6

I forgot to mention that I am using the new Resin Beta release. I am going to back off to the current release and see if that makes a difference. In the beta release they have changed their resin.conf a bit. My info reflects these changes.
Thanks for the help.
Mariusz Olejnik
Greenhorn

Joined: Apr 20, 2004
Posts: 1
Use org.gjt.mm.mysql.Driver instead of com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Getting Error Message from Server
 
Similar Threads
problem while build
Struts with Resin
authentication in jboss
struts forward link?
obatining JNDI connection in load-on-startup or context listener?