[Amazon](500310) Invalid operation error while reading the result set next record - amazon-redshift

We are fetching the data from redshift db using JDBC way in java.
The query used for getting the data from tables is
select * from table_name limit 200;
Below are the errors occurred for different tables.
I am able to see the data in resultset .
But while getting next record of particular row it throwing the below errors. Could you please help us to understand the error and resolution for it.
Error 1:
`https://forums.aws.amazon.com/(500310) Invalid operation: Invalid input syntax for type numeric
Details:
error: Invalid input syntax for type numeric
code: 8001
context: value: ""
query: 88634410
location: cg_util.cpp:604
process: query19_773_88634410 https://forums.aws.amazon.com/
-----------------------------------------------;
at com.amazon.redshift.client.messages.inbound.ErrorResponse.toErrorException(Unknown Source)
at com.amazon.redshift.client.PGMessagingContext.handleErrorResponse(Unknown Source)
at com.amazon.redshift.client.PGMessagingContext.handleMessage(Unknown Source)
at com.amazon.jdbc.communications.InboundMessagesPipeline.getNextMessageOfClass(Unknown Source)
at com.amazon.redshift.dataengine.PGResultSet.hasMoreRows(Unknown Source)
at com.amazon.jdbc.common.SForwardResultSet.updateCursorPosition(Unknown Source)`
Error 2: For other table
`https://forums.aws.amazon.com/(500310) Invalid operation: Divide by zero;
at com.amazon.redshift.client.messages.inbound.ErrorResponse.toErrorException(Unknown Source)
at com.amazon.redshift.client.PGMessagingContext.handleErrorResponse(Unknown Source)
at com.amazon.redshift.client.PGMessagingContext.handleMessage(Unknown Source)
at com.amazon.jdbc.communications.InboundMessagesPipeline.getNextMessageOfClass(Unknown Source)
at com.amazon.redshift.dataengine.PGResultSet.hasMoreRows(Unknown Source)
at com.amazon.jdbc.common.SForwardResultSet.updateCursorPosition(Unknown Source)
at com.amazon.jdbc.common.SForwardResultSet.next(Unknown Source)`
Error 3:
`java.sql.SQLException: https://forums.aws.amazon.com/(500310) Invalid operation: operator does not exist: text ||;
at com.amazon.redshift.client.messages.inbound.ErrorResponse.toErrorException(Unknown Source)
at com.amazon.redshift.client.PGMessagingContext.handleErrorResponse(Unknown Source)
at com.amazon.redshift.client.PGMessagingContext.handleMessage(Unknown Source)
at com.amazon.jdbc.communications.InboundMessagesPipeline.getNextMessageOfClass(Unknown Source)
at com.amazon.redshift.client.PGMessagingContext.doMoveToNextClass(Unknown Source)
at com.amazon.redshift.client.PGMessagingContext.getParameterDescription(Unknown Source)
at com.amazon.redshift.client.PGClient.prepareStatement(Unknown Source)
at com.amazon.redshift.dataengine.PGQueryExecutor.<init>(Unknown Source)
at com.amazon.redshift.dataengine.PGDataEngine.prepare(Unknown Source)
at com.amazon.jdbc.common.SPreparedStatement.<init>(Unknown Source)
at com.amazon.jdbc.jdbc41.S41PreparedStatement.<init>(Unknown Source)
at com.amazon.jdbc.jdbc42.S42PreparedStatement.<init>(Unknown Source)
at com.amazon.redshift.core.jdbc42.PGJDBC42PreparedStatement.<init>(Unknown Source)
at com.amazon.redshift.core.jdbc42.PGJDBC42ObjectFactory.createPreparedStatement(Unknown Source)
at com.amazon.jdbc.common.SConnection.prepareStatement(Unknown Source)
at com.amazon.jdbc.common.SConnection.prepareStatement(Unknown Source)`
error1 example :JDBC mapped column details for divide by zero error :Have 5 columns like=> x-VARCHAR, y-INTEGER , z-VARCHAR , l-VARCHAR, r-DOUBLE
error2 example : JDBC mapped column details for valid input syntax for type numeric error => id-BIGINT,dt-TIMESTAMP,text-VARCHAR,money-NUMERIC
error3 example :we are not able to read the data from table also
Please share your thoughts on this

