Open MZSY opened 9 months ago
这里报错说找不到这个class文件java.lang.NoClassDefFoundError: net/postgis/jdbc/geometry/Geometry,我去看了postgis-jdbc.jar的包结构,只能找到net/postgis/jdbc这一级目录,往后的找不到了。我不确定是代码找的目录写错了,或者是我用的包版本不对,又或者是我其他地方配置有问题,请帮我看看这个问题,十分感谢
看不了一点,我的报错是Caused by: java.lang.ClassNotFoundException: org.apache.seatunnel.api.source.SeaTunnelSource at java.net.URLClassLoader.findClass(URLClassLoader.java:407)
这里报错说找不到这个class文件java.lang.NoClassDefFoundError: net/postgis/jdbc/geometry/Geometry,我去看了postgis-jdbc.jar的包结构,只能找到net/postgis/jdbc这一级目录,往后的找不到了。我不确定是代码找的目录写错了,或者是我用的包版本不对,又或者是我其他地方配置有问题,请帮我看看这个问题,十分感谢
Can you provide ddl and pgsql versions of the source table?
DDL:CREATE TABLE "public"."geom_test1206" ( "AREA_CODE" varchar(20) COLLATE "pg_catalog"."default", "NAME" varchar(160) COLLATE "pg_catalog"."default", "geom" geometry(GEOMETRY), "gid" varchar(50) COLLATE "pg_catalog"."default", "cxflm" varchar(255) COLLATE "pg_catalog"."default", "center_geom" geometry(GEOMETRY), "geom_3857" geometry(GEOMETRY), "xian_name" varchar(255) COLLATE "pg_catalog"."default", "old_code" varchar(255) COLLATE "pg_catalog"."default", "test_geom" geometry(GEOMETRY), "is_frozen" int4 DEFAULT 0 ) ;
ALTER TABLE "public"."geom_test1206" OWNER TO "postgres";
pgsql version is 11.6
I'm really sorry that I switched my mailbox before and I didn't receive your reply. Could this issue be related to the version of the pg database? I know my version is probably old.
在 2023-12-24 16:22:50,"Carl-Zhou-CN" @.***> 写道:
这里报错说找不到这个class文件java.lang.NoClassDefFoundError: net/postgis/jdbc/geometry/Geometry,我去看了postgis-jdbc.jar的包结构,只能找到net/postgis/jdbc这一级目录,往后的找不到了。我不确定是代码找的目录写错了,或者是我用的包版本不对,又或者是我其他地方配置有问题,请帮我看看这个问题,十分感谢
Can you provide ddl and pgsql versions of the source table?
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
@MZSY hi,It seems that you also need to add and change the jar package, you can select the corresponding jar package version to try https://repo1.maven.org/maven2/net/postgis/postgis-geometry/2.5.1/postgis-geometry-2.5.1.jar,similar problems occurred when I removed the package, but I did not find pgsql :11.6 environment to try, I hope you can help to try it
@Carl-Zhou-CN In fact, I later tried to remove the postgis jar package and keep only the postgresql jar package, and there was no such problem. If I just want to copy spatial data from one pg database to another pg database, is it necessary to use postgis jar packages? PS.In fact, I also encountered another problem when importing data, I found that if there is a field like 3857_geom (number beginning) or AREA_NAME (all caps) in the source table, the transmission process will also report an error problem
Shall I raise this issue again or consult it here?
Shall I raise this issue again or consult it here?
You can create a new issue and associate it
@Carl-Zhou-CN In fact, I later tried to remove the postgis jar package and keep only the postgresql jar package, and there was no such problem. If I just want to copy spatial data from one pg database to another pg database, is it necessary to use postgis jar packages? PS.In fact, I also encountered another problem when importing data, I found that if there is a field like 3857_geom (number beginning) or AREA_NAME (all caps) in the source table, the transmission process will also report an error problem
Can you help refine the documentation for this?
@Carl-Zhou-CN In fact, I later tried to remove the postgis jar package and keep only the postgresql jar package, and there was no such problem. If I just want to copy spatial data from one pg database to another pg database, is it necessary to use postgis jar packages? PS.In fact, I also encountered another problem when importing data, I found that if there is a field like 3857_geom (number beginning) or AREA_NAME (all caps) in the source table, the transmission process will also report an error problem
Can you help refine the documentation for this?
I'm sorry, I don't understand what you mean about refining documentation, do you mean that I should take this commission issue or something else?
I think you found a way to add jar packages differently due to PostgreSQL versions. I was hoping you could help me add a reminder to the documentation, re you interested? https://github.com/apache/seatunnel/blob/dev/docs/en/connector-v2/source/PostgreSQL.md
I'd love to help refine the markdown documentation, but I don't think I've tested a strong correlation between the PostgreSQL version and the jdbc jar package version. The PG version I was using was 11.6, but the jdbc jar package I was using was the latest 42.6.x version and I had no other problems executing it
I'd love to help refine the markdown documentation, but I don't think I've tested a strong correlation between the PostgreSQL version and the jdbc jar package version. The PG version I was using was 11.6, but the jdbc jar package I was using was the latest 42.6.x version and I had no other problems executing it
Thank you very much, PostgreSQL to PostgreSQL I will find time to build 11.6 to try, it is essentially jdbc, if jdbc is compatible, it is compatible
I'd love to help refine the markdown documentation, but I don't think I've tested a strong correlation between the PostgreSQL version and the jdbc jar package version. The PG version I was using was 11.6, but the jdbc jar package I was using was the latest 42.6.x version and I had no other problems executing it
Thank you very much, PostgreSQL to PostgreSQL I will find time to build 11.6 to try, it is essentially jdbc, if jdbc is compatible, it is compatible
You're welcome. I wasn't very helpful
@frozer798 hi,I tried to use postgis/postgis:11-3.3 docker image to build the environment. Do as you say only need to add the https://repo1.maven.org/maven2/org/postgresql/postgresql/42.3.3/postgresql-42.3.3.jar PostgreSQL to PostgreSQL is also running properly and data is synchronized properly
Sorry, there seems to be other problems, I will update after checking
@frozer798 hi,I tried to use postgis/postgis:11-3.3 docker image to build the environment. Do as you say only need to add the https://repo1.maven.org/maven2/org/postgresql/postgresql/42.3.3/postgresql-42.3.3.jar PostgreSQL to PostgreSQL is also running properly and data is synchronized properly
@frozer798 Sorry,current version seatunnel cannot transfer PostgreSQL to PostgreSQL geometry at this time because geometry is currently recognized as a String,It will be added in the next version
link #5872
@frozer798 Sorry,current version seatunnel cannot transfer PostgreSQL to PostgreSQL geometry at this time because geometry is currently recognized as a String,It will be added in the next version
Did you mean that transferring geometry data from PostgreSQL database to PostgreSQL database is not currently supported?
@frozer798 Sorry,current version seatunnel cannot transfer PostgreSQL to PostgreSQL geometry at this time because geometry is currently recognized as a String,It will be added in the next version
Did you mean that transferring geometry data from PostgreSQL database to PostgreSQL database is not currently supported?
Yes, but you can refer to it https://github.com/apache/seatunnel/blob/dev/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-jdbc-e2e/connector-jdbc-e2e-part-3/src/test/java/org/apache/seatunnel/connectors/seatunnel/jdbc/JdbcPostgresIT.java t provides a roundabout way of thinking
This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.
Search before asking
What happened
我需要的使用场景是:将多源数据导入到postgresql数据库中 我在apache-seatunnel-2.3.3/plugins/jdbc/lib下放了postgresql-42.6.0.jar和postgis-jdbc-2021.1.0.jar两个jar包,都是从maven仓库里下载的,但当我执行测试脚本的时候,我遇到了报错,希望能帮我看看这个问题
SeaTunnel Version
2.3.3
SeaTunnel Config
Running Command
Error Exception
Zeta or Flink or Spark Version
No response
Java or Scala Version
No response
Screenshots
No response
Are you willing to submit PR?
Code of Conduct