Can't upload pre-commit hook to bitbucket

Hi I am new to bitbucket and trying to write my own bitbucket pre-commit hook.  I am using this example as a reference.  Here are my configurations.  I am getting the following exeception 

 

<atlassian-plugin key="the.test" name="name" plugins-version="3">
<plugin-info>
<description>Provides a Hook for Bitbucket Server, which allows pushes to be denied</description>
<version>1</version>
<permissions>
<permission>execute_java</permission>
</permissions>

</plugin-info>

<repository-hook key="disableRefChanges" name="Disable Ref Changes" class="ccom.jpmchase.rft.joyce.hooks.ProtectRefHook">
<description>Disables changes to a specified reference (branch or tag) in this repository</description>
<config-form name="Ref Hook Config" key="refHook-config">
<view>com.atlassian.bitbucket.repository.hook.ref.formContents</view>
<directory location="/static/"/>
</config-form>
<!-- Validators can be declared separately -->
</repository-hook>

</atlassian-plugin>

 

 

 

java.lang.NullPointerException: null
        at com.atlassian.plugin.osgi.util.OsgiHeaderUtil.getPluginKey(OsgiHeaderUtil.java:381)
        at com.atlassian.plugin.impl.AbstractPlugin.install(AbstractPlugin.java:424)
        at com.atlassian.plugin.manager.DefaultPluginManager.addPlugins(DefaultPluginM
anager.java:1178)

 

Looking at the code of the class throwing the exception, I am guessing bundleName or version is null?  Where are those values coming from?

https://searchcode.com/codesearch/view/33985588/

I am using Bitbucket version 1.4.4

 

Thanks in advance,

Neil

1 answer

rther the bitbucket version is v4.14.4

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

455 views 5 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you