View Issue Details

IDProjectCategoryView StatusLast Update
0002328SymmetricDSBugpublic2016-01-03 16:44
ReporterondrejhalaAssigned Tochenson 
PriorityhighSeveritycrashReproducibilityalways
Status closedResolutionfixed 
Product Version3.7.19 
Target Version3.7.28Fixed in Version3.7.28 
Summary0002328: Error during use of dbexport feature on PostgreSQL database
DescriptionIllegal State Exception is fired during export of table from PosgreSQL database v8.4.2 with dbexport tool.

Exception message: Cannot translate a java.lang.Long into a byte[].

This happens only on tables with large object column.

This issue has been already committed with previous version of SymmetricDS and PostgreSQL (http://www.symmetricds.org/issues/view.php?id=2215).
The issue is confirmed in last version of SymmetricDS.
Steps To ReproduceCall dbexport on PosgreSQL database v9.3.1 on table that contains column with type lo.

.\dbexport --engine SymmetricDsPSRV --format=csv --dir=C:\DBExport attachment

Structure of table:
CREATE TABLE attachment
(
  id integer NOT NULL,
  packed_len bigint NOT NULL,
  packed_len_id integer NOT NULL,
  buffer lo
)
Additional InformationLog OUTPUT:

Log output will be written to C:\SymmetricDS\symmetric-psrv-export/logs/symmetric.log
[] - AbstractCommandLauncher - Option: name=engine, value={SymmetricDsPSRV}
[] - AbstractCommandLauncher - Option: name=format, value={csv}
[] - AbstractCommandLauncher - Option: name=dir, value={C:\DBExport}
[] - JdbcDatabasePlatformFactory - Detected database 'PostgreSQL', version '8', protocol 'postgresql'
[] - JdbcDatabasePlatformFactory - The IDatabasePlatform being used is org.jumpmind.db.platform.postgresql.PostgreSqlDat
abasePlatform
-------------------------------------------------------------------------------
An exception occurred. Please see the following for details:
-------------------------------------------------------------------------------
java.lang.IllegalStateException: Cannot translate a java.lang.Long into a byte[]
        at org.jumpmind.db.sql.Row.toBytes(Row.java:72)
        at org.jumpmind.db.sql.Row.getBytes(Row.java:131)
        at org.jumpmind.db.platform.AbstractDatabasePlatform.getStringValues(AbstractDatabasePlatform.java:487)
        at org.jumpmind.symmetric.io.data.DbExport$WriterWrapper.writeRow(DbExport.java:510)
        at org.jumpmind.symmetric.io.data.DbExport$1.mapRow(DbExport.java:222)
        at org.jumpmind.db.sql.JdbcSqlReadCursor.next(JdbcSqlReadCursor.java:115)
        at org.jumpmind.db.sql.AbstractSqlTemplate.query(AbstractSqlTemplate.java:193)
        at org.jumpmind.db.sql.AbstractSqlTemplate.query(AbstractSqlTemplate.java:182)
        at org.jumpmind.db.sql.AbstractSqlTemplate.query(AbstractSqlTemplate.java:123)
        at org.jumpmind.symmetric.io.data.DbExport.writeTable(DbExport.java:220)
        at org.jumpmind.symmetric.io.data.DbExport.exportTables(DbExport.java:181)
        at org.jumpmind.symmetric.io.data.DbExport.exportTables(DbExport.java:159)
        at org.jumpmind.symmetric.io.data.DbExport.exportTables(DbExport.java:149)
        at org.jumpmind.symmetric.DbExportCommand.executeWithOptions(DbExportCommand.java:192)
        at org.jumpmind.symmetric.AbstractCommandLauncher.execute(AbstractCommandLauncher.java:190)
        at org.jumpmind.symmetric.DbExportCommand.main(DbExportCommand.java:75)


SW versions:
PostgreSQL 9.3.1, compiled by Visual C++ build 1600, 32-bit
Java version: 1.8.0_25
TagsNo tags attached.

Activities

There are no notes attached to this issue.

Related Changesets

SymmetricDS: 3.7 8e53aad2

2015-12-08 13:42:09

chenson

Details Diff
0002328: Error during use of dbexport feature on PostgreSQL database
0002328
mod - symmetric-jdbc/src/main/java/org/jumpmind/db/platform/postgresql/PostgresLobHandler.java Diff File
mod - symmetric-jdbc/src/main/java/org/jumpmind/db/sql/JdbcSqlTemplate.java Diff File

Issue History

Date Modified Username Field Change
2015-06-23 03:47 ondrejhala New Issue
2015-12-08 13:42 chenson Fixed in Version => 3.7.28
2015-12-08 13:42 chenson Target Version => 3.7.28
2015-12-08 13:43 chenson Status new => resolved
2015-12-08 13:43 chenson Resolution open => fixed
2015-12-08 13:43 chenson Assigned To => chenson
2015-12-08 14:00 chenson Changeset attached => SymmetricDS 3.7 8e53aad2
2016-01-03 16:44 chenson Status resolved => closed