Error when creating Virtual Schema

andreeroos
SQL-Fighter

Hi.

I get an error when trying to create a virtual schema to an oracle database.

 

SQL Error [22002]: VM error: F-UDF-CL-LIB-1125: F-UDF-CL-SL-JAVA-1000: F-UDF-CL-SL-JAVA-1037: 
com.exasol.ExaCompilationException: F-UDF-CL-SL-JAVA-1158: /JDBC_ADAPTER.java:5: error: class, interface, or enum expected
 /
 ^
1 error
 (Session: 1695133089084866560)

 

I get this error after running:

 

CREATE VIRTUAL SCHEMA MY_SCHEMA
USING ADAPTER.JDBC_ADAPTER
WITH
CONNECTION_NAME = 'MY_JDBC_CONNECTION'
SCHEMA_NAME = 'ORACLE_SCHEMA'; 

 

 I don't have any problems when testing the connection 'MY_JDBC_CONNECTION'.
What could this error be about?
I would appriaciate any help. Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions

andreeroos
SQL-Fighter

I found the error. The slash sign had a few preceeding spaces that I removed. Silly error, but now all is good. 🙂

 

andreeroos_0-1616687028306.png

 

View solution in original post

5 REPLIES 5

exa-Carsten
Moderator
Moderator
Hi Andrée! Could you share the JDBC_ADAPTER script? Thanks!

andreeroos
SQL-Fighter

This is the script I'm using:

 

CREATE OR REPLACE JAVA ADAPTER SCRIPT ADAPTER.JDBC_ADAPTER AS
  %scriptclass com.exasol.adapter.RequestDispatcher;
  %jar /buckets/bfsdefault/jars/virtual-schema-dist-9.0.1-oracle-2.0.0.jar;
  %jar /buckets/bfsdefault/jars/ojdbc8-19.8.0.0.jar;
 /

 

exa-Carsten
Moderator
Moderator

Ok, that looks correct.

What SQL client are you using? Could you also post the output of the following query:

SELECT script_text FROM exa_all_scripts WHERE script_schema = 'ADAPTER' AND script_name='JDBC_ADAPTER';

My current assumption is that something went wrong when creating the script. As described in the documentation https://docs.exasol.com/database_concepts/virtual_schema/user_guide.htm#SQL_Client_Troubleshooting the sql client can sometimes cause issues. Thanks!

andreeroos
SQL-Fighter

Hi.

 

This is what it looks like. Btw, I'm using Dbeaver 7.2.5.

exasolimg.png

This is what it looks like in the database navigator tree in Dbeaver:

 

andreeroos_0-1616679657474.png

 

Also the JDBC connection I am using works fine. I can query tables in the Oracle database.

 

 

 

andreeroos
SQL-Fighter

I found the error. The slash sign had a few preceeding spaces that I removed. Silly error, but now all is good. 🙂

 

andreeroos_0-1616687028306.png

 

View solution in original post