exasol / virtual-schemas

Entry point repository for the EXASOL Virtual Schemas
http://www.exasol.com
MIT License
24 stars 23 forks source link

Can't create virtual schema with error: The main script class defined via %scriptclass cannot be found: com.exasol.adapter.RequestDispatcher #360

Closed tjlee closed 4 years ago

tjlee commented 4 years ago

I'm trying to create virtual schema for Exasol according to Exasol documentation but without success.

I'm working with

DBMS: EXASolution (ver. 6.2.8)
Case sensitivity: plain=upper, delimited=exact
Driver: EXASolution JDBC Driver (ver. 6.2.5, JDBC3.0)

and trying to create virtual schema with:

CREATE SCHEMA SCHEMA_FOR_VS_SCRIPT;

CREATE JAVA ADAPTER SCRIPT SCHEMA_FOR_VS_SCRIPT.ADAPTER_SCRIPT_EXASOL AS
    %scriptclass com.exasol.adapter.RequestDispatcher;
    %jar /buckets/bfsdefault/default/virtual-schema-jdbc-adapter-4.0.2.jar;
/

CREATE CONNECTION EXASOL_CONNECTION
  TO 'jdbc:exa:localhost:8888'
  USER 'SYS'
  IDENTIFIED BY 'exasol';

CREATE VIRTUAL SCHEMA VIRTUAL_EXASOL
    USING SCHEMA_FOR_VS_SCRIPT.ADAPTER_SCRIPT_EXASOL WITH
    SQL_DIALECT     = 'EXASOL'
    CONNECTION_NAME = 'EXASOL_CONNECTION'
    SCHEMA_NAME     = 'TEST'
    IMPORT_FROM_EXA = 'true'
    EXA_CONNECTION_STRING = 'localhost:8888';

but can't with:

[2020-07-30 15:12:11] [22002] VM error:
[2020-07-30 15:12:11] com.exasol.ExaCompilationException: The main script class defined via %scriptclass cannot be found: com.exasol.adapter.RequestDispatcher
[2020-07-30 15:12:11] Stack trace:
[2020-07-30 15:12:11] com.exasol.ExaWrapper.runSingleCall(ExaWrapper.java:100) (Session: 1673642566201916773)

Is there any errors in documentation? Or am I doing something wrong?

AnastasiiaSergienko commented 4 years ago

Hello @tjlee, this project does not contain the Exasol dialect that you are trying to use. You can find a jar with Exasol dialect here: https://github.com/exasol/exasol-virtual-schema/releases

Please make sure that the name of the jar file you uploaded to a bucket matches the name you specified in the adapter script. The latest jar for the Exasol dialect is named virtual-schema-dist-5.0.2-exasol-3.0.2.jar. If you do not rename the jar, the adapter script should contain the same name.

Please let me know if you have any other questions.

Best Regards, Anastasiia Sergienko

tjlee commented 4 years ago

Everything is working fine. Thanks for support.