Upgrading Issues

View: New views
8 Messages — Rating Filter:   Alert me  

Upgrading Issues

by Allgeyer, Jessica :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Recently we have upgraded our Derby DB from 10.3.1.4  to 10.5.3.0. With the latest version,  api CALL SYSCS_UTIL.SYSCS_IMPORT_TABLE is throwing the error 'java.lang.NullPointerException' when a file is empty. After investigation, any version above our previous version of 10.3.1.4 causes this error. Can you provide us with a solution or adjustments we need to make on our end? Please let me know if you need more information provided.

Thanks
Jessica Allgeyer
(513) 763 - 8523






********************************************************************** The content of this e-mail message and any attachments are confidential and may be legally privileged, intended solely for the addressee. If you are not the intended recipient, be advised that any use, dissemination, distribution, or copying of this e-mail is strictly prohibited. If you receive this message in error, please notify the sender immediately by reply email and destroy the message and its attachments. **********************************************************************


Re: Upgrading Issues

by Rick Hillegas-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Jessica,

Can you provide a reproducible script for this problem? The following
naive attempt succeeds without raising a NPE.

connect 'jdbc:derby:memory:dummy;create=true';
create table t( a int );
CALL SYSCS_UTIL.SYSCS_IMPORT_TABLE(null, 'T', './z.out', ';', '%', null,0);
select * from t;


Thanks,
-Rick

Allgeyer, Jessica wrote:

> Recently we have upgraded our Derby DB from 10.3.1.4  to 10.5.3.0. With the latest version,  api CALL SYSCS_UTIL.SYSCS_IMPORT_TABLE is throwing the error 'java.lang.NullPointerException' when a file is empty. After investigation, any version above our previous version of 10.3.1.4 causes this error. Can you provide us with a solution or adjustments we need to make on our end? Please let me know if you need more information provided.
>
> Thanks
> Jessica Allgeyer
> (513) 763 - 8523
>
>
>
>
>
>
> ********************************************************************** The content of this e-mail message and any attachments are confidential and may be legally privileged, intended solely for the addressee. If you are not the intended recipient, be advised that any use, dissemination, distribution, or copying of this e-mail is strictly prohibited. If you receive this message in error, please notify the sender immediately by reply email and destroy the message and its attachments. **********************************************************************
>
>  


Re: Upgrading Issues

by Kristian Waagan-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Allgeyer, Jessica wrote:
> Recently we have upgraded our Derby DB from 10.3.1.4  to 10.5.3.0. With the latest version,  api CALL SYSCS_UTIL.SYSCS_IMPORT_TABLE is throwing the error 'java.lang.NullPointerException' when a file is empty. After investigation, any version above our previous version of 10.3.1.4 causes this error. Can you provide us with a solution or adjustments we need to make on our end? Please let me know if you need more information provided.
>
>  
Hello Jessica,

I'm not able to reproduce with neither 10.5 nor the development trunk,
so more information would be useful.
(Just noticed Rick reporting the same.)

I simply tried importing a file of size zero bytes, and that worked
(i.e. nothing happened).
Some suggestions:
 - Can you provide the stack trace from the NullPointerException?
  (remove traces you don't want to reveal if necessary)
 - Is the file zero bytes, or is there at least one character/byte
(visible or non-visible) in there?
 - Can you specify the full import call?
 - What's your platform? Do you already now that the bug occurs at any
platform?

The best thing you can do is to provide a small repro script :)


Regards,
--
Kristian

> Thanks
> Jessica Allgeyer
> (513) 763 - 8523
>
>
>
>
>
>
> ********************************************************************** The content of this e-mail message and any attachments are confidential and may be legally privileged, intended solely for the addressee. If you are not the intended recipient, be advised that any use, dissemination, distribution, or copying of this e-mail is strictly prohibited. If you receive this message in error, please notify the sender immediately by reply email and destroy the message and its attachments. **********************************************************************
>
>  


RE: Upgrading Issues

