Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.NegativeArraySizeException calling insert #1792

Open
bmbferreira opened this issue Oct 9, 2017 · 0 comments
Open

java.lang.NegativeArraySizeException calling insert #1792

bmbferreira opened this issue Oct 9, 2017 · 0 comments

Comments

@bmbferreira
Copy link

bmbferreira commented Oct 9, 2017

I'm getting a java.lang.NegativeArraySizeException in production while inserting an item on a table (calling the method com.github.takezoe.slick.blocking.BlockingJdbcProfile.BlockingAPI.IntoInsertActionComposer2#insert) and I don't have access to the input used to call the method. I tested with different inputs for the insert method and I can't replicate the error. Here's the stackTrace:
java.lang.NegativeArraySizeException: null at java.lang.AbstractStringBuilder.<init>(AbstractStringBuilder.java:68) at java.lang.StringBuilder.<init>(StringBuilder.java:101) at org.postgresql.core.v3.SimpleParameterList.toString(SimpleParameterList.java:217) at org.postgresql.core.v3.QueryExecutorImpl.sendBind(QueryExecutorImpl.java:1425) at org.postgresql.core.v3.QueryExecutorImpl.sendOneQuery(QueryExecutorImpl.java:1751) at org.postgresql.core.v3.QueryExecutorImpl.sendQuery(QueryExecutorImpl.java:1290) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:289) at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:428) at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:354) at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:169) at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:136) at scala.slick.driver.JdbcInsertInvokerComponent$BaseInsertInvoker$$anonfun$internalInsert$1.apply(JdbcInsertInvokerComponent.scala:183) at scala.slick.driver.JdbcInsertInvokerComponent$BaseInsertInvoker$$anonfun$internalInsert$1.apply(JdbcInsertInvokerComponent.scala:180) at scala.slick.jdbc.JdbcBackend$SessionDef$class.withPreparedInsertStatement(JdbcBackend.scala:198) at scala.slick.jdbc.JdbcBackend$BaseSession.withPreparedInsertStatement(JdbcBackend.scala:389) at scala.slick.driver.JdbcInsertInvokerComponent$ReturningInsertInvoker.preparedInsert(JdbcInsertInvokerComponent.scala:301) at scala.slick.driver.JdbcInsertInvokerComponent$BaseInsertInvoker.internalInsert(JdbcInsertInvokerComponent.scala:180) at scala.slick.driver.JdbcInsertInvokerComponent$BaseInsertInvoker.insert(JdbcInsertInvokerComponent.scala:175) at scala.slick.driver.JdbcInsertInvokerComponent$InsertInvokerDef$class.$plus$eq(JdbcInsertInvokerComponent.scala:70) at scala.slick.driver.JdbcInsertInvokerComponent$BaseInsertInvoker.$plus$eq(JdbcInsertInvokerComponent.scala:145) at codacy.database.filestoreDB.FileContentsTable$$anonfun$createOrDiscard$1$$anonfun$apply$4.apply(FileContents.scala:49) at codacy.database.filestoreDB.FileContentsTable$$anonfun$createOrDiscard$1$$anonfun$apply$4.apply(FileContents.scala:49) at scala.Option.getOrElse(Option.scala:121) at codacy.database.filestoreDB.FileContentsTable$$anonfun$createOrDiscard$1.apply(FileContents.scala:48) at codacy.database.filestoreDB.FileContentsTable$$anonfun$createOrDiscard$1.apply(FileContents.scala:48) at scala.slick.jdbc.JdbcBackend$BaseSession.withTransaction(JdbcBackend.scala:426) at scala.slick.backend.DatabaseComponent$DatabaseDef$$anonfun$withDynTransaction$1.apply(DatabaseComponent.scala:61) at scala.util.DynamicVariable.withValue(DynamicVariable.scala:58) at scala.slick.backend.DatabaseComponent$class.withDynamicSession(DatabaseComponent.scala:67) at scala.slick.jdbc.JdbcBackend$.withDynamicSession(JdbcBackend.scala:448) at scala.slick.backend.DatabaseComponent$DatabaseDef$$anonfun$withDynSession$1.apply(DatabaseComponent.scala:51) at scala.slick.backend.DatabaseComponent$DatabaseDef$$anonfun$withDynSession$1.apply(DatabaseComponent.scala:51) at scala.slick.backend.DatabaseComponent$DatabaseDef$class.withSession(DatabaseComponent.scala:34) at scala.slick.jdbc.JdbcBackend$DatabaseFactoryDef$$anon$3.withSession(JdbcBackend.scala:46) at scala.slick.backend.DatabaseComponent$DatabaseDef$class.withDynSession(DatabaseComponent.scala:51) at scala.slick.jdbc.JdbcBackend$DatabaseFactoryDef$$anon$3.withDynSession(JdbcBackend.scala:46) at scala.slick.backend.DatabaseComponent$DatabaseDef$class.withDynTransaction(DatabaseComponent.scala:61) at scala.slick.jdbc.JdbcBackend$DatabaseFactoryDef$$anon$3.withDynTransaction(JdbcBackend.scala:46) at codacy.database.utils.BasicDB$$anonfun$transaction$1.apply(BasicDB.scala:43) at scala.util.Try$.apply(Try.scala:192) at codacy.database.utils.BasicDB$class.withRetry(BasicDB.scala:50) at codacy.database.utils.BasicDB$class.transaction(BasicDB.scala:42) at codacy.database.filestoreDB.base.FilestoreDB.transaction(FilestoreDB.scala:11) at codacy.database.filestoreDB.FileContentsTable.createOrDiscard(FileContents.scala:47) at fileStore.FileRetriever$$anonfun$fileStore$FileRetriever$$storeFiles$1$$anonfun$apply$4$$anonfun$10.apply(FileRetriever.scala:94) at fileStore.FileRetriever$$anonfun$fileStore$FileRetriever$$storeFiles$1$$anonfun$apply$4$$anonfun$10.apply(FileRetriever.scala:91) at scala.Option.getOrElse(Option.scala:121) at fileStore.FileRetriever$$anonfun$fileStore$FileRetriever$$storeFiles$1$$anonfun$apply$4.apply(FileRetriever.scala:91) at fileStore.FileRetriever$$anonfun$fileStore$FileRetriever$$storeFiles$1$$anonfun$apply$4.apply(FileRetriever.scala:89) at scala.Option.map(Option.scala:146) at fileStore.FileRetriever$$anonfun$fileStore$FileRetriever$$storeFiles$1.apply(FileRetriever.scala:89) at fileStore.FileRetriever$$anonfun$fileStore$FileRetriever$$storeFiles$1.apply(FileRetriever.scala:88) at scala.collection.immutable.List.flatMap(List.scala:338) at fileStore.FileRetriever.fileStore$FileRetriever$$storeFiles(FileRetriever.scala:88) at fileStore.FileRetriever$$anonfun$6.apply(FileRetriever.scala:66) at fileStore.FileRetriever$$anonfun$6.apply(FileRetriever.scala:64) at scala.collection.Iterator$$anon$12.nextCur(Iterator.scala:435) at scala.collection.Iterator$$anon$12.hasNext(Iterator.scala:441) at scala.collection.Iterator$class.foreach(Iterator.scala:891) at scala.collection.AbstractIterator.foreach(Iterator.scala:1334) at scala.collection.generic.Growable$class.$plus$plus$eq(Growable.scala:59) at scala.collection.mutable.ListBuffer.$plus$plus$eq(ListBuffer.scala:183) at scala.collection.mutable.ListBuffer.$plus$plus$eq(ListBuffer.scala:45) at scala.collection.TraversableOnce$class.to(TraversableOnce.scala:310) at scala.collection.AbstractIterator.to(Iterator.scala:1334) at scala.collection.TraversableOnce$class.toList(TraversableOnce.scala:294) at scala.collection.AbstractIterator.toList(Iterator.scala:1334) at fileStore.FileRetriever.getFilesIdentification(FileRetriever.scala:74) at pluginsEngineComponent.services.FileStoreService.getFilesIdentification(FileStoreService.scala:17) at rules.components.AnalysisHelper$.getFileIdentification(AnalysisHelper.scala:92) at rules.project.filerules.FileRules$$anonfun$44.apply(FileRules.scala:266) at rules.project.filerules.FileRules$$anonfun$44.apply(FileRules.scala:265) at codacy.foundation.utils.SystemInstruments$.time(SystemInstruments.scala:7) at rules.project.filerules.FileRules.rules$project$filerules$FileRules$$createFiles(FileRules.scala:265) at rules.project.filerules.FileRules$$anonfun$1$$anonfun$apply$mcZ$sp$1.apply(FileRules.scala:91) at rules.project.filerules.FileRules$$anonfun$1$$anonfun$apply$mcZ$sp$1.apply(FileRules.scala:90) at codacy.foundation.utils.SystemInstruments$.time(SystemInstruments.scala:7) at rules.project.filerules.FileRules$$anonfun$1.apply$mcZ$sp(FileRules.scala:90) at rules.project.filerules.FileRules$$anonfun$1.apply(FileRules.scala:88) at rules.project.filerules.FileRules$$anonfun$1.apply(FileRules.scala:88) at scala.util.Try$.apply(Try.scala:192) at rules.project.filerules.FileRules.createCommitFiles(FileRules.scala:88) at rules.components.analysis.TaskSupplier$$anonfun$6.apply(TaskSupplier.scala:61) at rules.components.analysis.TaskSupplier$$anonfun$6.apply(TaskSupplier.scala:54) at codacy.foundation.utils.SystemInstruments$.time(SystemInstruments.scala:7) at rules.components.analysis.TaskSupplier.prepareCommitToRun(TaskSupplier.scala:54) at theOracle.rules.TaskCreator$$anonfun$1$$anonfun$apply$mcZ$sp$5$$anonfun$apply$1.apply(TaskCreator.scala:34) at theOracle.rules.TaskCreator$$anonfun$1$$anonfun$apply$mcZ$sp$5$$anonfun$apply$1.apply(TaskCreator.scala:33) at scala.Option.map(Option.scala:146) at theOracle.rules.TaskCreator$$anonfun$1$$anonfun$apply$mcZ$sp$5.apply(TaskCreator.scala:33) at theOracle.rules.TaskCreator$$anonfun$1$$anonfun$apply$mcZ$sp$5.apply(TaskCreator.scala:32) at scala.Option.flatMap(Option.scala:171) at theOracle.rules.TaskCreator$$anonfun$1.apply$mcZ$sp(TaskCreator.scala:32) at theOracle.rules.TaskCreator$$anonfun$1.apply(TaskCreator.scala:22) at theOracle.rules.TaskCreator$$anonfun$1.apply(TaskCreator.scala:22) at scala.util.Try$.apply(Try.scala:192) at theOracle.rules.TaskCreator.run(TaskCreator.scala:22) at actors.component.ITaskRunnerSimple$class.run(ITaskRunner.scala:16) at theOracle.rules.TaskCreator.run(TaskCreator.scala:17) at theOracle.TheOracle$$anonfun$run$1.apply(TheOracle.scala:19) at theOracle.TheOracle$$anonfun$run$1.apply(TheOracle.scala:15) at scala.Option.map(Option.scala:146) at theOracle.TheOracle.run(TheOracle.scala:15) at rules.components.analysis.AnalysisMastermind$$anonfun$4.apply(AnalysisMastermind.scala:65) at rules.components.analysis.AnalysisMastermind$$anonfun$4.apply(AnalysisMastermind.scala:63) at scala.util.Try$.apply(Try.scala:192) at rules.components.analysis.AnalysisMastermind.runTask(AnalysisMastermind.scala:62) at rules.components.analysis.TaskWorker$$anonfun$rules$components$analysis$TaskWorker$$runTask$1$$anonfun$apply$9$$anonfun$apply$10$$anonfun$2.apply$mcV$sp(TaskWorker.scala:125) at rules.components.analysis.TaskWorker$$anonfun$rules$components$analysis$TaskWorker$$runTask$1$$anonfun$apply$9$$anonfun$apply$10$$anonfun$2.apply(TaskWorker.scala:125) at rules.components.analysis.TaskWorker$$anonfun$rules$components$analysis$TaskWorker$$runTask$1$$anonfun$apply$9$$anonfun$apply$10$$anonfun$2.apply(TaskWorker.scala:125) at scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24) at scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

@hvesalai hvesalai added this to the Next fix release milestone Feb 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants