CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> Java

 MySql Connection Problem

Print topic Send  topic

Author Message
jakartacat

Posts: 1
Posted: 11/01/2005, 9:49 AM

I am trying the employees database application of the codecharge tutorial, but i have a datase connection. I can run normal application such as helloword, but application with database doesnt work. my Webserver: tomcat 5. I have created a ODBC datasource
My database parameter are :
Database: MySql
jdbc driver: "com.mysql.jdbc.Driver" ("sun.jdbc.odbc.JdbcOdbcDriver" doesnt work too)
Jdbc URL: jdbc:mysql://localhost:3306/intranet
Username and password are also correct set.
when i test the connection it works but we i want to use it i get this Exception:
-------------------------------------------------------------
The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: Unable to create connection 'EmployeesCon' to the database.
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:358)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

root cause

java.lang.RuntimeException: Unable to create connection 'EmployeesCon' to the database.
com.codecharge.db.PoolJDBCConnection.getConnection(PoolJDBCConnection.java:19)
com.codecharge.db.JDBCConnection.<init>(JDBCConnection.java:80)
com.codecharge.db.PoolJDBCConnection.<init>(PoolJDBCConnection.java:11)
com.codecharge.db.JDBCConnectionFactory.getJDBCConnection(JDBCConnectionFactory.java:36)
com.codecharge.db.JDBCConnectionFactory.getJDBCConnection(JDBCConnectionFactory.java:27)
com.codecharge.GridProcessor.select(GridProcessor.java:90)
com.codecharge.GridProcessor.process(GridProcessor.java:65)
com.codecharge.PageProcessor.process(PageProcessor.java:28)
com.codecharge.PageController.process(PageController.java:155)
org.apache.jsp.Employees_jsp._jspService(Employees_jsp.java:161)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

note The full stack trace of the root cause is available in the Tomcat logs.

could somebody helps me please.
View profile  Send private message
miko

Posts: 50
Posted: 11/01/2005, 10:44 PM

Hi,

to clarify reason you should look at full stack of the root clause.
As variant you can turn on CCS logging and looking for reason of problem in it.
To turn on CCS logging you should specify path to log file (folder for log-file must exist) in 'Path to logfile' project property and set 'Level of logging' project property to 'debug'.

_________________
Regards,
Michael
View profile  Send private message
efriend
Posted: 12/06/2005, 11:03 PM

Hi,
set classpath to mysql.jar
and paste the "mysql-connector-java-3.1.7-bin" jar file in
c:\jdkXXX\jre\lib\ext folder...

All the Best
efriend

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.