by Allgeyer, Jessica :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Kristian/Rick

I've included 2 attachments. One is the full stack trace for the NullPointerException. The other is the file the call is trying to use. The file is zero bytes and does not contain any characters. Our platform is Windows and we are using Java to run the call.  Below is the full import call.

CALL SYSCS_UTIL.SYSCS_IMPORT_TABLE ('SA', 'CHACRGE', 'C:\bea\projects\claims-dev\unzippedclaims\CHACRGE.rcsv','|','``',null,1)


Thanks
Jessica Allgeyer
(513) 763 - 8523



-----Original Message-----
From: Kristian.Waagan@... [mailto:Kristian.Waagan@...]
Sent: Wednesday, November 04, 2009 9:14 AM
To: Derby Discussion
Cc: Combs, Jeremy; McGrath, Phil; Ritchie, Erin; Lewis, Chris; Allgeyer, Jessica
Subject: Re: Upgrading Issues

Allgeyer, Jessica wrote:
> Recently we have upgraded our Derby DB from 10.3.1.4  to 10.5.3.0. With the latest version,  api CALL SYSCS_UTIL.SYSCS_IMPORT_TABLE is throwing the error 'java.lang.NullPointerException' when a file is empty. After investigation, any version above our previous version of 10.3.1.4 causes this error. Can you provide us with a solution or adjustments we need to make on our end? Please let me know if you need more information provided.
>
>  
Hello Jessica,

I'm not able to reproduce with neither 10.5 nor the development trunk, so more information would be useful.
(Just noticed Rick reporting the same.)

I simply tried importing a file of size zero bytes, and that worked (i.e. nothing happened).
Some suggestions:
 - Can you provide the stack trace from the NullPointerException?
  (remove traces you don't want to reveal if necessary)
 - Is the file zero bytes, or is there at least one character/byte (visible or non-visible) in there?
 - Can you specify the full import call?
 - What's your platform? Do you already now that the bug occurs at any platform?

The best thing you can do is to provide a small repro script :)


Regards,
--
Kristian

> Thanks
> Jessica Allgeyer
> (513) 763 - 8523
>
>
>
>
>
>
> **********************************************************************
> The content of this e-mail message and any attachments are
> confidential and may be legally privileged, intended solely for the
> addressee. If you are not the intended recipient, be advised that any
> use, dissemination, distribution, or copying of this e-mail is
> strictly prohibited. If you receive this message in error, please
> notify the sender immediately by reply email and destroy the message
> and its attachments.
> **********************************************************************
>
>  



********************************************************************** The content of this e-mail message and any attachments are confidential and may be legally privileged, intended solely for the addressee. If you are not the intended recipient, be advised that any use, dissemination, distribution, or copying of this e-mail is strictly prohibited. If you receive this message in error, please notify the sender immediately by reply email and destroy the message and its attachments. **********************************************************************


There was a data transfer problem with the database.

