sqlparser / python_data_lineage

Data lineage tools in python
18 stars 3 forks source link

ClassNotFoundException #1

Closed haiderpasha-mohammed-tfs closed 6 months ago

haiderpasha-mohammed-tfs commented 7 months ago

Command python dlineage.py /t oracle /f test.sql /graph throws the below error. Any ideas what is missing here?

Traceback (most recent call last):
  File "ClassLoader.java", line 521, in java.lang.ClassLoader.loadClass
java.lang.ClassNotFoundException: <exception str() failed>

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "DataFlowAnalyzer.java", line 661, in gudusoft.gsqlparser.dlineage.DataFlowAnalyzer.generateDataFlow
Exception: Java Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "dlineage.py", line 283, in <module>
    call_dataFlowAnalyzer(args)
  File "dlineage.py", line 194, in call_dataFlowAnalyzer
    result = dlineage.generateDataFlow()
java.lang.NoClassDefFoundError: <exception str() failed>
liaowuhen2 commented 7 months ago

@haiderpasha-mohammed-tfs We haven't encountered this error yet. Could you tell me the versions of JDK, Python 3, and JPype that you are using? Our versions are: JDK 1.8, Python 3.12.1, JPype 1.5.0. You can try testing with this version combination.

sucre111 commented 6 months ago

I had same error, my versions:

java version "20.0.1" 2023-04-18 Java(TM) SE Runtime Environment (build 20.0.1+9-29) Java HotSpot(TM) 64-Bit Server VM (build 20.0.1+9-29, mixed mode, sharing)

Python 3.8.18

jpype 1.5.0

We haven't encountered this error yet. Could you tell me the versions of JDK, Python 3, and JPype that you are using? Our versions are: JDK 1.8, Python 3.12.1, JPype 1.5.0. You can try testing with this version combination.

liaowuhen2 commented 6 months ago

@sucre111 It could be an issue with the JDK version. The JPype official website states that they have only tested their software on Java versions 1.8 to 13. Therefore, please try testing with Java 1.8 as our gudusoft.gsqlparser.jar was compiled under Java 1.8.

https://jpype.readthedocs.io/en/latest/install.html JPype has been tested with Java versions from Java 1.8 to Java 13.

sucre111 commented 6 months ago

@sucre111 It could be an issue with the JDK version. The JPype official website states that they have only tested their software on Java versions 1.8 to 13. Therefore, please try testing with Java 1.8 as our gudusoft.gsqlparser.jar was compiled under Java 1.8.

https://jpype.readthedocs.io/en/latest/install.html JPype has been tested with Java versions from Java 1.8 to Java 13.

@liaowuhen2 According to your instructions, I succeeded. Thank you very much.

haiderpasha-mohammed-tfs commented 6 months ago

@haiderpasha-mohammed-tfs We haven't encountered this error yet. Could you tell me the versions of JDK, Python 3, and JPype that you are using? Our versions are: JDK 1.8, Python 3.12.1, JPype 1.5.0. You can try testing with this version combination.

Java version:

$ java -version
java version "1.8.0_371"
Java(TM) SE Runtime Environment (build 1.8.0_371-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.371-b11, mixed mode)

JPype1 version: 1.5.0

Python version: 3.8.0

This is my setup. Do you see any issues with this?

liaowuhen2 commented 6 months ago

@haiderpasha-mohammed-tfs Try changing the Python version to 3.12。

image