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

KKIMPORT problem

Started by karthik, December 20, 2007, 12:44:41 pm

Previous topic - Next topic

karthik

Hi 2 Konakartians,
    I've just started to do import my bulk product using KKIMPORTER. ExportFromKKUsingEng is working fine.I am able to get all my product details in a text file(exportedDataEng.txt)....
            Now im trying 2 import using d same text file(exportedDataEng.txt) to my konakart database.But while doing this using ImportFromKKUsingEng, im gettin followin errors....

ERRORS:

D:\Program Files\Apache Software Foundation\Tomcat 5.5\import_export>java -cp %I
MP_EXP_CLASSPATH% com.konakart.importer.ImportRunner exportedDataEng.txt false
Properties file found = /D:/Program%20Files/Apache%20Software%20Foundation/Tomca
t%205.5/import_export/classes/kkImporter.properties
20-Dec 17:48:52 INFO  (KKAdmin.java:init:237) Finished Initialising Log4j
20-Dec 17:48:52 INFO  (KKAdmin.java:init:240) The configuration file being used
is /D:/Program%20Files/Apache%20Software%20Foundation/Tomcat%205.5/import_export
/classes/konakartadmin.properties
20-Dec 17:48:52 INFO  (KKAdmin.java:init:245) Initialising KKAdmin
20-Dec 17:48:52 INFO  (KKAdmin.java:initKonakart:467) KonaKart Admin V2.2.0.7 bu
ilt 10:57AM 22-Oct-2007 BST
20-Dec 17:48:52 INFO  (KKAdmin.java:init:247) Finished Initialising KonaKartAdmi
n
20-Dec 17:48:52 INFO  (KKAdmin.java:init:253) Initialising Torque
20-Dec 17:48:53 INFO  (KKTorque.java:init:53) Initialising KonaKart-Torque for o
rg.apache.torque.adapter.DBMM
20-Dec 17:48:53 INFO  (KKAdmin.java:init:266) Finished Initialising Torque
20-Dec 17:48:53 WARN  (AdminSecurityMgr.java:login:137) User 'admin' has just lo
gged in to the Admin App
20-Dec 17:48:53 INFO  (?:init:?) Using data file : /D:/Program%20Files/Apache%20
Software%20Foundation/Tomcat%205.5/import_export/exportedDataEng.txt
20-Dec 17:48:53 INFO  (?:init:?) New Line Substitution = <br>
20-Dec 17:48:53 ERROR (?:doImport:?) java.sql.SQLException: Incorrect arguments
to mysql_stmt_execute<br>Exception Stack Trace = <br>   at org.apache.torque.uti
l.BasePeer.throwTorqueException(BasePeer.java:106)<br>   at org.apache.torque.ut
il.BasePeer.insertOrUpdateRecord(BasePeer.java:653)<br>   at org.apache.torque.u
til.BasePeer.doInsert(BasePeer.java:531)<br>   at com.konakartadmin.bl.AdminProd
uctMgr.insertProduct(AdminProductMgr.java:152)<br>   at com.konakartadmin.bl.KKA
dmin.insertProduct(KKAdmin.java:2471)<br>   at com.konakart.importer.ImportData.
insertOrEdit(Unknown Source)<br>   at com.konakart.importer.ImportData.validate(
Unknown Source)<br>   at com.konakart.importer.ImportData.importMap(Unknown Sour
ce)<br>   at com.konakart.importer.ImportController.processDataLine(Unknown Sour
ce)<br>   at com.konakart.importer.ImportController.processDataFile(Unknown Sour
ce)<br>   at com.konakart.importer.ImportController.doImport(Unknown Source)<br>
   at com.konakart.importer.ImportRunner.main(Unknown Source)<br><br>Exception C
ause = <br>   at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:946)<b
r>   at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2870)<br>   at com.
mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1573)<br>   at com.mysql.jdbc.Server
PreparedStatement.serverExecute(ServerPreparedStatement.java:1169)<br>   at com.
mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:
693)<br>   at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.j
ava:1404)<br>   at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatem
ent.java:1318)<br>   at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedS
tatement.java:1303)<br>   at com.workingdogs.village.Record.saveWithInsert(Recor
d.java:420)<br>   at com.workingdogs.village.Record.save(Record.java:231)<br>
at com.workingdogs.village.Record.save(Record.java:198)<br>   at org.apache.torq
ue.util.BasePeer.insertOrUpdateRecord(BasePeer.java:650)<br>   at org.apache.tor
que.util.BasePeer.doInsert(BasePeer.java:531)<br>   at com.konakartadmin.bl.Admi
nProductMgr.insertProduct(AdminProductMgr.java:152)<br>   at com.konakartadmin.b
l.KKAdmin.insertProduct(KKAdmin.java:2471)<br>   at com.konakart.importer.Import
Data.insertOrEdit(Unknown Source)<br>   at com.konakart.importer.ImportData.vali
date(Unknown Source)<br>   at com.konakart.importer.ImportData.importMap(Unknown
Source)<br>   at com.konakart.importer.ImportController.processDataLine(Unknown
Source)<br>   at com.konakart.importer.ImportController.processDataFile(Unknown
Source)<br>   at com.konakart.importer.ImportController.doImport(Unknown Source
)<br>   at com.konakart.importer.ImportRunner.main(Unknown Source)
Exception in thread "main" com.konakartadmin.app.KKAdminException: java.sql.SQLE
xception: Incorrect arguments to mysql_stmt_execute<br>Exception Stack Trace = <
br>   at org.apache.torque.util.BasePeer.throwTorqueException(BasePeer.java:106)
<br>   at org.apache.torque.util.BasePeer.insertOrUpdateRecord(BasePeer.java:653
)<br>   at org.apache.torque.util.BasePeer.doInsert(BasePeer.java:531)<br>   at
com.konakartadmin.bl.AdminProductMgr.insertProduct(AdminProductMgr.java:152)<br>
   at com.konakartadmin.bl.KKAdmin.insertProduct(KKAdmin.java:2471)<br>   at com
