You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by jo...@apache.org on 2026/08/03 14:21:55 UTC
(zeppelin) branch master updated: [ZEPPELIN-6466] Improve RepositorySystemFactory error reporting
This is an automated email from the ASF dual-hosted git repository.
jongyoul pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/zeppelin.git
The following commit(s) were added to refs/heads/master by this push:
new 0fbb61137c [ZEPPELIN-6466] Improve RepositorySystemFactory error reporting
0fbb61137c is described below
commit 0fbb61137ce43db7b4fd226585b624877eeebd8e
Author: 백형준 <13...@users.noreply.github.com>
AuthorDate: Mon Aug 3 23:21:50 2026 +0900
[ZEPPELIN-6466] Improve RepositorySystemFactory error reporting
### What is this PR for?
Replace `printStackTrace()` in `RepositorySystemFactory` with SLF4J error logging so service creation failures are handled through the configured logging framework.
Also add a meaningful message to the `RuntimeException` thrown when `locator.getService(RepositorySystem.class)` returns null.
### What type of PR is it?
Improvement
### Todos
* [x] Replace `printStackTrace()` with SLF4J logging
* [x] Add a descriptive exception message
* [x] Build the shaded interpreter JAR
### What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-6466
### How should this be tested?
The following commands were run successfully:
* `./mvnw test -pl zeppelin-interpreter --am`
* 126 tests passed
* `./mvnw clean package -pl zeppelin-interpreter,zeppelin-interpreter-shaded -DskipTests`
* Build succeeded
### Screenshots (if appropriate)
N/A
### Questions:
* Does the license files need to update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No
Closes #5362 from vividbaek/ZEPPELIN-6466-slf4j-repository-system-factory.
Signed-off-by: Jongyoul Lee <jo...@gmail.com>
---
.../zeppelin/dep/RepositorySystemFactory.java | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/RepositorySystemFactory.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/RepositorySystemFactory.java
index ae353f22e0..0c713cb96e 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/RepositorySystemFactory.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/RepositorySystemFactory.java
@@ -25,28 +25,30 @@ import org.eclipse.aether.spi.connector.RepositoryConnectorFactory;
import org.eclipse.aether.spi.connector.transport.TransporterFactory;
import org.eclipse.aether.transport.file.FileTransporterFactory;
import org.eclipse.aether.transport.http.HttpTransporterFactory;
-
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Get maven repository instance.
*/
public class RepositorySystemFactory {
+ private static final Logger LOGGER = LoggerFactory.getLogger(RepositorySystemFactory.class);
+
public static RepositorySystem newRepositorySystem() {
DefaultServiceLocator locator = MavenRepositorySystemUtils.newServiceLocator();
locator.addService(RepositoryConnectorFactory.class, BasicRepositoryConnectorFactory.class );
locator.addService(TransporterFactory.class, FileTransporterFactory.class);
locator.addService(TransporterFactory.class, HttpTransporterFactory.class);
- locator.setErrorHandler( new DefaultServiceLocator.ErrorHandler()
- {
- @Override
- public void serviceCreationFailed( Class<?> type, Class<?> impl, Throwable exception )
- {
- exception.printStackTrace();
- }
- } );
+ locator.setErrorHandler(new DefaultServiceLocator.ErrorHandler() {
+ @Override
+ public void serviceCreationFailed(Class<?> type, Class<?> impl, Throwable exception) {
+ LOGGER.error("Service creation failed for type {} impl {}", type, impl, exception);
+ }
+ });
RepositorySystem system = locator.getService(RepositorySystem.class);
if (system == null) {
- throw new RuntimeException();
+ throw new RuntimeException(
+ "Cannot create RepositorySystem (locator.getService returned null)");
}
return system;
}