Click Details to obtain more information that can be provided to Tech Support.

  To copy this entire message, highlight any line and right click for options.
 
  SQL State Code: XIE0R
  Error Message: Import error on line 1 of file C:\bea\projects\claims-dev\unzippedclaims\CHACRGE.rcsv: Java exception: ': java.lang.NullPointerException'.
 
  Stack Trace:
  java.sql.SQLException: Import error on line 1 of file C:\bea\projects\claims-dev\unzippedclaims\CHACRGE.rcsv: Java exception: ': java.lang.NullPointerException'.
     at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
     at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
     at org.apache.derby.impl.jdbc.Util.seeNextException(Unknown Source)
     at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
     at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
     at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
     at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
     at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
     at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown Source)
     at org.apache.derby.impl.jdbc.EmbedCallableStatement.executeStatement(Unknown Source)
     at org.apache.derby.impl.jdbc.EmbedPreparedStatement.execute(Unknown Source)
     at com.greatag.claims.standalone.download.DerbyDataLoader.importData(DerbyDataLoader.java:65)
     at com.greatag.claims.standalone.download.DerbyDataLoader.replaceData(DerbyDataLoader.java:49)
     at com.greatag.claims.standalone.download.DerbyDataLoader.process(DerbyDataLoader.java:80)
     at com.greatag.claims.standalone.download.ClaimsDownloadDataInstaller.processDownloadedFile(ClaimsDownloadDataInstaller.java:116)
     at com.greatag.claims.standalone.download.ClaimsDownloadDataInstaller.storeData(ClaimsDownloadDataInstaller.java:77)
     at com.greatag.claims.standalone.download.ClaimsDownloadProcessor.performDownload(ClaimsDownloadProcessor.java:52)
     at com.greatag.claims.standalone.ui.DownloadClaimsHandler.run(DownloadClaimsHandler.java:105)
  Caused by: java.sql.SQLException: Java exception: ': java.lang.NullPointerException'.
     at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
     at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
     at org.apache.derby.impl.jdbc.Util.javaException(Unknown Source)
     at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
     at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
     at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
     at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
     at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
     at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown Source)
     at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeUpdate(Unknown Source)
     at org.apache.derby.impl.load.Import.performImport(Unknown Source)
     at org.apache.derby.impl.load.Import.importTable(Unknown Source)
     at org.apache.derby.catalog.SystemProcedures.SYSCS_IMPORT_TABLE(Unknown Source)
     at org.apache.derby.exe.ac34cc0261x0124xbae6x7f2cx00000bf080be3f.g0(Unknown Source)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:324)
     at org.apache.derby.impl.services.reflect.ReflectMethod.invoke(Unknown Source)
     at org.apache.derby.impl.sql.execute.CallStatementResultSet.open(Unknown Source)
     at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
     at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
     ... 11 more
  Caused by: java.lang.NullPointerException
     at org.apache.derby.impl.sql.execute.InsertResultSet.emptyIndexes(Unknown Source)
     at org.apache.derby.impl.sql.execute.InsertResultSet.updateAllIndexes(Unknown Source)
     at org.apache.derby.impl.sql.execute.InsertResultSet.bulkInsertCore(Unknown Source)
     at org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown Source)
     at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
     at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
     ... 26 more

CHACRGE.rcsv (4 bytes) Download Attachment

Re: Upgrading Issues

by Kristian Waagan-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Allgeyer, Jessica wrote:
> Kristian/Rick
>
> I've included 2 attachments. One is the full stack trace for the NullPointerException. The other is the file the call is trying to use. The file is zero bytes and does not contain any characters. Our platform is Windows and we are using Java to run the call.  Below is the full import call.
>
> CALL SYSCS_UTIL.SYSCS_IMPORT_TABLE ('SA', 'CHACRGE', 'C:\bea\projects\claims-dev\unzippedclaims\CHACRGE.rcsv','|','``',null,1)
>  
A quick (and not that thorough) debugging session seems to have led me
to the problem, which is related to the addition of collation support.

The NPE happens here (from line 2348) in InsertResultSet.emptyIndexes:
            newIndexCongloms[index] =
                tc.createAndLoadConglomerate(
                    "BTREE",
                    indexRows[index].getRowArray(),
                    null, //default column sort order
                    collation[index],
                    properties,
                    TransactionController.IS_DEFAULT,
                    rowSources[index],
                    (long[]) null);

The problem is that the variable 'collation' hasn't been initialized and
is null.
Adding "int[][]             collation = new int[numIndexes][];" to the
top of the method makes the repro pass, but I haven't studied the code
or run the regression tests.

Not sure there is much you can do about this, except for not using
replacement in the import or simply avoiding import of empty files.
Maybe detecting empty files and executing a "delete from TABLE" would do?
(until the bug has been fixed)


Regards,
--
Kristian