.konakart.importer.ImportData.insertOrEdit(Unknown Source)<br>   at com.konakart
.importer.ImportData.validate(Unknown Source)<br>   at com.konakart.importer.Imp
ortData.importMap(Unknown Source)<br>   at com.konakart.importer.ImportControlle
r.processDataLine(Unknown Source)<br>   at com.konakart.importer.ImportControlle
r.processDataFile(Unknown Source)<br>   at com.konakart.importer.ImportControlle
r.doImport(Unknown Source)<br>   at com.konakart.importer.ImportRunner.main(Unkn
own Source)<br><br>Exception Cause = <br>   at com.mysql.jdbc.SQLError.createSQL
Exception(SQLError.java:946)<br>   at com.mysql.jdbc.MysqlIO.checkErrorPacket(My
sqlIO.java:2870)<br>   at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1573)<
br>   at com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStat
ement.java:1169)<br>   at com.mysql.jdbc.ServerPreparedStatement.executeInternal
(ServerPreparedStatement.java:693)<br>   at com.mysql.jdbc.PreparedStatement.exe
cuteUpdate(PreparedStatement.java:1404)<br>   at com.mysql.jdbc.PreparedStatemen
t.executeUpdate(PreparedStatement.java:1318)<br>   at com.mysql.jdbc.PreparedSta
tement.executeUpdate(PreparedStatement.java:1303)<br>   at com.workingdogs.villa
ge.Record.saveWithInsert(Record.java:420)<br>   at com.workingdogs.village.Recor
d.save(Record.java:231)<br>   at com.workingdogs.village.Record.save(Record.java
:198)<br>   at org.apache.torque.util.BasePeer.insertOrUpdateRecord(BasePeer.jav
a:650)<br>   at org.apache.torque.util.BasePeer.doInsert(BasePeer.java:531)<br>
  at com.konakartadmin.bl.AdminProductMgr.insertProduct(AdminProductMgr.java:152
)<br>   at com.konakartadmin.bl.KKAdmin.insertProduct(KKAdmin.java:2471)<br>   a
t com.konakart.importer.ImportData.insertOrEdit(Unknown Source)<br>   at com.kon
akart.importer.ImportData.validate(Unknown Source)<br>   at com.konakart.importe
r.ImportData.importMap(Unknown Source)<br>   at com.konakart.importer.ImportCont
roller.processDataLine(Unknown Source)<br>   at com.konakart.importer.ImportCont
roller.processDataFile(Unknown Source)<br>   at com.konakart.importer.ImportCont
roller.doImport(Unknown Source)<br>   at com.konakart.importer.ImportRunner.main
(Unknown Source)
        at com.konakartadmin.bl.KKAdmin.insertProduct(KKAdmin.java:2476)
        at com.konakart.importer.ImportData.insertOrEdit(Unknown Source)
        at com.konakart.importer.ImportData.validate(Unknown Source)
        at com.konakart.importer.ImportData.importMap(Unknown Source)
        at com.konakart.importer.ImportController.processDataLine(Unknown Source
)
        at com.konakart.importer.ImportController.processDataFile(Unknown Source
)
        at com.konakart.importer.ImportController.doImport(Unknown Source)
        at com.konakart.importer.ImportRunner.main(Unknown Source)

              So,any one can suggest me 2 rectify dis error....
Thanks,
Karthi

ryan

Hi,

Can you edit the export file so that it only contains the header line and one record that fails and then post that to the forum ?

karthik

Hi Ryan,
       Thanx 4 ur reply.This s my header line for my database,

v_products_id   v_products_model   v_products_image   v_products_name_1   v_products_description_1   v_products_name_2   v_products_description_2   v_products_name_3   v_products_description_3   v_products_price   v_products_weight   v_date_avail   v_date_added   v_products_quantity   v_manufacturers_name   v_categories_name_1   v_categories_name_2   v_categories_name_3   v_tax_class_id   v_status   v_invisible   v_type   EOREOR

and dis s my record that fails,

1   Samosa   prod_samosa.jpg   samosa   "Homemade crisp patties, stuffed with fresh potatoes & peas."   samosa   samosa   samosa   samosa   3.5   0   25/10/2007   25/10/2007   91    Restaurant   Vegetarian   Appetizers      1   active   0   0   EOREOR


Thanks,
Karthi

ryan

Hi,

Can you attach the actual file that we can try ? Otherwise we have to recreate it with the tab delimiters etc.

ryan

Hi,

Also can you do quick test by escaping the & character in your description ?

karthik

K Ryan i'll try n update u..

karthik

Hi Ryan,

I've attached my text file for ur reference....

kate

Hi Karthik,

Studying your data makes me very hungry  :)

I can load your data OK so perhaps there is some incompatibility with the database???

What I suggest is that you turn on debug for the queries and hopefully the problem will be clear.

Do this by setting:

log4j.logger.org.apache.torque.util.BasePeer  = DEBUG

... in konakart-logging.properties

Then run the import.


BTW.. have you changed parameters in your kkImporter.properties file?

Kate

karthik

Hi Kate,

            Thanks for ur comments n reply..I will make d changes said and jst update u.
S i've changed my KKIMPORTER.properties.I've changed....

           1.webservice_endpoint according to my port...
           2.My eng_userid and eng_password for my workin database...

Except these i've changed nothing else,is dis changes make any pbm 2 import..??????

Thanks,
Karthi

kate

Hi Karthik,

If I understand your language correctly, those changes look fine.

Kate