Related

How do I identify the null pointer exception in completable future?

I have a completable future code which throws NPE. I am unable to reproduce the exception in my local.
I have tried acceptance test and unit test for the code but it's not giving the exact error response.
final List<CompletableFuture<Map<K, V>>> completableFutures =
copy.stream()
.map(copy -> getRespForId(requestContext, copy))
.collect(Collectors.toList());
return CompletableFuture.allOf(completableFutures.toArray(new CompletableFuture<?>[0]))
.thenApply(future -> completableFutures.stream()
.map(CompletableFuture::join)
.flatMap(longMap -> longMap.entrySet().stream())
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)));
Expected is
Caused by: java.util.concurrent.CompletionException: java.lang.NullPointerException
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture.completeThrowable(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture.postComplete(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture.postFire(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture$Completion.exec(Unknown Source)
at java.base/java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(Unknown Source)
at java.base/java.util.concurrent.ForkJoinPool.scan(Unknown Source)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
Caused by: java.lang.NullPointerException: null
at java.base/java.util.Objects.requireNonNull(Unknown Source)
at java.base/java.util.stream.Collectors.lambda$uniqKeysMapAccumulator$1(Unknown Source)
The problem here is not the keys but the values. You get this exception because a value is null. Looks like java.util.stream.Collectors#uniqKeysMapAccumulator checks Objects.requireNonNull on the values. See NullPointerException in Collectors.toMap with null entry values

"java.lang.InternalError: Unexpected CryptoAPI failure generating seed" during silent installation

We are installing our product via script for automated UI tests.
Sometimes the installation failes with the following error.
java.lang.InternalError: Unexpected CryptoAPI failure generating seed
at java.base/sun.security.provider.NativeSeedGenerator.getSeedBytes(Unknown Source)
at java.base/sun.security.provider.SeedGenerator.generateSeed(Unknown Source)
at java.base/sun.security.provider.AbstractDrbg.lambda$static$0(Unknown Source)
at java.base/sun.security.provider.AbstractDrbg.getEntropyInput(Unknown Source)
at java.base/sun.security.provider.AbstractDrbg.getEntropyInput(Unknown Source)
at java.base/sun.security.provider.AbstractDrbg.instantiateIfNecessary(Unknown Source)
at java.base/sun.security.provider.AbstractDrbg.engineNextBytes(Unknown Source)
at java.base/sun.security.provider.AbstractDrbg.engineNextBytes(Unknown Source)
at java.base/sun.security.provider.AbstractDrbg$SeederHolder.lambda$static$0(Unknown Source)
at java.base/sun.security.provider.AbstractDrbg.getEntropyInput(Unknown Source)
at java.base/sun.security.provider.AbstractDrbg.getEntropyInput(Unknown Source)
at java.base/sun.security.provider.AbstractDrbg.instantiateIfNecessary(Unknown Source)
at java.base/sun.security.provider.AbstractDrbg.engineNextBytes(Unknown Source)
at java.base/sun.security.provider.AbstractDrbg.engineNextBytes(Unknown Source)
at java.base/sun.security.provider.DRBG.engineNextBytes(Unknown Source)
at java.base/java.security.SecureRandom.nextBytes(Unknown Source)
at java.base/java.security.SecureRandom.next(Unknown Source)
at java.base/java.util.Random.nextLong(Unknown Source)
at java.base/java.io.File$TempDirectory.generateFile(Unknown Source)
at java.base/java.io.File.createTempFile(Unknown Source)
at java.base/java.io.File.createTempFile(Unknown Source)
at com.exe4j.runtime.util.WinDel.scheduleDeletion(WinDel.java:85)
at com.exe4j.runtime.WinLauncher$3.run(WinLauncher.java:118)
Is there any known bug or fix for this?
I had this problem in Oracle Weblogic. Adding the following to the java options helped me
-Djava.security.egd=file:/dev/./urandom

Getting error when trying to build in Drools Workbench

I have installed Drools 7.7.0.Final war file in JBoss EAP 7.0.0.GA and trying to build a sample application. During build it is always throwing below exception. I am not able to proceed further. Please help to resolve this error.
13:39:37,501 ERROR [org.kie.workbench.common.services.refactoring.backend.server.indexing.AbstractFileIndexer] (Thread-529) Unable to index 'default://master#myteam/Mortgages/src/test/resources/mortgages/mortgages/Pricing%20low%20end.scenario'.: org.guvnor.common.services.shared.exceptions.GenericPortableException: An error occurred while executing the Local Build Config stage.
at org.guvnor.common.services.backend.exceptions.ExceptionUtilities.handleException(ExceptionUtilities.java:46)
at org.kie.workbench.common.services.datamodel.backend.server.DataModelServiceImpl.getModuleDataModel(DataModelServiceImpl.java:95)
at sun.reflect.GeneratedMethodAccessor161.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanInstance.java:38)
at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:100)
at org.kie.workbench.common.services.datamodel.backend.server.service.DataModelService$1079160182$Proxy$_$$_WeldClientProxy.getModuleDataModel(Unknown Source)
at org.drools.workbench.screens.testscenario.backend.server.indexing.TestScenarioFileIndexer.getModuleDataModelOracle(TestScenarioFileIndexer.java:77)
at org.drools.workbench.screens.testscenario.backend.server.indexing.TestScenarioFileIndexer.fillIndexBuilder(TestScenarioFileIndexer.java:52)
at org.kie.workbench.common.services.refactoring.backend.server.indexing.AbstractFileIndexer.toKObject(AbstractFileIndexer.java:78)
at org.drools.workbench.screens.testscenario.backend.server.indexing.TestScenarioFileIndexer$Proxy$_$$_WeldClientProxy.toKObject(Unknown Source)
at org.uberfire.ext.metadata.io.BatchIndex$3.visitFile(BatchIndex.java:186)
at org.uberfire.ext.metadata.io.BatchIndex$3.visitFile(BatchIndex.java:152)
at org.uberfire.java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:71)
at org.uberfire.java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:96)
at org.uberfire.java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:96)
at org.uberfire.java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:96)
at org.uberfire.java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:96)
at org.uberfire.java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:96)
at org.uberfire.java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:96)
at org.uberfire.java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:48)
at org.uberfire.java.nio.file.Files.walkFileTree(Files.java:1031)
at org.uberfire.java.nio.file.Files.walkFileTree(Files.java:1052)
Caused by: java.lang.RuntimeException: An error occurred while executing the Local Build Config stage.
at org.guvnor.ala.pipeline.execution.PipelineExecutor.continuePipeline(PipelineExecutor.java:126)
at org.guvnor.ala.pipeline.execution.PipelineExecutor.execute(PipelineExecutor.java:76)
at org.kie.workbench.common.services.backend.builder.ala.BuildPipelineInvoker.invokeLocalBuildPipeLine(BuildPipelineInvoker.java:88)
at org.kie.workbench.common.services.backend.builder.ala.BuildPipelineInvoker$Proxy$_$$_WeldClientProxy.invokeLocalBuildPipeLine(Unknown Source)
at org.kie.workbench.common.services.backend.builder.service.BuildServiceHelper.invokeLocalBuildPipeLine(BuildServiceHelper.java:152)
at org.kie.workbench.common.services.backend.builder.service.BuildServiceHelper.localBuild(BuildServiceHelper.java:82)
at org.kie.workbench.common.services.backend.builder.service.BuildServiceHelper$Proxy$_$$_WeldClientProxy.localBuild(Unknown Source)
at org.kie.workbench.common.services.backend.builder.service.BuildServiceImpl.build(BuildServiceImpl.java:69)
at org.kie.workbench.common.services.backend.builder.service.BuildServiceImpl$Proxy$_$$_WeldClientProxy.build(Unknown Source)
at org.kie.workbench.common.services.backend.builder.service.BuildInfoService.getBuildInfo(BuildInfoService.java:59)
at org.kie.workbench.common.services.backend.builder.service.BuildInfoService$Proxy$_$$_WeldClientProxy.getBuildInfo(Unknown Source)
at org.kie.workbench.common.services.datamodel.backend.server.cache.LRUModuleDataModelOracleCache.makeModuleOracle(LRUModuleDataModelOracleCache.java:81)
at org.kie.workbench.common.services.datamodel.backend.server.cache.LRUModuleDataModelOracleCache.assertModuleDataModelOracle(LRUModuleDataModelOracleCache.java:72)
at org.kie.workbench.common.services.datamodel.backend.server.cache.LRUModuleDataModelOracleCache$Proxy$_$$_WeldClientProxy.assertModuleDataModelOracle(Unknown Source)
at org.kie.workbench.common.services.datamodel.backend.server.DataModelServiceImpl.getModuleDataModel(DataModelServiceImpl.java:91)
... 28 more
Caused by: java.lang.IllegalArgumentException: No enum constant org.kie.workbench.common.services.backend.builder.ala.LocalBuildConfig.BuildType.${input.build-type}
at java.lang.Enum.valueOf(Unknown Source)
at org.kie.workbench.common.services.backend.builder.ala.LocalBuildConfig$BuildType.valueOf(LocalBuildConfig.java:41)
at org.kie.workbench.common.services.backend.builder.ala.LocalBuildConfigExecutor.decodeBuildType(LocalBuildConfigExecutor.java:90)
at org.kie.workbench.common.services.backend.builder.ala.LocalBuildConfigExecutor.apply(LocalBuildConfigExecutor.java:56)
at org.kie.workbench.common.services.backend.builder.ala.LocalBuildConfigExecutor.apply(LocalBuildConfigExecutor.java:38)
at org.kie.workbench.common.services.backend.builder.ala.LocalBuildConfigExecutor$Proxy$_$$_WeldClientProxy.apply(Unknown Source)
at org.guvnor.ala.pipeline.execution.PipelineExecutor.lambda$continuePipeline$0(PipelineExecutor.java:109)
at org.guvnor.ala.pipeline.execution.PipelineExecutor$$Lambda$288/221017006.accept(Unknown Source)
at org.guvnor.ala.pipeline.StageUtil$1.execute(StageUtil.java:38)
at org.guvnor.ala.pipeline.StageUtil$1.execute(StageUtil.java:33)
at org.guvnor.ala.pipeline.execution.PipelineExecutor.continuePipeline(PipelineExecutor.java:94)
... 42 more

