ADS version : ads-windows-x64-14.0-dev-44
Database:Sybase Anywhere 12/Sybase ASE15.7
Create following table
CREATE TABLE dbo.Test_univarchar (
col1 univarchar(10) NULL
)
GO
Now go to Tools->Import Data->Connect to Sybase ASE 15.7->Import file(Use attached file Exp.txt),click next->From Schema and table drop down select respective values and click next->In option tab from "Destination" drop down->choose "Import into database",click on next button->On Transaction tab set Transaction type:Batch,Batch size:1000,Threshold:0and wait time-1 and say next.This will throw ArrayIndexOutOfBoundsException over ADS window console.
This does not occur in ADS 13.0 rc-4
|
34 KB
![]() |
26 B
![]() |
11 KB
|
116 KB
Failed for unichar data type in ADS 14,work fine in ADS 13
CREATE TABLE dbo.Test_unichar (
col1 unichar(10) NULL
)
GO
This seems to be a Sybase JDBC driver bug. I tried using PreparedStatement's setNString(), setString(), setNCharacterStream() method, they all result in the same exception
This seems to be a Sybase JDBC driver bug. I tried using PreparedStatement's setNString(), setString(), setNCharacterStream() method, they all result in the same exception
See here :
http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc39001.0605/html/prjdbc/BHCFJECE.htm
You could try to set the Server Registration->Advanced->Charset=UTF8
We could also downdrop the driver to jConnect 6 and see if it works in there. If it works, then we could report a bug with jConnect 7.
We are expecting a new jConnect 7 build in the next few weeks with other fixes.
See here :
http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc39001.0605/html/prjdbc/BHCFJECE.htm
You could try to set the Server Registration->Advanced->Charset=UTF8
We could also downdrop the driver to jConnect 6 and see if it works in there. If it works, then we could report a bug with jConnect 7.
We are expecting a new jConnect 7 build in the next few weeks with other fixes.
1. I tried Server Registration->Advanced->Charset=UTF8, same problem
2. I tried using jConnect 6, ADS could not get a prepared statement, exception below:
1. I tried Server Registration->Advanced->Charset=UTF8, same problem
2. I tried using jConnect 6, ADS could not get a prepared statement, exception below:
Does this error still occur if you used a prepared statement, but disable the ENABLE_BULK_LOAD driver parameter?
If you look at the stack trace the exception is thrown by the SybBCP class, so it might just be the BCP which is Bulk Copy.
Does this error still occur if you used a prepared statement, but disable the ENABLE_BULK_LOAD driver parameter?
If you look at the stack trace the exception is thrown by the SybBCP class, so it might just be the BCP which is Bulk Copy.
Hi Tariq,
Can you please try this test case as well?
Same as issue #8799, by following the same test steps and using the same data file, I was not able to reproduce the error against the Sybase ASE 15.0 server running on xx.xxx.11.46. Data is truncated and successfully inserted to the database with the following message logged:
<2013-05-16 21:27:50,359> ERROR [import] <com.aquafold.datastudio.tools.importtool.ImportThread> Prepared statement failed, fallback to insert statement.
java.sql.SQLException: JZ0SJ: Metadata accessor information was not found on this database. Please install the required tables as mentioned in the jConnect documentation.
at com.sybase.jdbc4.jdbc.SybConnection.getAllExceptions(SybConnection.java:2780)
at com.sybase.jdbc4.jdbc.SybStatement.handleSQLE(SybStatement.java:2665)
at com.sybase.jdbc4.jdbc.SybPreparedStatement.prepareBCP(SybPreparedStatement.java:3427)
at com.sybase.jdbc4.jdbc.SybPreparedStatement.<init>(SybPreparedStatement.java:209)
at com.sybase.jdbc4.jdbc.SybConnection.prepareStatement(SybConnection.java:1406)
at com.sybase.jdbc4.jdbc.SybConnection.prepareStatement(SybConnection.java:1307)
at com.sybase.jdbc4.jdbc.SybConnection.prepareStatement(SybConnection.java:1278)
at com.aquafold.aquacore.scripts.WrapperConnection.prepareStatement(WrapperConnection.java:64)
at com.aquafold.datastudio.tools.importtool.ImportThread.process(ImportThread.java:258)
at com.aquafold.datastudio.tools.importtool.ImportThread.run(ImportThread.java:98)
Hi Tariq,
Can you please try this test case as well?
Same as issue #8799, by following the same test steps and using the same data file, I was not able to reproduce the error against the Sybase ASE 15.0 server running on xx.xxx.11.46. Data is truncated and successfully inserted to the database with the following message logged:
<2013-05-16 21:27:50,359> ERROR [import] <com.aquafold.datastudio.tools.importtool.ImportThread> Prepared statement failed, fallback to insert statement.
java.sql.SQLException: JZ0SJ: Metadata accessor information was not found on this database. Please install the required tables as mentioned in the jConnect documentation.
at com.sybase.jdbc4.jdbc.SybConnection.getAllExceptions(SybConnection.java:2780)
at com.sybase.jdbc4.jdbc.SybStatement.handleSQLE(SybStatement.java:2665)
at com.sybase.jdbc4.jdbc.SybPreparedStatement.prepareBCP(SybPreparedStatement.java:3427)
at com.sybase.jdbc4.jdbc.SybPreparedStatement.<init>(SybPreparedStatement.java:209)
at com.sybase.jdbc4.jdbc.SybConnection.prepareStatement(SybConnection.java:1406)
at com.sybase.jdbc4.jdbc.SybConnection.prepareStatement(SybConnection.java:1307)
at com.sybase.jdbc4.jdbc.SybConnection.prepareStatement(SybConnection.java:1278)
at com.aquafold.aquacore.scripts.WrapperConnection.prepareStatement(WrapperConnection.java:64)
at com.aquafold.datastudio.tools.importtool.ImportThread.process(ImportThread.java:258)
at com.aquafold.datastudio.tools.importtool.ImportThread.run(ImportThread.java:98)
I replicated and will attach my logs in a moment.
I replicated and will attach my logs in a moment.
I am also able to reproduce this error in ADS 14.0.0-alpha-21 for Adaptive Server Enterprise/15.5/EBF 17218
I am also able to reproduce this error in ADS 14.0.0-alpha-21 for Adaptive Server Enterprise/15.5/EBF 17218
OK, I can reproduce it on Sybase ASE 15.5 running on 11.57 but not on 11.46 which is Sybase ASE 15.0, here is the error message:
<2013-05-20 20:13:26,093> ERROR [import] <com.aquafold.datastudio.tools.importtool.ImportThread>
java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at com.sybase.jdbc4.tds.BCPToken.write(BCPToken.java:2413)
at com.sybase.jdbc4.tds.BCPToken.writeParam(BCPToken.java:2117)
at com.sybase.jdbc4.tds.BCPToken.writeTdsBcpCol(BCPToken.java:1939)
at com.sybase.jdbc4.tds.BCPToken.writeVariableColumn(BCPToken.java:1155)
at com.sybase.jdbc4.tds.BCPToken.writeAPL(BCPToken.java:1037)
at com.sybase.jdbc4.tds.BCPToken.writeBulkData(BCPToken.java:330)
at com.sybase.jdbc4.tds.Tds.sendBulkData(Tds.java:5244)
at com.sybase.jdbc4.jdbc.SybBCP.bcpSendRow(SybBCP.java:1140)
at com.sybase.jdbc4.jdbc.SybPreparedStatement.executeBulkBatch(SybPreparedStatement.java:1684)
at com.sybase.jdbc4.jdbc.SybPreparedStatement.executeBatch(SybPreparedStatement.java:1722)
at com.aquafold.aquacore.scripts.WrappedStatement.executeBatch(WrappedStatement.java:150)
at com.aquafold.datastudio.tools.importtool.ImportThread.process(ImportThread.java:467)
at com.aquafold.datastudio.tools.importtool.ImportThread.run(ImportThread.java:98)
OK, I can reproduce it on Sybase ASE 15.5 running on 11.57 but not on 11.46 which is Sybase ASE 15.0, here is the error message:
<2013-05-20 20:13:26,093> ERROR [import] <com.aquafold.datastudio.tools.importtool.ImportThread>
java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at com.sybase.jdbc4.tds.BCPToken.write(BCPToken.java:2413)
at com.sybase.jdbc4.tds.BCPToken.writeParam(BCPToken.java:2117)
at com.sybase.jdbc4.tds.BCPToken.writeTdsBcpCol(BCPToken.java:1939)
at com.sybase.jdbc4.tds.BCPToken.writeVariableColumn(BCPToken.java:1155)
at com.sybase.jdbc4.tds.BCPToken.writeAPL(BCPToken.java:1037)
at com.sybase.jdbc4.tds.BCPToken.writeBulkData(BCPToken.java:330)
at com.sybase.jdbc4.tds.Tds.sendBulkData(Tds.java:5244)
at com.sybase.jdbc4.jdbc.SybBCP.bcpSendRow(SybBCP.java:1140)
at com.sybase.jdbc4.jdbc.SybPreparedStatement.executeBulkBatch(SybPreparedStatement.java:1684)
at com.sybase.jdbc4.jdbc.SybPreparedStatement.executeBatch(SybPreparedStatement.java:1722)
at com.aquafold.aquacore.scripts.WrappedStatement.executeBatch(WrappedStatement.java:150)
at com.aquafold.datastudio.tools.importtool.ImportThread.process(ImportThread.java:467)
at com.aquafold.datastudio.tools.importtool.ImportThread.run(ImportThread.java:98)
Several issues that we need to investigate:
-- ArrayIndexOutOfBoundException - this is caused by the data being larger than what the declared data type can handle
-- Seems to be bug in our code that once the out of bounds exception is thrown on this single record file, our code goes into a loop where it keeps on try to process the same record over & over again
-- We're setting ENABLE_BULK_LOAD=true. However, the various documented options are listed here: http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc32179.0707/html/jconnig/title.htm - We should do some testing to determine which one works best in our case
-- Take a look at: http://www.sybase.com/content/1026310/unicode_support_wp.pdf This discusses the various Java objects we can use to insert unichar data:
Several issues that we need to investigate:
-- ArrayIndexOutOfBoundException - this is caused by the data being larger than what the declared data type can handle
-- Seems to be bug in our code that once the out of bounds exception is thrown on this single record file, our code goes into a loop where it keeps on try to process the same record over & over again
-- We're setting ENABLE_BULK_LOAD=true. However, the various documented options are listed here: http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc32179.0707/html/jconnig/title.htm - We should do some testing to determine which one works best in our case
-- Take a look at: http://www.sybase.com/content/1026310/unicode_support_wp.pdf This discusses the various Java objects we can use to insert unichar data:
For JConnect 6.x: Unitext data is not supported with ENBALE_BULK_LOAD turned on:
For JConnect 6.x: Unitext data is not supported with ENBALE_BULK_LOAD turned on:
Issue #8801 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
No fixed build |
No time estimate |
5 issue links |
relates to #8788
Issue #8788ADS suspended when we try to import data for not supported data type in import |
is a duplicate of #8799
Issue #8799Failed to insert data when data is more then the specified length |
is a duplicate of #8757
Issue #8757Commit failed: Type '7' not implemented Error in ASE |
relates to #8799
Issue #8799Failed to insert data when data is more then the specified length |
relates to #8788
Issue #8788ADS suspended when we try to import data for not supported data type in import |
Failed for unichar data type in ADS 14,work fine in ADS 13
CREATE TABLE dbo.Test_unichar (
col1 unichar(10) NULL
)
GO