Ivan-gfan opened a new issue, #5584: URL: https://github.com/apache/seatunnel/issues/5584
### 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 An error occurred when I called the Seatunnel Rest Api for commit task execution as per the documentation. ```text java.util.concurrent.CompletionException:com.hazelcast.nio.serialization.HazelcastSerializationException: No DataSerializerFactory registered for namespace: -30002 at com.hazelcast.spi.impl.AbstractInvocationFuture.wrapInCompletionException ....... ``` This looks like a **hazelcast serialization** problem I searched for hazelcast related questions on stackflow and one of the accepted answers was to apply the configuration serialized classes to both the `server` and the `client`, but I didn't know how to use it Then i downloaded the `Seatunnel-Web` source code to see how the `web-client` submit the job, but the same error occurred --- Here are some related classes I found that I hope will quickly help you locate the problem, The comment indicates that this class is about task serialization ```java package org.apache.seatunnel.engine.core.serializable; import org.apache.seatunnel.engine.common.serializeable.SeaTunnelFactoryIdConstant; import org.apache.seatunnel.engine.core.dag.logical.LogicalDag; import org.apache.seatunnel.engine.core.dag.logical.LogicalEdge; import org.apache.seatunnel.engine.core.dag.logical.LogicalVertex; import org.apache.seatunnel.engine.core.job.JobImmutableInformation; import org.apache.seatunnel.engine.core.job.JobInfo; import com.hazelcast.internal.serialization.DataSerializerHook; import com.hazelcast.internal.serialization.impl.FactoryIdHelper; import com.hazelcast.nio.serialization.DataSerializableFactory; import com.hazelcast.nio.serialization.IdentifiedDataSerializable; import com.hazelcast.spi.annotation.PrivateApi; /** * A Java Service Provider hook for Hazelcast's Identified Data Serializable mechanism. This is * private API. All about the Job's data serializable define in this class. */ @PrivateApi public final class JobDataSerializerHook implements DataSerializerHook { /** Serialization ID of the {@link LogicalDag} class. */ public static final int LOGICAL_DAG = 0; /** Serialization ID of the {@link LogicalVertex} class. */ public static final int LOGICAL_VERTEX = 1; /** Serialization ID of the {@link LogicalEdge} class. */ public static final int LOGICAL_EDGE = 2; /** * Serialization ID of the {@link org.apache.seatunnel.engine.core.job.JobImmutableInformation} * class. */ public static final int JOB_IMMUTABLE_INFORMATION = 3; public static final int JOB_INFO = 4; public static final int FACTORY_ID = FactoryIdHelper.getFactoryId( SeaTunnelFactoryIdConstant.SEATUNNEL_JOB_DATA_SERIALIZER_FACTORY, SeaTunnelFactoryIdConstant.SEATUNNEL_JOB_DATA_SERIALIZER_FACTORY_ID); @Override public int getFactoryId() { return FACTORY_ID; } @Override public DataSerializableFactory createFactory() { return new Factory(); } private static class Factory implements DataSerializableFactory { @Override public IdentifiedDataSerializable create(int typeId) { switch (typeId) { case LOGICAL_DAG: return new LogicalDag(); case LOGICAL_VERTEX: return new LogicalVertex(); case LOGICAL_EDGE: return new LogicalEdge(); case JOB_IMMUTABLE_INFORMATION: return new JobImmutableInformation(); case JOB_INFO: return new JobInfo(); default: throw new IllegalArgumentException("Unknown type id " + typeId); } } } } ``` I also searched `-30002` namespace, it is defined in the following constant class ```java package org.apache.seatunnel.engine.common.serializeable; /** * Constants used for Hazelcast's {@link com.hazelcast.nio.serialization.IdentifiedDataSerializable} * mechanism. */ public final class SeaTunnelFactoryIdConstant { /** * Name of the system property that specifies SeaTunnelEngine's data serialization factory ID. */ public static final String SEATUNNEL_OPERATION_DATA_SERIALIZER_FACTORY = "hazelcast.serialization.ds.seatunnel.engine.operation"; /** Default ID of SeaTunnelEngine's data serialization factory. */ public static final int SEATUNNEL_OPERATION_DATA_SERIALIZER_FACTORY_ID = -30001; public static final String SEATUNNEL_JOB_DATA_SERIALIZER_FACTORY = "hazelcast.serialization.ds.seatunnel.engine.job"; public static final int SEATUNNEL_JOB_DATA_SERIALIZER_FACTORY_ID = -30002; public static final String SEATUNNEL_CONFIG_DATA_SERIALIZER_FACTORY = "hazelcast.serialization.ds.seatunnel.engine.config"; public static final int SEATUNNEL_CONFIG_DATA_SERIALIZER_FACTORY_ID = -30003; public static final String SEATUNNEL_TASK_DATA_SERIALIZER_FACTORY = "hazelcast.serialization.ds.seatunnel.engine.task"; public static final int SEATUNNEL_TASK_DATA_SERIALIZER_FACTORY_ID = -30004; public static final String SEATUNNEL_RESOURCE_DATA_SERIALIZER_FACTORY = "hazelcast.serialization.ds.seatunnel.engine.resource"; public static final int SEATUNNEL_RESOURCE_DATA_SERIALIZER_FACTORY_ID = -30005; public static final String SEATUNNEL_CHECKPOINT_DATA_SERIALIZER_FACTORY = "hazelcast.serialization.ds.seatunnel.engine.checkpoint"; public static final int SEATUNNEL_CHECKPOINT_DATA_SERIALIZER_FACTORY_ID = -30006; } ``` I don't know if this is a bug or my configuration is wrong, please help me find the problem!!! Thanks a lot ! ### SeaTunnel Version SeaTunnel - 2.3.3 ### SeaTunnel Config ```conf ${restApi.requestBody} ``` ### Running Command ```shell RestApi post request: url: http://localhost:5801/hazelcast/rest/maps/submit-job?jobId=1&jobName=t&isStartWithSavePoint=false body: ...(config) ``` ### Error Exception ```log java.util.concurrent.CompletionException:com.hazelcast.nio.serialization.HazelcastSerializationException: No DataSerializerFactory registered for namespace: -30002 at com.hazelcast.spi.impl.AbstractInvocationFuture.wrapInCompletionException(AbstractInvocationFuture.java:1353) ~[hazelcast-5.2.4.jar:5.2.4] ...... ``` ### Zeta or Flink or Spark Version _No response_ ### 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]
