I'm writing an ARP plugin but now I'm stuck

Hi everyone, I’m trying to write a plugin using a jdbc driver and the arp framework. The fetch of the schema occurs and I can see the list of tables, but when I decide to display any of them, I get a stacktrace that does not help me in debugging at all. I’m trying to understand the workflow, consider that I have to force both the usePrepareForColumnMetadata and usePrepareForGetTables (of the JdbcSchemaFetcher class) methods that return false. In what methods is the fetching of the single rows performed? This is what I always get in the logs:

2020-02-14 21:41:59,744 [21b8ebdc-517d-7ddc-a455-ce1128ceac00/0:foreman-planning] ERROR c.d.s.commandpool.CommandWrapper - command 21b8ebdc-517d-7ddc-a455-ce1128ceac00/0:foreman-planning failed
com.dremio.common.exceptions.UserException: Selected table has no columns.
at com.dremio.common.exceptions.UserException$Builder.build(UserException.java:776) ~[dremio-common-4.1.4-202001240912140359-a90eb503.jar:4.1.4-202001240912140359-a90eb503]
at com.dremio.exec.record.BatchSchema.toCalciteRecordType(BatchSchema.java:233) ~[dremio-sabot-kernel-4.1.4-202001240912140359-a90eb503.jar:4.1.4-202001240912140359-a90eb503]
at com.dremio.exec.store.NamespaceTable.getRowType(NamespaceTable.java:66) ~[dremio-sabot-kernel-4.1.4-202001240912140359-a90eb503.jar:4.1.4-202001240912140359-a90eb503]
at com.dremio.exec.catalog.DremioPrepareTable$1.get(DremioPrepareTable.java:63) ~[dremio-sabot-kernel-4.1.4-202001240912140359-a90eb503.jar:4.1.4-202001240912140359-a90eb503]
at com.dremio.exec.catalog.DremioPrepareTable$1.get(DremioPrepareTable.java:60) ~[dremio-sabot-kernel-4.1.4-202001240912140359-a90eb503.jar:4.1.4-202001240912140359-a90eb503]
at com.dremio.exec.catalog.DremioPrepareTable.getRowType(DremioPrepareTable.java:80) ~[dremio-sabot-kernel-4.1.4-202001240912140359-a90eb503.jar:4.1.4-202001240912140359-a90eb503]
at org.apache.calcite.sql.validate.TableNamespace.validateImpl(TableNamespace.java:61) ~[calcite-core-1.16.0-201909031936280585-3f76472.jar:1.16.0-201909031936280585-3f76472]
at org.apache.calcite.sql.validate.AbstractNamespace.validate(AbstractNamespace.java:84) ~[calcite-core-1.16.0-201909031936280585-3f76472.jar:1.16.0-201909031936280585-3f76472]
at org.apache.calcite.sql.validate.SqlValidatorImpl.validateNamespace(SqlValidatorImpl.java:943) ~[calcite-core-1.16.0-201909031936280585-3f76472.jar:1.16.0-201909031936280585-3f76472]
at org.apache.calcite.sql.validate.AbstractNamespace.getRowType(AbstractNamespace.java:115) ~[calcite-core-1.16.0-201909031936280585-3f76472.jar:1.16.0-201909031936280585-3f76472]
at org.apache.calcite.sql.validate.IdentifierNamespace.validateImpl(IdentifierNamespace.java:148) ~[calcite-core-1.16.0-201909031936280585-3f76472.jar:1.16.0-201909031936280585-3f76472]
at org.apache.calcite.sql.validate.AbstractNamespace.validate(AbstractNamespace.java:84) ~[calcite-core-1.16.0-201909031936280585-3f76472.jar:1.16.0-201909031936280585-3f76472]
at org.apache.calcite.sql.validate.SqlValidatorImpl.validateNamespace(SqlValidatorImpl.java:943) ~[calcite-core-1.16.0-201909031936280585-3f76472.jar:1.16.0-201909031936280585-3f76472]
at org.apache.calcite.sql.validate.SqlValidatorImpl.validateQuery(SqlValidatorImpl.java:924) ~[calcite-core-1.16.0-201909031936280585-3f76472.jar:1.16.0-201909031936280585-3f76472]
at org.apache.calcite.sql.validate.SqlValidatorImpl.validateFrom(SqlValidatorImpl.java:2971) ~[calcite-core-1.16.0-201909031936280585-3f76472.jar:1.16.0-201909031936280585-3f76472]
at org.apache.calcite.sql.validate.SqlValidatorImpl.validateFrom(SqlValidatorImpl.java:2956) ~[calcite-core-1.16.0-201909031936280585-3f76472.jar:1.16.0-201909031936280585-3f76472]
at org.apache.calcite.sql.validate.SqlValidatorImpl.validateSelect(SqlValidatorImpl.java:3197) ~[calcite-core-1.16.0-201909031936280585-3f76472.jar:1.16.0-201909031936280585-3f76472]
at org.apache.calcite.sql.validate.SelectNamespace.validateImpl(SelectNamespace.java:60) ~[calcite-core-1.16.0-201909031936280585-3f76472.jar:1.16.0-201909031936280585-3f76472]
at org.apache.calcite.sql.validate.AbstractNamespace.validate(AbstractNamespace.java:84) ~[calcite-core-1.16.0-201909031936280585-3f76472.jar:1.16.0-201909031936280585-3f76472]
at org.apache.calcite.sql.validate.SqlValidatorImpl.validateNamespace(SqlValidatorImpl.java:943) ~[calcite-core-1.16.0-201909031936280585-3f76472.jar:1.16.0-201909031936280585-3f76472]
at org.apache.calcite.sql.validate.SqlValidatorImpl.validateQuery(SqlValidatorImpl.java:924) ~[calcite-core-1.16.0-201909031936280585-3f76472.jar:1.16.0-201909031936280585-3f76472]
at org.apache.calcite.sql.SqlSelect.validate(SqlSelect.java:226) ~[calcite-core-1.16.0-201909031936280585-3f76472.jar:1.16.0-201909031936280585-3f76472]
at org.apache.calcite.sql.validate.SqlValidatorImpl.validateScopedExpression(SqlValidatorImpl.java:899) ~[calcite-core-1.16.0-201909031936280585-3f76472.jar:1.16.0-201909031936280585-3f76472]
at org.apache.calcite.sql.validate.SqlValidatorImpl.validate(SqlValidatorImpl.java:609) ~[calcite-core-1.16.0-201909031936280585-3f76472.jar:1.16.0-201909031936280585-3f76472]
at com.dremio.exec.planner.sql.SqlConverter.validate(SqlConverter.java:229) ~[dremio-sabot-kernel-4.1.4-202001240912140359-a90eb503.jar:4.1.4-202001240912140359-a90eb503]
at com.dremio.exec.planner.sql.handlers.PrelTransformer.validateNode(PrelTransformer.java:184) ~[dremio-sabot-kernel-4.1.4-202001240912140359-a90eb503.jar:4.1.4-202001240912140359-a90eb503]
at com.dremio.exec.planner.sql.handlers.PrelTransformer.validateAndConvert(PrelTransformer.java:173) ~[dremio-sabot-kernel-4.1.4-202001240912140359-a90eb503.jar:4.1.4-202001240912140359-a90eb503]
at com.dremio.exec.planner.sql.handlers.PrelTransformer.validateAndConvert(PrelTransformer.java:169) ~[dremio-sabot-kernel-4.1.4-202001240912140359-a90eb503.jar:4.1.4-202001240912140359-a90eb503]
at com.dremio.exec.planner.sql.handlers.query.NormalHandler.getPlan(NormalHandler.java:43) ~[dremio-sabot-kernel-4.1.4-202001240912140359-a90eb503.jar:4.1.4-202001240912140359-a90eb503]
at com.dremio.exec.planner.sql.handlers.commands.HandlerToExec.plan(HandlerToExec.java:70) ~[dremio-sabot-kernel-4.1.4-202001240912140359-a90eb503.jar:4.1.4-202001240912140359-a90eb503]
at com.dremio.exec.work.foreman.AttemptManager.plan(AttemptManager.java:415) ~[dremio-sabot-kernel-4.1.4-202001240912140359-a90eb503.jar:4.1.4-202001240912140359-a90eb503]
at com.dremio.exec.work.foreman.AttemptManager.lambda$run$0(AttemptManager.java:324) ~[dremio-sabot-kernel-4.1.4-202001240912140359-a90eb503.jar:4.1.4-202001240912140359-a90eb503]
at com.dremio.service.commandpool.CommandWrapper.run(CommandWrapper.java:62) ~[dremio-services-commandpool-4.1.4-202001240912140359-a90eb503.jar:4.1.4-202001240912140359-a90eb503]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_231]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_231]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_231]

Which database are use you?
What driver? Name? Versión?
Upload your arp code
And provide logs in debug, see oficial documentation for enable debug for arp

Thank you for the answer.
I managed to change things, I realized that I have two versions of antlr4-runtime in the jars directory, so I removed one and now I get a different error, which is better anyway. if I need further help, I will not hesitate to write more details.
EDIT: i have the same problem, but i’m considering resolving jar conflicts
EDIT2: i managed to get a more explanatory stacktrace, as soon as I can I will update here on the thread.

In the end I managed to solve, the problem was the jdbc driver, which actually returned 0 columns.