• Welcome to KonaKart Community Forum. Please login or sign up.
 
May 04, 2024, 05:26:39 am

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - franklinr

1
Programming of KonaKart / torque transaction
March 04, 2014, 11:08:00 pm
I'm getting a null pointer when attempting to start a transaction using the included konakart torque jar.

Transaction.begin("konakart")


Why doesn't this work?

2
I'm using konakart but my application needs some other custom tables so I've configured torque to generate the classes for those tables in the same database that the rest of my konakart tables are in.  Konakart already initializes torque with the database connection parameters I want to use but if I attempt to connect to the custom table with torque, I'm getting a null pointer exception on the torque connection.  Is there some way to get the torque connection from konakart and set it appropriately for the custom tables?
3

Caused by: com.konakart.app.KKException: Unable to connect to the Database called null. Ensure that the database is running and if so, check the database connection parameters in the konakart.properties file under WEB-INF/classes.

torque.database.store1.adapter              = mysql
torque.dsfactory.store1.connection.driver   = com.mysql.jdbc.Driver
torque.dsfactory.store1.connection.url      = jdbc:mysql://<some ip>:3306/konakart?zeroDateTimeBehavior=convertToNull
torque.dsfactory.store1.connection.user     = user
torque.dsfactory.store1.connection.password = password


I'm getting this exception when trying to connect in a Java application from my local machine to a remote server.  Changing <some ip> to localhost and connecting to my local mysql works fine.  Using mysql workbench and connecting to <some ip> using the above credentials works fine as well.  Connecting to the database server from a different remote server in a konakart web application using the same credentials works fine. 

I would believe my local ip is getting rejected by security except that I can connect from here using mysql workbench. 

Is there some other property I'm missing that needs to be set to ensure the database name is configured properly?  I would just like to understand the exception message better.

Thanks.
4
I expected it to be part of ProductIf or perhaps from the KKEngIf somehow but just can't seem to find this through the API.  Just having the image name in the product obviously isn't giving me what I need to reference the image.

Thanks for bearing with me.