> Thanks
> Jessica Allgeyer
> (513) 763 - 8523
>
>
>
> -----Original Message-----
> From: Kristian.Waagan@... [mailto:Kristian.Waagan@...]
> Sent: Wednesday, November 04, 2009 9:14 AM
> To: Derby Discussion
> Cc: Combs, Jeremy; McGrath, Phil; Ritchie, Erin; Lewis, Chris; Allgeyer, Jessica
> Subject: Re: Upgrading Issues
>
> Allgeyer, Jessica wrote:
>  
>> Recently we have upgraded our Derby DB from 10.3.1.4  to 10.5.3.0. With the latest version,  api CALL SYSCS_UTIL.SYSCS_IMPORT_TABLE is throwing the error 'java.lang.NullPointerException' when a file is empty. After investigation, any version above our previous version of 10.3.1.4 causes this error. Can you provide us with a solution or adjustments we need to make on our end? Please let me know if you need more information provided.
>>
>>  
>>    
> Hello Jessica,
>
> I'm not able to reproduce with neither 10.5 nor the development trunk, so more information would be useful.
> (Just noticed Rick reporting the same.)
>
> I simply tried importing a file of size zero bytes, and that worked (i.e. nothing happened).
> Some suggestions:
>  - Can you provide the stack trace from the NullPointerException?
>   (remove traces you don't want to reveal if necessary)
>  - Is the file zero bytes, or is there at least one character/byte (visible or non-visible) in there?
>  - Can you specify the full import call?
>  - What's your platform? Do you already now that the bug occurs at any platform?
>
> The best thing you can do is to provide a small repro script :)
>
>
> Regards,
> --
> Kristian
>
>  
>> Thanks
>> Jessica Allgeyer
>> (513) 763 - 8523
>>
>>
>>
>>
>>
>>
>> **********************************************************************
>> The content of this e-mail message and any attachments are
>> confidential and may be legally privileged, intended solely for the
>> addressee. If you are not the intended recipient, be advised that any
>> use, dissemination, distribution, or copying of this e-mail is
>> strictly prohibited. If you receive this message in error, please
>> notify the sender immediately by reply email and destroy the message
>> and its attachments.
>> **********************************************************************
>>
>>  
>>    
>
>
>
>
> ********************************************************************** The content of this e-mail message and any attachments are confidential and may be legally privileged, intended solely for the addressee. If you are not the intended recipient, be advised that any use, dissemination, distribution, or copying of this e-mail is strictly prohibited. If you receive this message in error, please notify the sender immediately by reply email and destroy the message and its attachments. **********************************************************************
>  


RE: Upgrading Issues

by Allgeyer, Jessica :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Kristian

Because of performance issues, we are not able to simply skip the replace call and use a 'delete from table' execute. We have tried that before and the delays are too significant.

Do you know if this issue is being addressed now and have a possible ETA?


Thanks
Jessica Allgeyer
(513) 763 - 8523

Any fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. -albert einstein



-----Original Message-----
From: Kristian.Waagan@... [mailto:Kristian.Waagan@...]
Sent: Wednesday, November 04, 2009 12:27 PM
To: Derby Discussion
Cc: Richard.Hillegas@...; Combs, Jeremy; McGrath, Phil; Ritchie, Erin; Lewis, Chris; Allgeyer, Jessica
Subject: Re: Upgrading Issues

Allgeyer, Jessica wrote:
> Kristian/Rick
>
> I've included 2 attachments. One is the full stack trace for the NullPointerException. The other is the file the call is trying to use. The file is zero bytes and does not contain any characters. Our platform is Windows and we are using Java to run the call.  Below is the full import call.
>
> CALL SYSCS_UTIL.SYSCS_IMPORT_TABLE ('SA', 'CHACRGE',
> 'C:\bea\projects\claims-dev\unzippedclaims\CHACRGE.rcsv','|','``',null
> ,1)
>  
A quick (and not that thorough) debugging session seems to have led me to the problem, which is related to the addition of collation support.

