diff --git a/geaflow/geaflow-dsl/geaflow-dsl-connector/geaflow-dsl-connector-file/src/main/java/com/antgroup/geaflow/dsl/connector/file/source/JarFileReadHandler.java b/geaflow/geaflow-dsl/geaflow-dsl-connector/geaflow-dsl-connector-file/src/main/java/com/antgroup/geaflow/dsl/connector/file/source/JarFileReadHandler.java index 3bddd9448..77635b1f2 100644 --- a/geaflow/geaflow-dsl/geaflow-dsl-connector/geaflow-dsl-connector-file/src/main/java/com/antgroup/geaflow/dsl/connector/file/source/JarFileReadHandler.java +++ b/geaflow/geaflow-dsl/geaflow-dsl-connector/geaflow-dsl-connector-file/src/main/java/com/antgroup/geaflow/dsl/connector/file/source/JarFileReadHandler.java @@ -17,6 +17,7 @@ import static com.antgroup.geaflow.dsl.connector.file.FileConstants.PREFIX_JAVA_RESOURCE; import com.antgroup.geaflow.common.config.Configuration; +import com.antgroup.geaflow.dsl.common.exception.GeaFlowDSLException; import com.antgroup.geaflow.dsl.common.types.TableSchema; import com.antgroup.geaflow.dsl.connector.api.Partition; import com.antgroup.geaflow.dsl.connector.file.source.FileTableSource.FileSplit; @@ -53,6 +54,9 @@ public ResourceFileSplit(String baseDir, String relativePath) { @Override public InputStream openStream(Configuration conf) throws IOException { URL url = getClass().getResource(getPath()); + if (url == null) { + throw new GeaFlowDSLException("Resource: {} not found", getPath()); + } return url.openStream(); } }