This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills and have John Sonmez on-line!
See this thread for details.
The moose likes Tomcat and the fly likes unable to run MySQL queries Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "unable to run MySQL queries" Watch "unable to run MySQL queries" New topic
Author

unable to run MySQL queries

Prashil Wasnik
Greenhorn

Joined: Apr 18, 2006
Posts: 19
I m unable to excute my sql queries in Apache/Tomcat 5.0.27 this queries runs fine in JBOSS 3.2.2
I have the made the jdbc connection as jdbc:sql//localhost:8080/DBName;
is there any difference between the jdbc connection in JBOSS and Tomcat.
please help.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Since JBoss uses Tomcat as it's servlet/jsp engine, no.

How are you getting the database connection?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Prashil Wasnik
Greenhorn

Joined: Apr 18, 2006
Posts: 19
hi, as i have told i make the mysql connection using jdbc which uses mysqlconnector.jar. please clear yourself.
Masoud Kalali
Author
Ranch Hand

Joined: Jul 08, 2004
Posts: 531

Originally posted by Prashil Wasnik:
I m unable to excute my sql queries in Apache/Tomcat 5.0.27 this queries runs fine in JBOSS 3.2.2
I have the made the jdbc connection as jdbc:sql//localhost:8080/DBName;
is there any difference between the jdbc connection in JBOSS and Tomcat.
please help.


in case that you post the log file entry (exceptions ) related to your problem people can help you easier.

also i noticed that you used jdbc:sql//localhost:8080/DBName which is not correct for mysql AFAIR , you should use jdbc:mysql//localhost:8080/DBName instead.


Masoud Kalali
Software Engineer - My Weblog - GlassFish Security
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18987
    
    8

If it works successfully from one machine but not from another machine then there are two immediate possibilities that I can think of:

1. The second machine cannot connect to the server because of some network configuration issue.

2. MySQL's security parameters allow connecting from the first machine but not from the second machine.

It would help if you found the error messages and stack traces describing the actual problem, though. Much more practical than guessing based on "unable to execute".
Hassan Schnieder
Greenhorn

Joined: Jun 09, 2006
Posts: 11
Hello,

A jboss jndi looks like this as far as I know so far...

"java:/MyJndiName"

and if your running tomcat inside jboss that's what it should look like i'm pretty sure.


regards,
Hassan
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: unable to run MySQL queries