Fully managed cloud. 30-day FREE full featured trial. Start Now
cancel
Showing results for 
Search instead for 
Did you mean: 

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

7 REPLIES 7

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

 

codrin
Xpert

Hi all,

I encountered the same error, but it was solved by setting the bucket rights to Public Readable (I had used password protection for both read and write before). It seems not so explicitly stated in the documentation ('Upload the JDBC driver files in a bucket so that it is accessible for the adapter script.'), but it seems to me the adapter requires the bucket to be publicly readable to use the drivers. Or is there a way to let the adapter use the drivers by also defining the r user and its password defined in EXAOperation, @exa-Carsten ?

Screenshot 2022-06-11 215722.jpg

exa-Vandana
Moderator
Moderator

hi Codrin,

you can create a connection to bucketfs using the read password and grant it to the necessary user. 

refer to this for more information:

https://docs.exasol.com/db/latest/database_concepts/bucketfs/database_access.htm 

Hope this helps!