Asura7969 opened a new issue, #6550:
URL: https://github.com/apache/seatunnel/issues/6550

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/seatunnel/issues?q=is%3Aissue+label%3A%22bug%22)
 and found no similar issues.
   
   
   ### What happened
   
   Can not find catalog table with factoryId [Postgres]
   
   ### SeaTunnel Version
   
   2.3.4
   
   ### SeaTunnel Config
   
   ```conf
   nothing
   ```
   
   
   ### Running Command
   
   ```shell
   {
     "env": {
       "job.mode": "STREAMING",
       "parallelism": 1,
       "checkpoint.interval": 5000
     },
     "source": [
       {
         "base-url": "jdbc:postgresql://xxxx:9999/n2db?loggerLevel=OFF",
         "password": "xxxx",
         "hostname": "xxxx",
         "exactly_once": true,
         "startup.mode": "INITIAL",
         "port": 9999,
         "debezium": {
           "publication.name": "dbz_publication"
         },
         "slot.name": "hipot_results_slot",
         "database-name": [
           "n2db"
         ],
         "table-names": [
           "n2db.n2admin.hipot_results"
         ],
         "plugin_name": "Postgres-CDC",
         "username": "replica"
       }
     ],
     "sink": [
       {
         "base-url": "jdbc:mysql://xxxx:9030/test?useSSL=true",
         "enable_upsert_delete": "true",
         "password": "123456",
         "database": "test",
         "save_mode_create_template": "CREATE TABLE IF NOT EXISTS 
`${database}`.`${table_name}` (\n${rowtype_primary_key},\n${rowtype_fields}\n) 
ENGINE=OLAP\n PRIMARY KEY (${rowtype_primary_key})\nDISTRIBUTED BY HASH 
(${rowtype_primary_key})PROPERTIES (\n    \"replication_num\" = \"2\" \n)",
         "max_retries": 3,
         "starrocks.config": {
           "format": "json"
         },
         "labelPrefix": "test_pg_cdc",
         "nodeUrls": [
           "xxxx:8030"
         ],
         "plugin_name": "StarRocks",
         "table": "test_pg_cdc",
         "username": "seatunnel"
       }
     ]
   }
   ```
   
   
   ### Error Exception
   
   ```log
   2024-03-20 17:00:01,698 INFO  [o.a.s.a.t.c.CatalogTableUtil  ] 
[hz.main.cached.thread-13] - Get catalog tables, cost time: 89
   2024-03-20 17:00:01,698 INFO  [.s.c.s.j.c.AbstractJdbcCatalog] 
[hz.main.cached.thread-13] - Catalog Postgres closing
   2024-03-20 17:00:01,698 WARN  [Log4j2HttpPostCommandProcessor] 
[hz.main.cached.thread-13] - [10.9.30.107]:6801 [seatunnel] [5.1] An error 
occurred while handling request HttpCommand 
[HTTP_POST]{uri='/hazelcast/rest/maps/submit-job'}AbstractTextCommand[HTTP_POST]{requestId=2}
   org.apache.seatunnel.api.table.factory.FactoryException: ErrorCode:[API-06], 
ErrorDescription:[Factory initialize failed] - Unable to create a source for 
identifier 'Postgres-CDC'.
           at 
org.apache.seatunnel.api.table.factory.FactoryUtil.createAndPrepareSource(FactoryUtil.java:100)
 ~[seatunnel-starter.jar:2.3.4]
           at 
org.apache.seatunnel.engine.core.parse.MultipleTableJobConfigParser.parseSource(MultipleTableJobConfigParser.java:320)
 ~[seatunnel-starter.jar:2.3.4]
           at 
org.apache.seatunnel.engine.core.parse.MultipleTableJobConfigParser.parse(MultipleTableJobConfigParser.java:181)
 ~[seatunnel-starter.jar:2.3.4]
           at 
org.apache.seatunnel.engine.server.rest.RestJobExecutionEnvironment.getLogicalDag(RestJobExecutionEnvironment.java:76)
 ~[seatunnel-starter.jar:2.3.4]
           at 
org.apache.seatunnel.engine.server.rest.RestJobExecutionEnvironment.build(RestJobExecutionEnvironment.java:99)
 ~[seatunnel-starter.jar:2.3.4]
           at 
org.apache.seatunnel.engine.server.rest.RestHttpPostCommandProcessor.handleSubmitJob(RestHttpPostCommandProcessor.java:136)
 ~[seatunnel-starter.jar:2.3.4]
           at 
org.apache.seatunnel.engine.server.rest.RestHttpPostCommandProcessor.handle(RestHttpPostCommandProcessor.java:82)
 ~[seatunnel-starter.jar:2.3.4]
           at 
org.apache.seatunnel.engine.server.rest.RestHttpPostCommandProcessor.handle(RestHttpPostCommandProcessor.java:60)
 ~[seatunnel-starter.jar:2.3.4]
           at 
com.hazelcast.internal.ascii.TextCommandServiceImpl$CommandExecutor.run(TextCommandServiceImpl.java:402)
 ~[seatunnel-starter.jar:2.3.4]
           at 
com.hazelcast.internal.util.executor.CachedExecutorServiceDelegate$Worker.run(CachedExecutorServiceDelegate.java:217)
 ~[seatunnel-starter.jar:2.3.4]
           at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 
~[?:1.8.0_381]
           at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 
~[?:1.8.0_381]
           at java.lang.Thread.run(Thread.java:750) [?:1.8.0_381]
           at 
com.hazelcast.internal.util.executor.HazelcastManagedThread.executeRun(HazelcastManagedThread.java:76)
 ~[seatunnel-starter.jar:2.3.4]
           at 
com.hazelcast.internal.util.executor.HazelcastManagedThread.run(HazelcastManagedThread.java:102)
 ~[seatunnel-starter.jar:2.3.4]
   Caused by: org.apache.seatunnel.common.utils.SeaTunnelException: Can not 
find catalog table with factoryId [Postgres]
           at 
org.apache.seatunnel.api.table.catalog.CatalogTableUtil.lambda$getCatalogTables$0(CatalogTableUtil.java:129)
 ~[seatunnel-starter.jar:2.3.4]
           at java.util.Optional.map(Optional.java:215) ~[?:1.8.0_381]
           at 
org.apache.seatunnel.api.table.catalog.CatalogTableUtil.getCatalogTables(CatalogTableUtil.java:116)
 ~[seatunnel-starter.jar:2.3.4]
           at 
org.apache.seatunnel.api.table.catalog.CatalogTableUtil.getCatalogTables(CatalogTableUtil.java:96)
 ~[seatunnel-starter.jar:2.3.4]
           at 
org.apache.seatunnel.connectors.seatunnel.cdc.postgres.source.PostgresIncrementalSourceFactory.lambda$createSource$1(PostgresIncrementalSourceFactory.java:91)
 ~[?:?]
           at 
org.apache.seatunnel.api.table.factory.FactoryUtil.createAndPrepareSource(FactoryUtil.java:112)
 ~[seatunnel-starter.jar:2.3.4]
           at 
org.apache.seatunnel.api.table.factory.FactoryUtil.createAndPrepareSource(FactoryUtil.java:73)
 ~[seatunnel-starter.jar:2.3.4]
           ... 14 more
   ```
   
   
   ### Zeta or Flink or Spark Version
   
   Zeta
   
   ### Java or Scala Version
   
   _No response_
   
   ### Screenshots
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to