mxsm opened a new issue, #4129:
URL: https://github.com/apache/eventmesh/issues/4129

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/eventmesh/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Enhancement Request
   
    When I try to retrieve the extension using the following code, it throws an 
error.
    
   
![image](https://github.com/apache/eventmesh/assets/15797831/84a1292e-6b77-4e64-a29e-140a68cabc61)
   
   The parameter names for the database name are the same.
   ```
   2023-06-17 21:53:26,101 INFO  [main] 
MetaInfExtensionClassLoader(MetaInfExtensionClassLoader.java:86) - load 
extension class success, extensionType: interface 
org.apache.eventmesh.source.connector.jdbc.dialect.DatabaseDialectFactory, 
extensionClass: class 
org.apache.eventmesh.source.connector.jdbc.dialect.mysql.MysqlDatabaseDialectFactory
   2023-06-17 21:53:26,106 INFO  [main] 
EventMeshExtensionFactory(EventMeshExtensionFactory.java:92) - initialize 
extension instance success, extensionType: interface 
org.apache.eventmesh.source.connector.jdbc.dialect.DatabaseDialectFactory, 
extensionInstanceName: mysql
   2023-06-17 21:53:26,616 INFO  [main] 
MysqlDatabaseDialect(MysqlDatabaseDialect.java:87) - Mysql Connection 
initialize Success,JDBC driver metadata:JdbcDriverMetaData(JdbcMajorVersion=4, 
jdbcMinorVersion=2, jdbcDriverName=MySQL Connector/J, 
databaseProductName=MySQL, databaseProductVersion=8.0.33)
   Exception in thread "main" java.lang.ClassCastException: 
org.apache.eventmesh.source.connector.jdbc.dialect.mysql.MysqlDatabaseDialectFactory
 cannot be cast to 
org.apache.eventmesh.source.connector.jdbc.dialect.cdc.CdcEngineFactory
        at 
org.apache.eventmesh.source.connector.jdbc.JdbcAllFactoryLoader.getCdcEngineFactory(JdbcAllFactoryLoader.java:46)
        at 
org.apache.eventmesh.source.connector.jdbc.connector.JdbcSourceConnector.init(JdbcSourceConnector.java:91)
        at 
org.apache.eventmesh.openconnect.SourceWorker.<init>(SourceWorker.java:59)
        at org.apache.eventmesh.openconnect.Application.run(Application.java:55)
        at 
org.apache.eventmesh.source.connector.jdbc.JdbcSourceWorker.main(JdbcSourceWorker.java:26)
   
   ```
   
   ### Describe the solution you'd like
   
   Enhance the functionality of EventMeshExtensionFactory
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to