The NPE happens here (from line 2348) in InsertResultSet.emptyIndexes:
            newIndexCongloms[index] =
                tc.createAndLoadConglomerate(
                    "BTREE",
                    indexRows[index].getRowArray(),
                    null, //default column sort order
                    collation[index],
                    properties,
                    TransactionController.IS_DEFAULT,
                    rowSources[index],
                    (long[]) null);

The problem is that the variable 'collation' hasn't been initialized and is null.
Adding "int[][]             collation = new int[numIndexes][];" to the
top of the method makes the repro pass, but I haven't studied the code or run the regression tests.

Not sure there is much you can do about this, except for not using replacement in the import or simply avoiding import of empty files.
Maybe detecting empty files and executing a "delete from TABLE" would do?
(until the bug has been fixed)


Regards,
--
Kristian

> Thanks
> Jessica Allgeyer
> (513) 763 - 8523
>
>
>
> -----Original Message-----
> From: Kristian.Waagan@... [mailto:Kristian.Waagan@...]
> Sent: Wednesday, November 04, 2009 9:14 AM
> To: Derby Discussion
> Cc: Combs, Jeremy; McGrath, Phil; Ritchie, Erin; Lewis, Chris; Allgeyer, Jessica
> Subject: Re: Upgrading Issues
>
> Allgeyer, Jessica wrote:
>  
>> Recently we have upgraded our Derby DB from 10.3.1.4  to 10.5.3.0. With the latest version,  api CALL SYSCS_UTIL.SYSCS_IMPORT_TABLE is throwing the error 'java.lang.NullPointerException' when a file is empty. After investigation, any version above our previous version of 10.3.1.4 causes this error. Can you provide us with a solution or adjustments we need to make on our end? Please let me know if you need more information provided.
>>
>>  
>>    
> Hello Jessica,
>
> I'm not able to reproduce with neither 10.5 nor the development trunk, so more information would be useful.
> (Just noticed Rick reporting the same.)
>
> I simply tried importing a file of size zero bytes, and that worked (i.e. nothing happened).
> Some suggestions:
>  - Can you provide the stack trace from the NullPointerException?
>   (remove traces you don't want to reveal if necessary)
>  - Is the file zero bytes, or is there at least one character/byte (visible or non-visible) in there?
>  - Can you specify the full import call?
>  - What's your platform? Do you already now that the bug occurs at any platform?
>
> The best thing you can do is to provide a small repro script :)
>
>
> Regards,
> --
> Kristian
>
>  
>> Thanks
>> Jessica Allgeyer
>> (513) 763 - 8523
>>
>>
>>
>>
>>
>>
>> **********************************************************************
>> The content of this e-mail message and any attachments are
>> confidential and may be legally privileged, intended solely for the
>> addressee. If you are not the intended recipient, be advised that any
>> use, dissemination, distribution, or copying of this e-mail is
>> strictly prohibited. If you receive this message in error, please
>> notify the sender immediately by reply email and destroy the message
>> and its attachments.
>> **********************************************************************
>>
>>  
>>    
>
>
>
>
> ********************************************************************** The content of this e-mail message and any attachments are confidential and may be legally privileged, intended solely for the addressee. If you are not the intended recipient, be advised that any use, dissemination, distribution, or copying of this e-mail is strictly prohibited. If you receive this message in error, please notify the sender immediately by reply email and destroy the message and its attachments. **********************************************************************
>  



********************************************************************** The content of this e-mail message and any attachments are confidential and may be legally privileged, intended solely for the addressee. If you are not the intended recipient, be advised that any use, dissemination, distribution, or copying of this e-mail is strictly prohibited. If you receive this message in error, please notify the sender immediately by reply email and destroy the message and its attachments. **********************************************************************


Re: Upgrading Issues

