SVNKit not transport precommit-messages

I can not read the pre-commit messages if the commit fail.

!ENTRY org.eclipse.team.svn.core.svnnature 4 0 2021-08-03 13:37:02.989
!MESSAGE SVN: '0x00000114: Commit' operation finished with error
!SUBENTRY 1 org.eclipse.team.svn.core.svnnature 4 0 2021-08-03 13:37:02.989
!MESSAGE Some of selected resources were not committed.
!STACK 0
org.eclipse.team.svn.core.connector.SVNConnectorException: svn: E165001: Commit failed (details follow):
	at org.eclipse.team.svn.core.operation.SVNProgressMonitor.progress(SVNProgressMonitor.java:50)
	at org.polarion.team.svn.connector.svnkit.SVNKitService$ProgressMonitorWrapper.notify(SVNKitService.java:139)
	at org.eclipse.team.svn.core.utility.SVNNotificationComposite.notify(SVNNotificationComposite.java:51)
	at org.polarion.team.svn.connector.svnkit.ConversionUtility$Notify2Wrapper.onNotify(ConversionUtility.java:926)
	at org.tmatesoft.svn.core.javahl17.JavaHLEventHandler.handleEvent(JavaHLEventHandler.java:64)
	at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.handleEvent(SvnOperationRunner.java:67)
	at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgCommit.doRun(SvnNgCommit.java:284)
	at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgCommit.run(SvnNgCommit.java:145)
	at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgCommit.run(SvnNgCommit.java:1)
	at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgOperationRunner.run(SvnNgOperationRunner.java:20)
	at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:21)
	at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1235)
	at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294)
	at org.tmatesoft.svn.core.wc2.SvnCommit.run(SvnCommit.java:198)
	at org.tmatesoft.svn.core.javahl17.SVNClientImpl.commit(SVNClientImpl.java:502)
	at org.polarion.team.svn.connector.svnkit.SVNKitConnector.commit(SVNKitConnector.java:494)
	at org.eclipse.team.svn.core.extension.factory.ThreadNameModifier.commit(ThreadNameModifier.java:114)
	at org.eclipse.team.svn.core.operation.local.CommitOperation$2.run(CommitOperation.java:130)
	at org.eclipse.team.svn.core.utility.ProgressMonitorUtility.doSubTask(ProgressMonitorUtility.java:118)
	at org.eclipse.team.svn.core.operation.AbstractActionOperation.protectStep(AbstractActionOperation.java:156)
	at org.eclipse.team.svn.core.operation.AbstractActionOperation.protectStep(AbstractActionOperation.java:151)
	at org.eclipse.team.svn.core.operation.local.CommitOperation.performCommit(CommitOperation.java:127)
	at org.eclipse.team.svn.core.operation.local.CommitOperation.runImpl(CommitOperation.java:98)
	at org.eclipse.team.svn.core.operation.AbstractActionOperation.run(AbstractActionOperation.java:82)
	at org.eclipse.team.svn.core.utility.ProgressMonitorUtility.doTask(ProgressMonitorUtility.java:104)
	at org.eclipse.team.svn.core.operation.CompositeOperation.runImpl(CompositeOperation.java:99)
	at org.eclipse.team.svn.core.operation.AbstractActionOperation.run(AbstractActionOperation.java:82)
	at org.eclipse.team.svn.core.operation.LoggedOperation.run(LoggedOperation.java:40)
	at org.eclipse.team.svn.core.utility.ProgressMonitorUtility.doTask(ProgressMonitorUtility.java:104)
	at org.eclipse.team.svn.core.utility.ProgressMonitorUtility.doTaskExternal(ProgressMonitorUtility.java:90)
	at org.eclipse.team.svn.ui.utility.WorkspaceModifyCancellableOperationWrapper.execute(WorkspaceModifyCancellableOperationWrapper.java:58)
	at org.eclipse.ui.actions.WorkspaceModifyOperation.lambda$0(WorkspaceModifyOperation.java:110)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2313)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2338)
	at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:131)
	at org.eclipse.team.svn.ui.utility.SVNTeamOperationWrapper.run(SVNTeamOperationWrapper.java:35)
	at org.eclipse.team.internal.ui.actions.JobRunnableContext.run(JobRunnableContext.java:155)
	at org.eclipse.team.internal.ui.actions.JobRunnableContext$ResourceJob.runInWorkspace(JobRunnableContext.java:83)
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:42)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
!SUBENTRY 1 org.eclipse.team.svn.core.svnnature 4 0 2021-08-03 13:37:02.989
!MESSAGE Some of selected resources were not committed.
!STACK 0
java.lang.reflect.InaccessibleObjectException: Unable to make field private java.lang.Throwable java.lang.Throwable.cause accessible: module java.base does not "opens java.lang" to unnamed module @24dbdfa0
	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:357)
	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
	at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:177)
	at java.base/java.lang.reflect.Field.setAccessible(Field.java:171)
	at org.tmatesoft.svn.core.javahl17.SVNClientImpl.getClientException(SVNClientImpl.java:1547)
	at org.tmatesoft.svn.core.javahl17.SVNClientImpl.commit(SVNClientImpl.java:504)
	at org.polarion.team.svn.connector.svnkit.SVNKitConnector.commit(SVNKitConnector.java:494)
	at org.eclipse.team.svn.core.extension.factory.ThreadNameModifier.commit(ThreadNameModifier.java:114)
	at org.eclipse.team.svn.core.operation.local.CommitOperation$2.run(CommitOperation.java:130)
	at org.eclipse.team.svn.core.utility.ProgressMonitorUtility.doSubTask(ProgressMonitorUtility.java:118)
	at org.eclipse.team.svn.core.operation.AbstractActionOperation.protectStep(AbstractActionOperation.java:156)
	at org.eclipse.team.svn.core.operation.AbstractActionOperation.protectStep(AbstractActionOperation.java:151)
	at org.eclipse.team.svn.core.operation.local.CommitOperation.performCommit(CommitOperation.java:127)
	at org.eclipse.team.svn.core.operation.local.CommitOperation.runImpl(CommitOperation.java:98)
	at org.eclipse.team.svn.core.operation.AbstractActionOperation.run(AbstractActionOperation.java:82)
	at org.eclipse.team.svn.core.utility.ProgressMonitorUtility.doTask(ProgressMonitorUtility.java:104)
	at org.eclipse.team.svn.core.operation.CompositeOperation.runImpl(CompositeOperation.java:99)
	at org.eclipse.team.svn.core.operation.AbstractActionOperation.run(AbstractActionOperation.java:82)
	at org.eclipse.team.svn.core.operation.LoggedOperation.run(LoggedOperation.java:40)
	at org.eclipse.team.svn.core.utility.ProgressMonitorUtility.doTask(ProgressMonitorUtility.java:104)
	at org.eclipse.team.svn.core.utility.ProgressMonitorUtility.doTaskExternal(ProgressMonitorUtility.java:90)
	at org.eclipse.team.svn.ui.utility.WorkspaceModifyCancellableOperationWrapper.execute(WorkspaceModifyCancellableOperationWrapper.java:58)
	at org.eclipse.ui.actions.WorkspaceModifyOperation.lambda$0(WorkspaceModifyOperation.java:110)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2313)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2338)
	at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:131)
	at org.eclipse.team.svn.ui.utility.SVNTeamOperationWrapper.run(SVNTeamOperationWrapper.java:35)
	at org.eclipse.team.internal.ui.actions.JobRunnableContext.run(JobRunnableContext.java:155)
	at org.eclipse.team.internal.ui.actions.JobRunnableContext$ResourceJob.runInWorkspace(JobRunnableContext.java:83)
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:42)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

Hello Peter,
thank you for reporting this bug. This happens because we want to initialize the exception cause field. We this is not mandatory, we do that only for user convenience, otherwise the ClientException would have an error message but not the stacktrace of the exception that caused that error.

I have the following idea how to solve this problem: I’ll create an utility class in the same package as the ClientException class, this class will be able construct ClientException with any “cause” because ClientException’s constructor has package-local access.

I had another idea to override getCause() in some ClientException’s subclass but I’m afraid that getCause() differing from “cause” field might cause issues.

If you have better ideas please share, otherwise I’ll fix the problem that way.

I’ve created an issue for that and fixed it in the trunk:

https://issues.tmatesoft.com/issue/SVNKIT-761

The fix will be included into the next SVNKit release, otherwise you can build SVNKit from sources or temporarily allow reflective access in Java as a work-around.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=575213

temporarily allow reflective access in Java as a work-around.

I am not your homer. Give that suggestion yourself.