java.lang.NegativeArraySizeException

Hi,

I uploaded my datasets(format: ntriple, compressed: gzip, file size: about 550MB).
But uploading was faild, and error occured "java.lang.NegativeArraySizeException".

Why this error occured?
And waht can i do to solve this problem?

** command **
$ stardog data add --server-side http://localhost:xxxxxx/MYDB /PATH/TO/MYDATA/data.nt.gz

** stardog.log **
ERROR 2017-06-xx xx:xx:xx,193 [XNIO-1 task-53] com.stardog.http.server.undertow.ErrorHandling:writeError(179): Unexpected error on the server
com.complexible.stardog.db.DatabaseException: java.lang.NegativeArraySizeException
at com.complexible.stardog.db.DatabaseConnectionImpl.add(DatabaseConnectionImpl.java:693) ~[stardog-5.0-RC1.jar:?]
at com.complexible.stardog.db.DelegatingDatabaseConnection.add(DelegatingDatabaseConnection.java:213) ~[stardog-5.0-RC1.jar:?]
at com.complexible.stardog.db.DatabaseImpl$DBConnectionWrapper.add(DatabaseImpl.java:1355) ~[stardog-5.0-RC1.jar:?]
at com.complexible.stardog.db.DelegatingDatabaseConnection.add(DelegatingDatabaseConnection.java:213) ~[stardog-5.0-RC1.jar:?]
at com.complexible.stardog.StardogKernel$KernelDbConnection.add(StardogKernel.java:3169) ~[stardog-5.0-RC1.jar:?]
at com.complexible.stardog.db.DelegatingDatabaseConnection.add(DelegatingDatabaseConnection.java:213) ~[stardog-5.0-RC1.jar:?]
at com.complexible.stardog.StardogKernel$NotifyingDatabaseConnection.add(StardogKernel.java:3265) ~[stardog-5.0-RC1.jar:?]
at java.util.stream.Streams$StreamBuilderImpl.forEachRemaining(Streams.java:419) ~[?:1.8.0_131]
at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580) ~[?:1.8.0_131]
at com.complexible.stardog.protocols.http.server.TransactionService.add(TransactionService.java:170) ~[stardog-protocols-http-server-5.0-RC1.jar:?]
at com.stardog.http.server.undertow.jaxrs.ExtractRoutes.lambda$handleIt$91(ExtractRoutes.java:186) ~[stardog-protocols-http-server-5.0-RC1.jar:?]
at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120) ~[shiro-core-1.2.3.jar:1.2.3]
at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108) ~[shiro-core-1.2.3.jar:1.2.3]
at com.stardog.http.server.undertow.ErrorHandling.lambda$safeDispatch$46(ErrorHandling.java:70) ~[stardog-protocols-http-server-5.0-RC1.jar:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_131]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_131]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131]
Caused by: java.lang.NegativeArraySizeException
at com.complexible.stardog.dht.impl.PagedDiskHashTable.fillUpCache(PagedDiskHashTable.java:753) ~[stardog-5.0-RC1.jar:?]
at com.complexible.stardog.dht.dictionary.HashDictionary.fillUpCache(HashDictionary.java:811) ~[stardog-5.0-RC1.jar:?]
at com.complexible.stardog.index.dictionary.DelegatingMappingDictionary.fillUpCache(DelegatingMappingDictionary.java:107) ~[stardog-5.0-RC1.jar:?]
at com.complexible.stardog.index.IndexWriterDataMapImpl.update(IndexWriterDataMapImpl.java:105) ~[stardog-5.0-RC1.jar:?]
at com.complexible.stardog.index.IndexWriterDataMapImpl.add(IndexWriterDataMapImpl.java:70) ~[stardog-5.0-RC1.jar:?]
at com.complexible.stardog.index.IndexWriterImpl.add(IndexWriterImpl.java:145) ~[stardog-5.0-RC1.jar:?]
at com.complexible.stardog.index.impl.DelegatingIndexWriter.add(DelegatingIndexWriter.java:51) ~[stardog-5.0-RC1.jar:?]
at com.complexible.stardog.index.Indexes.add(Indexes.java:375) ~[stardog-5.0-RC1.jar:?]
at com.complexible.stardog.db.index.ConnectableIndexRWConnectionImpl$IndexResourceTransaction.add(ConnectableIndexRWConnectionImpl.java:636) ~[stardog-5.0-RC1.jar:?]
at com.complexible.stardog.db.index.ConnectableIndexRWConnectionImpl.add(ConnectableIndexRWConnectionImpl.java:400) ~[stardog-5.0-RC1.jar:?]
at com.complexible.stardog.db.DatabaseConnectionImpl.add(DatabaseConnectionImpl.java:681) ~[stardog-5.0-RC1.jar:?]
... 16 more

Regards.

Hi,

Since you’re loading onto localhost, what if you try the data add without the --server-side flag?

The stack trace suggests there was a problem with memory allocation. We fixed some issues regarding that in the 5.0-beta release so if you upgrade this problem might go away. Depending on how large data you are trying to add you may want to set the memory configuration option [1] to write_optimized or to bulk_load (latter option introduced in 5.0-beta).

Best,
Evren

[`1] Home | Stardog Documentation Latest

I see that you are already using the latest RC release so no need to upgrade. Changing the memory configuration would help but note that you need to restart the server for the change to take effect. We will make some improvements to prevent this error in the future.

Best,
Evren

stephen

I did without the --server-side flag, but same error occured ‘java.lang.NegativeArraySizeException’ .

Thanks for the advice !!

everen

As you know, I am using the latest RC release.
I doubled the memory setting, and I was able to load the data.

thanks a lot.
tkato

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.