• Welcome to KonaKart Community Forum. Please login or sign up.
 

How do I define the database connection parameters?

Started by nick, January 18, 2007, 11:26:09 am

Previous topic - Next topic

nick

Where do I define the jdbc parameters for KonaKart?

I can't find a configuration file.

  ::) Nick

john

Hi Nick,  (Homer!?),

There's a properties file for this under webapps/konakart/WEB-INF/classes/konakart.properties.

More details on this can be found in the FAQ at:

http://www.konakart.com/installationfaq.php#Defining_Database_Parameters

John

yooifeng

Hi John,

If my torque.database.default                         = dbA

and i change all oscommerce word to dbA in the config file  (e.g. torque.dsfactory.dbA.connection.driver   = com.mysql.jdbc.Driver),

I am getting below error , please advice.


"com.konakart.app.KKException: Unable to connect to the Database called dbA. En
sure that the database is running
and if so, check the database connection parameters in the konakart.properties
file under WEB-INF/classes.
        at com.konakart.app.KKEng.initTorque(KKEng.java:195)
        at com.konakart.app.KKEng.init(KKEng.java:140) "


P/S: I am able to use Toad for mysql to connect dbA.

john

Hi,

You shouldn't change all the oscommerce references.   Only change the values for these parameters:

torque.database.oscommerce.adapter              = mysql
torque.dsfactory.oscommerce.connection.driver   = com.mysql.jdbc.Driver
torque.dsfactory.oscommerce.connection.url      = jdbc:mysql://localhost:3306/dbname?zeroDateTimeBehavior=convertToNull
torque.dsfactory.oscommerce.connection.user     = username
torque.dsfactory.oscommerce.connection.password = password

It is most likely you will only need to change the last three shown above.

Good luck,
John

yooifeng

Hi John,

Thanks a lot, i can connect my db from my oscommerce website now.

Thanks John for your promptly reply. :)

john

You're very welcome  :).  Please let us know if you run into any other problems.
John

oleg

Quote from: john on February 12, 2007, 02:40:58 pm
You're very welcome  :).  Please let us know if you run into any other problems.
John


Hi,
i can not connect my db
-----------------------------------------------------------------------------------
torque.database.oscommerce.adapter              = mysql
torque.dsfactory.oscommerce.connection.driver   = com.mysql.jdbc.Driver
torque.dsfactory.oscommerce.connection.url      = jdbc:mysql://localhost:3306/dbname?zeroDateTimeBehavior=convertToNull
torque.dsfactory.oscommerce.connection.user     = root
torque.dsfactory.oscommerce.connection.password =
-------------------------------------------------------------------------------------------------

ERROR:
he details of the malfunction are :

Exception Name = com.konakart.al.KKAppException
Exception Message = com.konakart.app.KKException: Unable to connect to the Database called oscommerce. Ensure that the database is running and if so, check the database connection parameters in the konakart.properties file under WEB-INF/classes.
Exception Stack Trace =
at com.konakart.al.KKAppEng.(KKAppEng.java:264)
at com.konakart.actions.BaseAction.getKKAppEng(BaseAction.java:69)
at com.konakart.actions.CatalogMainPageAction.execute(CatalogMainPageAction.java:56)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio.........
......

??? Oleg

paolo

Hi Oleg,

You need to configure the database connection parameters. Try following the instructions that you can find in earlier posts within this thread.

Paolo

oleg

Hollo I make ales constantly more heier wi. But no success.
My konakart.properties:
torque.database.default                         = oscommerce

torque.database.oscommerce.adapter              = mysql
torque.dsfactory.oscommerce.connection.driver   = com.mysql.jdbc.Driver
torque.dsfactory.oscommerce.connection.url      = jdbc:mysql://localhost:3306/oscommerce?zeroDateTimeBehavior=convertToNull
torque.dsfactory.oscommerce.connection.user     = root
torque.dsfactory.oscommerce.connection.password =


Imma ERROR
Exception Name = com.konakart.al.KKAppException
Exception Message = com.konakart.app.KKException: Unable to connect to the Database called oscommerce. Ensure that the database is running and if so, check the database connection parameters in the konakart.properties file under WEB-INF/classes.
Exception Stack Trace =

john

Oleg,

Your settings look good.   Have you verified that you can access your database (that you've called "oscommerce") using MySQL tools using that username and password?

John

oleg

Quote from: john on March 02, 2007, 11:50:54 am
Oleg,

Your settings look good.   Have you verified that you can access your database (that you've called "oscommerce") using MySQL tools using that username and password?

John

Hi John
username=root
:o
Other one web min username root connect no problem

john

Hi Oleg,

If I understand you correctly, using MySQL tools you were able to log in to your oscommerce database using user root, with no password?   Is that correct?   Did you see all the oscommerce tables?

This is tricky to diagnose from here. The error clearly reports that it cannot connect to the database - so this should be a big clue.   If you can log in using MySQL tools then you should be able to log in using exactly the same parameters in the KonaKart properties file.

John

oleg


msa

Maybe a reinstall of konakart would solve the problem. It just takes a few mins and the instruction are on the FAQ section http://www.konakart.com/installationfaq.php

Shaheem.

paolo

Also remember that you have to re-start Tomcat to pick up the new values in the properties file.