Word - WSO2

Propaganda
[DS-1183] DataService ODATA - error for tables with over 23 fields Created:
09/Mar/16 Updated: 31/May/16 Resolved: 31/May/16
Status:
Project:
Component/s:
Affects
Version/s:
Fix Version/s:
Resolved
WSO2 Data Services Server
core
3.5.0
Type:
Reporter:
Resolution:
Labels:
Remaining
Estimate:
Time Spent:
Original
Estimate:
Environment:
Bug
rogerio moreira
Fixed
None
Not Specified
3.5.1
Priority:
Assignee:
Votes:
Normal
Madhawa Gunasekara
1
Not Specified
Not Specified
Postgresql 9.4, JDBC 4
Major
Severity:
Moderate
Estimated
Complexity:
Test cases added: Yes
Description
DS Fault Message: OData Service Fault : Error in reading table meta data in alocacao_de_trabalho table. :O índi
intervalo: 24, número de colunas: 23.
DS Code: UNKNOWN_ERROR
Nested Exception:org.postgresql.util.PSQLException: O índice da coluna está fora do intervalo: 24, número de colunas: 23.
at org.wso2.carbon.dataservices.core.odata.RDBMSDataHandler.readTableColumnMetaData(RDBMSDataHand
at org.wso2.carbon.dataservices.core.odata.RDBMSDataHandler.initializeMetaData(RDBMSDataHandler.java:
at org.wso2.carbon.dataservices.core.odata.RDBMSDataHandler.<init>(RDBMSDataHandler.java:109)
at
org.wso2.carbon.dataservices.core.description.config.SQLCarbonDataSourceConfig.createODataHandler(SQLC
at org.wso2.carbon.dataservices.core.DBDeployer.createDBService(DBDeployer.java:797)
at org.wso2.carbon.dataservices.core.DBDeployer.processService(DBDeployer.java:1139)
at org.wso2.carbon.dataservices.core.DBDeployer.deploy(DBDeployer.java:195)
at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)
at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:807)
at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144)
at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:377)
at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:254)
at org.apache.axis2.deployment.RepositoryListener.startListener(RepositoryListener.java:371)
at org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository(SchedulerTask.java:59)
at org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask.java:67)
at org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask.runAxisDeployment(CarbonDeploymen
at org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask.run(CarbonDeploymentSchedulerTask.j
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolE
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor
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)
Caused by: org.postgresql.util.PSQLException: O índice da coluna está fora do intervalo: 24, número de colunas
at org.postgresql.jdbc2.AbstractJdbc2ResultSetMetaData.getField(AbstractJdbc2ResultSetMetaData.java:419)
at org.postgresql.jdbc2.AbstractJdbc2ResultSetMetaData.getPrecision(AbstractJdbc2ResultSetMetaData.java:27
at org.wso2.carbon.dataservices.core.odata.RDBMSDataHandler.readTableColumnMetaData(RDBMSDataHand
... 23 more
Comments
Comment by Madhawa Gunasekara [ 18/Mar/16 ]
Hi Rogerio,
We will look in to this, will you able to share the DDL of the alocacao_de_trabalho table?
Thanks,
Madhawa
Comment by rogerio moreira [ 25/Mar/16 ]
I did a pull request fixing the problem:
https://github.com/wso2/carbon-data/pull/75
https://github.com/rogeriodegoiania/carbondata/commit/d607452160d240c5ecca9e5b4035a6c06346b3d5
The problem is the following statement in file
"../services.core/src/main/java/org/wso2/carbon/dataservices/core/odata/RDBMSDataHandler.java":
int precision = resultSet.getMetaData().getPrecision ;
int scale = resultSet.getMetaData().getScale ;
Comment by Alexandre Fernandes [ 19/Apr/16 ]
I had the same issue here. Your pull request worked just fine.
Comment by Madhawa Gunasekara [ 31/May/16 ]
Thanks for contributing rogerio.
fixed with https://github.com/wso2/carbondata/commit/1f45a5cf519261dd4bc7c7eeccb844c58ff8f74c
Thanks,
Madhawa
Generated at Sat May 27 18:01:01 IST 2017 using JIRA 7.2.2#72004sha1:9d5132893cc8c728a3601a9034a1f8547ef5c7be.
Download