I have added the files messages.properties and post-commit provided and able to see issue[1].
~~~~~~~~~~~~~~~~
[anijhawa@anijhawa bin]$ ls -la /jboss/abc/NotBackedUp/BPM/RHPAM7.7/jboss-eap-7.2/bin/githook
total 16
drwxr-xr-x. 2 anijhawa anijhawa 4096 May 18 08:19 .
drwxr-xr-x. 9 anijhawa anijhawa 4096 May 18 08:19 ..
rw-rw-r-. 1 anijhawa anijhawa 1156 May 18 08:19 messages.properties
-rwxr-xr-x. 1 anijhawa anijhawa 1023 May 18 08:01 post-commit
~~~~~~~~~~~~~
~~~~~~~~~~~~~~~`
[anijhawa@anijhawa bin]$ cat /jboss/abc/NotBackedUp/BPM/RHPAM7.7/jboss-eap-7.2/bin/post-commit
#!/bin/sh
echo "post-commit >>>>>>>>>>>>>>>>>>>> BEGIN GitHook Path: '${GITHOOK_PATH}'. Git Repo Path: '${REPO_GIT_PATH}'"
git push origin master
RESULT=$?
echo "post-commit >>>>>>>>>>>>>>>>>>>> END. Result: '${RESULT}', Git Repo Path: '${GITHOOK_PATH}'"
exit 0
cat /jboss/abc/NotBackedUp/BPM/RHPAM7.7/jboss-eap-7.2/bin/messages.properties
#
- -Dappformer.git.hooks.bundle=/opt/kie/data/git/messages.properties
- https://access.redhat.com/documentation/en-us/red_hat_decision_manager/7.7/html-single/configuring_business_central_settings_and_properties/index#managing-business-central-customizing-githook-notifications-proc
#
- 0 Green Success! All working as expected.
- 1 to 30 Orange Warning! Please check the logs and advise your admin.
- 31 to 255 Red Error! Please advise your admin immediately.
#
0=[GITHOOK] Success! All working as expected. OK it is working
1=[GITHOOK] Warning! The Repo Name starts with a black prefix.
2=[GITHOOK] Warning! Please check the logs and advise your admin.
31=[GITHOOK] Error! Please advise your admin immediately.
50=[GITHOOK] Problem in .gitremote file properties.
51=[GITHOOK] This project will not be pushed to remote repo as it is name matches
60=[GITHOOK] Error! Review the repo name and the space name. They are mandatory
70=[GITHOOK] Error! Review the URL for reference, it is not exist and it is mandatory
100=[GITHOOK] Error 100!
128=[GITHOOK] Error in git push operation. Please check the logs.
255=[GITHOOK] Error 255!
#
- EOF
~~~~~~~~~~~`
Here is startup command.
./standalone.sh --debug -c standalone-full.xml -Dappformer.git.hooks.bundle=/jboss/abc/NotBackedUp/BPM/RHPAM7.7/jboss-eap-7.2/bin/githook/messages.properties -Dorg.uberfire.nio.git.hooks=/jboss/abc/NotBackedUp/BPM/RHPAM7.7/jboss-eap-7.2/bin/githook
Here is REST request to create project.
curl -v -k -H 'accept: application/json' -H 'Content-Type: application/json' -u rhpamAdmin:admin@123 -X POST -i http://localhost:8080/business-central/rest/spaces/MySpace/projects -d '
{"name":"testProj", "description": "A Test Project", "groupId": "com.redhat.cee.example","version":"1.0-SNAPSHOT" }
'
[1]
Here is server.log
08:13:24,938 ERROR [org.guvnor.common.services.project.backend.server.WorkspaceProjectServiceImpl] (Thread-168) Error trying to create project: java.lang.RuntimeException: Exception cleaning and unsetting batch mode on FS.
at org.uberfire.io.impl.AbstractIOService.endBatch(AbstractIOService.java:160)
at org.kie.workbench.common.services.backend.project.ModuleSaver.save(ModuleSaver.java:102)
at org.kie.workbench.common.services.backend.project.KieModuleServiceImpl.newModule(KieModuleServiceImpl.java:107)
at org.kie.workbench.common.services.backend.project.KieModuleServiceImpl.newModule(KieModuleServiceImpl.java:48)
at org.kie.workbench.common.services.backend.project.KieModuleServiceImpl$Proxy$_$$_WeldClientProxy.newModule(Unknown Source)
at org.guvnor.common.services.project.backend.server.WorkspaceProjectServiceImpl.lambda$newProject$1(WorkspaceProjectServiceImpl.java:262)
at org.guvnor.structure.backend.organizationalunit.config.SpaceConfigStorageRegistryImpl$SpaceStorageBatchImpl.run(SpaceConfigStorageRegistryImpl.java:104)
at org.guvnor.common.services.project.backend.server.WorkspaceProjectServiceImpl.newProject(WorkspaceProjectServiceImpl.java:235)
at org.guvnor.common.services.project.backend.server.WorkspaceProjectServiceImpl.newProject(WorkspaceProjectServiceImpl.java:218)
at org.guvnor.common.services.project.backend.server.WorkspaceProjectServiceImpl.newProject(WorkspaceProjectServiceImpl.java:205)
at org.guvnor.common.services.project.backend.server.WorkspaceProjectServiceImpl.newProject(WorkspaceProjectServiceImpl.java:194)
at org.guvnor.common.services.project.backend.server.WorkspaceProjectServiceImpl.newProject(WorkspaceProjectServiceImpl.java:185)
at org.guvnor.rest.backend.JobRequestHelper.createProject(JobRequestHelper.java:174)
at org.guvnor.rest.backend.JobRequestHelper$Proxy$_$$_WeldClientProxy.createProject(Unknown Source)
at org.guvnor.rest.backend.cmd.CreateProjectCmd.internalExecute(CreateProjectCmd.java:44)
at org.guvnor.rest.backend.cmd.AbstractJobCommand.run(AbstractJobCommand.java:93)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
at org.jboss.errai.bus.server.api.RpcContext.getServletRequest(RpcContext.java:84)
at org.guvnor.structure.backend.repositories.git.hooks.impl.MessageReader.lambda$new$0(MessageReader.java:49)
at org.guvnor.structure.backend.repositories.git.hooks.impl.MessageReader.resolveMessage(MessageReader.java:86)
at org.guvnor.structure.backend.repositories.git.hooks.impl.PostCommitNotificationServiceImpl.notifyUser(PostCommitNotificationServiceImpl.java:62)
at org.guvnor.structure.backend.repositories.git.hooks.impl.PostCommitNotificationServiceImpl$Proxy$_$$_WeldClientProxy.notifyUser(Unknown Source)
at org.guvnor.structure.backend.repositories.git.GitRepositoryBuilder.lambda$postCommitCallback$1(GitRepositoryBuilder.java:187)
at org.uberfire.java.nio.fs.jgit.util.extensions.JGitFSHooks.executeHook(JGitFSHooks.java:46)
at org.uberfire.java.nio.fs.jgit.util.extensions.JGitFSHooks.executeFSHooks(JGitFSHooks.java:39)
at org.uberfire.java.nio.fs.jgit.JGitFileSystemImpl.notifyPostCommit(JGitFileSystemImpl.java:533)
at org.uberfire.java.nio.fs.jgit.JGitFileSystemProvider.postCommitHook(JGitFileSystemProvider.java:2543)
at org.uberfire.java.nio.fs.jgit.JGitFileSystemProvider.setAttribute(JGitFileSystemProvider.java:2282)
at org.uberfire.java.nio.file.Files.setAttribute(Files.java:687)
at org.uberfire.io.impl.AbstractIOService.unsetBatchModeOn(AbstractIOService.java:193)
at org.uberfire.io.impl.AbstractIOService.cleanUpAndUnsetBatchModeOnFileSystems(AbstractIOService.java:168)
at org.uberfire.io.impl.AbstractIOService.endBatch(AbstractIOService.java:158)
... 18 more