by Kristian Waagan-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Allgeyer, Jessica wrote:
> Kristian
>
> Because of performance issues, we are not able to simply skip the replace call and use a 'delete from table' execute. We have tried that before and the delays are too significant.
>  
I see.
What about using a minimal dummy file for import, then deleting the
single row after the import?
(I know, awkward, and I don't know your performance requirements)

In any case, I logged the bug as DERBY-4435 [1].

> Do you know if this issue is being addressed now and have a possible ETA?
>  

I'm not aware of anyone looking at the issue at the moment. Watch the
Jira issue for updates.
Note that there are no planned 10.5 maintenance releases at the moment.
You may want to consider rolling your own build from the 10.5 branch
(after the bug has been addressed).
The plans for the next feature release can be found on the wiki [2].


Regards,
--
Kristian

[1] https://issues.apache.org/jira/browse/DERBY-4435
[2] http://wiki.apache.org/db-derby/DerbyTenSixOneRelease

>
> Thanks
> Jessica Allgeyer
> (513) 763 - 8523
>
> Any fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. -albert einstein
>
>
>
> -----Original Message-----
> From: Kristian.Waagan@... [mailto:Kristian.Waagan@...]
> Sent: Wednesday, November 04, 2009 12:27 PM
> To: Derby Discussion
> Cc: Richard.Hillegas@...; Combs, Jeremy; McGrath, Phil; Ritchie, Erin; Lewis, Chris; Allgeyer, Jessica
> Subject: Re: Upgrading Issues
>
> Allgeyer, Jessica wrote:
>  
>> Kristian/Rick
>>
>> I've included 2 attachments. One is the full stack trace for the NullPointerException. The other is the file the call is trying to use. The file is zero bytes and does not contain any characters. Our platform is Windows and we are using Java to run the call.  Below is the full import call.
>>
>> CALL SYSCS_UTIL.SYSCS_IMPORT_TABLE ('SA', 'CHACRGE',
>> 'C:\bea\projects\claims-dev\unzippedclaims\CHACRGE.rcsv','|','``',null
>> ,1)
>>  
>>    
> A quick (and not that thorough) debugging session seems to have led me to the problem, which is related to the addition of collation support.
>
> The NPE happens here (from line 2348) in InsertResultSet.emptyIndexes:
>             newIndexCongloms[index] =
>                 tc.createAndLoadConglomerate(
>                     "BTREE",
>                     indexRows[index].getRowArray(),
>                     null, //default column sort order
>                     collation[index],
>                     properties,
>                     TransactionController.IS_DEFAULT,
>                     rowSources[index],
>                     (long[]) null);
>
> The problem is that the variable 'collation' hasn't been initialized and is null.
> Adding "int[][]             collation = new int[numIndexes][];" to the
> top of the method makes the repro pass, but I haven't studied the code or run the regression tests.
>
> Not sure there is much you can do about this, except for not using replacement in the import or simply avoiding import of empty files.
> Maybe detecting empty files and executing a "delete from TABLE" would do?
> (until the bug has been fixed)
>
>
> Regards,
>  


RE: Upgrading Issues

by Allgeyer, Jessica :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Kristian

If we decide to upgrade we'll try the Dummy approach. We'll keep an eye out for patches and upgrades related to this issue

Thanks again for your help.
 


Thanks
Jessica Allgeyer
(513) 763 - 8523

Any fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. -albert einstein



-----Original Message-----
From: Kristian.Waagan@... [mailto:Kristian.Waagan@...]
Sent: Wednesday, November 04, 2009 12:27 PM
To: Derby Discussion
Cc: Richard.Hillegas@...; Combs, Jeremy; McGrath, Phil; Ritchie, Erin; Lewis, Chris; Allgeyer, Jessica
Subject: Re: Upgrading Issues

Allgeyer, Jessica wrote:
> Kristian/Rick
>
> I've included 2 attachments. One is the full stack trace for the NullPointerException. The other is the file the call is trying to use. The file is zero bytes and does not contain any characters. Our platform is Windows and we are using Java to run the call.  Below is the full import call.
>
> CALL SYSCS_UTIL.SYSCS_IMPORT_TABLE ('SA', 'CHACRGE',
> 'C:\bea\projects\claims-dev\unzippedclaims\CHACRGE.rcsv','|','``',null
> ,1)
>  
A quick (and not that thorough) debugging session seems to have led me to the problem, which is related to the addition of collation support.

The NPE happens here (from line 2348) in InsertResultSet.emptyIndexes:
            newIndexCongloms[index] =
                tc.createAndLoadConglomerate(
                    "BTREE",
                    indexRows[index].getRowArray(),
                    null, //default column sort order
                    collation[index],
                    properties,
                    TransactionController.IS_DEFAULT,
                    rowSources[index],
                    (long[]) null);

The problem is that the variable 'collation' hasn't been initialized and is null.
Adding "int[][]             collation = new int[numIndexes][];" to the
top of the method makes the repro pass, but I haven't studied the code or run the regression tests.

Not sure there is much you can do about this, except for not using replacement in the import or simply avoiding import of empty files.
Maybe detecting empty files and executing a "delete from TABLE" would do?
(until the bug has been fixed)


Regards,
--
Kristian

> Thanks
> Jessica Allgeyer
> (513) 763 - 8523
>
>
>
> -----Original Message-----
> From: Kristian.Waagan@... [mailto:Kristian.Waagan@...]
> Sent: Wednesday, November 04, 2009 9:14 AM
> To: Derby Discussion
> Cc: Combs, Jeremy; McGrath, Phil; Ritchie, Erin; Lewis, Chris; Allgeyer, Jessica
> Subject: Re: Upgrading Issues
>
> Allgeyer, Jessica wrote:
>  
>> Recently we have upgraded our Derby DB from 10.3.1.4  to 10.5.3.0. With the latest version,  api CALL SYSCS_UTIL.SYSCS_IMPORT_TABLE is throwing the error 'java.lang.NullPointerException' when a file is empty. After investigation, any version above our previous version of 10.3.1.4 causes this error. Can you provide us with a solution or adjustments we need to make on our end? Please let me know if you need more information provided.
>>
>>  
>>    
> Hello Jessica,
>
> I'm not able to reproduce with neither 10.5 nor the development trunk, so more information would be useful.
> (Just noticed Rick reporting the same.)
>
> I simply tried importing a file of size zero bytes, and that worked (i.e. nothing happened).
> Some suggestions:
>  - Can you provide the stack trace from the NullPointerException?
>   (remove traces you don't want to reveal if necessary)
>  - Is the file zero bytes, or is there at least one character/byte (visible or non-visible) in there?
>  - Can you specify the full import call?
>  - What's your platform? Do you already now that the bug occurs at any platform?
>
> The best thing you can do is to provide a small repro script :)
>
>
> Regards,
> --
> Kristian
>
>  
>> Thanks
>> Jessica Allgeyer
>> (513) 763 - 8523
>>
>>
>>
>>
>>
>>
>> **********************************************************************
>> The content of this e-mail message and any attachments are
>> confidential and may be legally privileged, intended solely for the
>> addressee. If you are not the intended recipient, be advised that any
>> use, dissemination, distribution, or copying of this e-mail is
>> strictly prohibited. If you receive this message in error, please
>> notify the sender immediately by reply email and destroy the message
>> and its attachments.
>> **********************************************************************
>>
>>  
>>    
>
>
>
>
> ********************************************************************** The content of this e-mail message and any attachments are confidential and may be legally privileged, intended solely for the addressee. If you are not the intended recipient, be advised that any use, dissemination, distribution, or copying of this e-mail is strictly prohibited. If you receive this message in error, please notify the sender immediately by reply email and destroy the message and its attachments. **********************************************************************
>  



********************************************************************** The content of this e-mail message and any attachments are confidential and may be legally privileged, intended solely for the addressee. If you are not the intended recipient, be advised that any use, dissemination, distribution, or copying of this e-mail is strictly prohibited. If you receive this message in error, please notify the sender immediately by reply email and destroy the message and its attachments. **********************************************************************