Text File Import is broken in 2.2b1.
Trying to import a CSV or TAB text file is not working anymore, all I get after the import dialog is an empty table, no messages or warning and a pending transaction shown in servoy server.
When I quit Developer it asks if I want to consolidate the transaction but nothing happens.
Importing with a Method like the one hinted on the HowTo forum works as expected.
My configuration:
MacOS X 10.3.7
Java™ 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3)
Java HotSpot™ Client VM (build 1.4.2-38, mixed mode)
MySQL 4.0.15
mysql-connector-java-3.0.15-ga-bin.jar
Any help would really be appreciated.
very strange. More people are saying this.
But if we test it here it works like a charm. So currently we don’t know what really happens.
Can you start the developer with -DSTACKTRACE=TRUE and then try the import again. What kind of logging is generated at the moment you import?
I just finished installing a new version of MySQL and the problem is still there.
Now I’m on MySQL 4.1.8, I’m sticking to MyISAM tables so no transaction support yet.
I’m going to try your advice now and report, if it doesn’t work I’ll try with InnoDB tables, maybe it’s a problem with the lack of transaction support.
Nick
I tried to start developer with the -DSTACKTRACE=TRUE and this is what I get:
- When I start importing and the dialog says “Importing”:
PingScanner woke up, queue [ b10837f8-60d0-11d9-a3e1-ea7ebd129f6a(1105118623302) ]
PingScanner sleeping for 299999 milliseconds, queue [ b10837f8-60d0-11d9-a3e1-ea7ebd129f6a(1105118623302) ]
sprint: Getting transaction for id=0, thread=runner
sprint: Started new transaction for id=0
used sql select prova.provaid from prova order by prova.provaid
sprint: Released transaction, thread=runner
java.lang.NoSuchMethodError: com.servoy.j2db.dataprocessing.IRecord.setValue(Ljava/lang/String;Ljava/lang/Object;)Z
at com.servoy.r2.plugins.tabxport.ImportTransferPanel$1.createRecords(ImportTransferPanel.java:239)
at com.servoy.r2.plugins.tabxport.ImportTransferPanel$1.run(ImportTransferPanel.java:168)
at java.lang.Thread.run(Thread.java:552)
- When after a while I close the dialog:
size of dialog0 java.awt.Point[x=305,y=259]
size of dialog0 java.awt.Point[x=305,y=259]
- When I quit Developer and answer yes at the transaction consolidation dialog:
sprint: Ending transaction for transaction with id=0
sprint: Doing COMMIT for transaction with id=0
PingScanner woke up, queue [ b10837f8-60d0-11d9-a3e1-ea7ebd129f6a(1105118701824) ]
PingScanner sleeping for 299999 milliseconds, queue [ b10837f8-60d0-11d9-a3e1-ea7ebd129f6a(1105118701824) ]
sprint: Closed connection, thread=AWT-EventQueue-0
Setting solution in messages, reloading messages: null
Unregistering client: b10837f8-60d0-11d9-a3e1-ea7ebd129f6a
Unregistering client b10837f8-60d0-11d9-a3e1-ea7ebd129f6a
shutDown
size of Application_frame java.awt.Point[x=2,y=22]
Unregistering client: b10837f8-60d0-11d9-a3e1-ea7ebd129f6a
The file i’m trying to import is a .tab separated text file but the bug is reproducible also with CSV files, this is the test table:
mysql> describe sprint.prova;
+---------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------+-------------+------+-----+---------+-------+
| provaid | int(11) | | PRI | 0 | |
| ts | varchar(50) | YES | | NULL | |
| status | varchar(50) | YES | | NULL | |
+---------+-------------+------+-----+---------+-------+
My configuration is:
Servoy Developer 2.2b1
mysql-standard-4.1.8-apple-darwin7.6.0-powerpc
mysql-connector-java-3.0.16-ga-bin.jar
MyISAM tables
on MacOS X 10.3.7
Hope this helps,
Nick
I noticed another thing:
- If I don’t import values on the PK letting servoy filling the id values after the import I get no records;
- If I try to import also the values for the PK after the import I see that only the last record is being imported and only the PK column is being but not entirely, just the value of the PK;
The file contains 4 records (PK 1 to 4), after the import only ‘provaid’ of the last record is being imported:
mysql> select * from sprint.prova;
+---------+------+--------+
| provaid | ts | status |
+---------+------+--------+
| 4 | NULL | NULL |
+---------+------+--------+
1 row in set (0.00 sec)
Nick
yes we figured it out.
the beta didn’t included updated plugins. The next build will have the last onces.