Fix MfApi ClassNotFound by passing Java classpath via ArgumentList.

Use ct-ZADBService and explicit MfClientLibPath so SMC restart finds client JARs.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-24 10:16:01 +02:00
co-authored by Cursor
parent d27e721475
commit a89a7ad4b6
5 changed files with 349 additions and 109 deletions
@@ -345,16 +345,21 @@ public sealed class SonicManagementClient : IDisposable
$"Domain={_connection.DomainName}; ConnectionUrl={_connection.ConnectionUrl}\n{output}");
}
string libHint = string.IsNullOrWhiteSpace(_connection.MfClientLibPath)
? _connection.SonicHome
: _connection.MfClientLibPath;
return (false, "Neustart fehlgeschlagen (MfApi)",
"Laut Doku (Management Application API / wie SMC-Restart):\n" +
"JMSConnectorClient + MFProxyFactory.createAgentProxy + IAgentProxy.restart\n\n" +
$"Container '{containerName}', Domain '{_connection.DomainName}', URL {_connection.ConnectionUrl}\n" +
$"Fehler: {error}\nAusgabe: {output}\n\n" +
"Benötigt (SMC-Installation):\n" +
$"- SonicHome={_connection.SonicHome} mit lib\\*.jar (mgmt_client / mfcontext / sonic_Client)\n" +
"- Java (JavaHome/JavaPath oder JRE unter SonicHome)\n" +
$"- MfClientLibPath/SonicHome={libHint} (mgmt_client.jar, mfcontext.jar, sonic_Client.jar)\n" +
$"- JavaPath={_connection.JavaPath}\n" +
"- Dieselben ConnectionUrl/User/Pass wie beim SMC-Login\n" +
"Hinweis: stopcontainer.bat wird nicht verwendet (in SMC-only Versionen oft nicht vorhanden).");
"SMC-ObjectName Beispiel: proalpha-test.ct-ZADBService:ID=AGENT → ContainerName=ct-ZADBService\n" +
"Hinweis: stopcontainer.bat wird nicht verwendet (SMC-only).");
}
private static async Task<bool> IsTcpReachableAsync(string connectionUrl, CancellationToken cancellationToken)