How to fix MongoException_Network with Java (Morphia)

I'm using Morphia framework to connect to db mongoDB at ip internet.
Everything is good but sometime i have this error :(
I don't understand, please give me some suggest. Thanks
com.mongodb.MongoException$Network: Read operation to server "ip:port" failed on database cloud_1
at com.mongodb.DBTCPConnector.innerCall(DBTCPConnector.java:302)
at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:273)
at com.mongodb.DBCollectionImpl.find(DBCollectionImpl.java:84)
at com.mongodb.DBCollectionImpl.find(DBCollectionImpl.java:66)
at com.mongodb.DBCursor._check(DBCursor.java:498)
at com.mongodb.DBCursor._hasNext(DBCursor.java:621)
at com.mongodb.DBCursor.hasNext(DBCursor.java:657)
at org.mongodb.morphia.query.MorphiaIterator.hasNext(MorphiaIterator.java:57)
at org.mongodb.morphia.query.QueryImpl.asList(QueryImpl.java:323)
at oa.repository.SaleTransactionRepository.getListSaleTransactionByIdsAndEntityIds(SaleTransactionRepository.java:76)
at oa.service.impl.LiveCampaignServiceImpl.detailChartPromoteYourProduct(LiveCampaignServiceImpl.java:161)
at oa.service.impl.LiveCampaignServiceImpl.getCampaignDetailChart(LiveCampaignServiceImpl.java:124)
at oa.controller.campaign.LiveCampaignController.getCampaignDetailChart(LiveCampaignController.java:124)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.core.ApplicationFilterChain.inter..
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at java.io.BufferedInputStream.fill(Unknown Source)
at java.io.BufferedInputStream.read1(Unknown Source)
at java.io.BufferedInputStream.read(Unknown Source)
at org.bson.io.Bits.readFully(Bits.java:73)
at org.bson.io.Bits.readFully(Bits.java:50)
at org.bson.io.Bits.readFully(Bits.java:37)
at com.mongodb.Response.<init>(Response.java:42)
at com.mongodb.DBPort$1.execute(DBPort.java:164)
at com.mongodb.DBPort$1.execute(DBPort.java:158)
at com.mongodb.DBPort.doOperation(DBPort.java:187)
at com.mongodb.DBPort.call(DBPort.java:158)
at com.mongodb.DBTCPConnector.innerCall(DBTCPConnector.java:294)
... 103 more

Unable to read graphml file generated by networkx in yED

I am generating a graphml file via python based on network analysis. This is working fine. The problem is that I am unable to read it using yED or cytoscape.
Here is the error that I am observing in yED.
java.io.IOException
at B.A.A.B.W.ă(Unknown Source)
at B.A.A.B.W.ā(Unknown Source)
at B.A.A.J.A.ā(Unknown Source)
at B.A.A.J.A.ā(Unknown Source)
at B.A.A.J.A$A.Ă(Unknown Source)
at B.A.A.J.A.ā(Unknown Source)
at B.A.A.K.D.ā(Unknown Source)
at B.A.A.K.j.actionPerformed(Unknown Source)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
at com.apple.laf.ScreenMenuItem.actionPerformed(ScreenMenuItem.java:125)
at java.awt.MenuItem.processActionEvent(MenuItem.java:669)
at java.awt.MenuItem.processEvent(MenuItem.java:628)
at java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:351)
at java.awt.MenuComponent.dispatchEvent(MenuComponent.java:339)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:761)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.lang.NumberFormatException: For input string: "10000000000"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:583)
at java.lang.Integer.valueOf(Integer.java:766)
at y.H.B.A$B.Ă(Unknown Source)
at y.H.B.B.X.ā(Unknown Source)
at y.H.B.B.Y.ā(Unknown Source)
at y.H.B.B.Y.ą(Unknown Source)
at y.H.B.B.Y.ā(Unknown Source)
at y.H.B.B.Y.Ă(Unknown Source)
at y.H.B.B.Y.ā(Unknown Source)
at y.H.B.B.Y.Ć(Unknown Source)
at y.H.B.B.Y.ā(Unknown Source)
at y.H.B.B.Y.Ą(Unknown Source)
at y.H.B.B.Y.ā(Unknown Source)
at y.H.B.B._.ā(Unknown Source)
at y.H.B.B._.ā(Unknown Source)
at y.H.B.A$13.ā(Unknown Source)
at y.H.B.A.đ(Unknown Source)
at y.H.B.A.ā(Unknown Source)
at y.H.Q.ā(Unknown Source)
at B.A.A.B.G.A.F.ā(Unknown Source)
at B.A.A.B.G.A.D.ā(Unknown Source)
at y.H.G.ā(Unknown Source)
at y.B.A.M.Đ(Unknown Source)
at y.B._.č(Unknown Source)
at y.B._.ĺ(Unknown Source)
at y.B._.ă(Unknown Source)
... 36 more
*
and here is my graphml file
http://pastebin.com/r5xuPTXX
I am new to the graphml format. Any help is appreciated.
The thing is Java parseInt returns a 32bit signed int which has a maximal value of 2,147,483,647, your value (maybe an node Id) is 10,000,000,000.
The parser code should return a long (a 64 bit integer) instead.
Networkx is not at fault here. If you cannot change the parser, maybe try to cast big values as string type instead of int.