Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot invoke "java.net.URL.getProtocol()" because "baseCommitLink" is null #352

Open
mumblingMac opened this issue Oct 31, 2024 · 2 comments
Assignees

Comments

@mumblingMac
Copy link

mumblingMac commented Oct 31, 2024

We are upgrading from Bitbucket Push and Pull Request 2.8.3 to 3.1.2.

In our test development environment, it triggers the job however, it appears to be failing due to "java.net.URL.getProtocol()". It appears that the bitbucket administrators do not allow cloning over https. It is my guess that I may need to use the Propagation URL; however I can not find any documentation on what should be put in there.

Can anyone assist in helping me determine if this is a configuration issue, or an actual issue with the plugin.

2024-10-31 17:47:15.947+0000 [id=108]   INFO    i.j.p.b.p.BitBucketPPRPayloadProcessorFactory#createProcessor: Create BitBucketPPRPullRequestServerPayloadProcessor
2024-10-31 17:47:17.098+0000 [id=238]   INFO    i.j.p.b.common.BitBucketPPRUtils#lambda$matches$2: Matched branch: 
2024-10-31 17:47:17.099+0000 [id=238]   INFO    i.j.p.b.common.BitBucketPPRUtils#lambda$matches$2: Matched branch: 
2024-10-31 17:47:17.100+0000 [id=238]   INFO    i.j.p.b.BitBucketPPRTrigger#scheduleJob: Commit passed to git: 859b5b1bd27f8fc4c9c5b99535c80dab4d6c971d
2024-10-31 17:47:23.499+0000 [id=238]   INFO    i.j.p.b.BitBucketPPRTrigger#scheduleJob: Triggering on_pull_request_event # 2
2024-10-31 17:47:23.507+0000 [id=238]   INFO    i.j.p.b.o.BitBucketPPRObservable#notifyObservers: Event: BitBucketPPRBuildStarted [context=BitBucketPPREventContext [scmTrigger=hudson.plugins.git.GitSCM@61eb63d5, run=bitbucket_webhooks/<random_repo>/on_pull_request_event #2, action=BitBucketPPRPullRequestServerAction, filter=io.jenkins.plugins.bitbucketpushandpullrequest.filter.pullrequest.server.BitBucketPPRPullRequestServerTriggerFilter@56ac4b3c, userRemoteConfig=null => ssh://git@bitbucket.<random_company>.com:7999/<random_project>/<random_repo>.git (null), url=ssh://git@bitbucket.<random_company>.com:7999/<random_project>/<random_repo>.git, trigger=io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRTrigger@47ccd31b[]], handler=null] for observer io.jenkins.plugins.bitbucketpushandpullrequest.observer.BitBucketPPRPullRequestServerObserver@50d516af
2024-10-31 17:47:23.508+0000 [id=238]   INFO    i.j.p.b.e.BitBucketPPRBuildStarted#runHandler: Cannot invoke "java.net.URL.getProtocol()" because "baseCommitLink" is null

After reviewing the code base, I added https://bitbucket.<random_company>.com to the Propagation URL in the System Configuration; however I continue to get the baseCommitLink is null.

P.S.

I had to sanitize the output above and inserted <random_company>, <random_project>, and <random_repo> to place of the actual values.

@mumblingMac mumblingMac changed the title Error Message Received During NotifyObservers. Cannot invoke "java.net.URL.getProtocol()" because "baseCommitLink" is null Nov 1, 2024
@cdelmonte-zg cdelmonte-zg self-assigned this Nov 4, 2024
@cdelmonte-zg
Copy link
Contributor

@mumblingMac DId you restart Jenkins after setting the propagation URL?

@mumblingMac
Copy link
Author

I have this inside the Configuration as Code under the unclassified: section

  bitBucketPPRPluginConfig:
    credentialsId: "bitbucket-ci-token"
    notifyBitBucket: true
    propagationUrl: "https://bitbucket.<random_company>.com"
    useJobNameAsBuildKey: false

However, it doesn't seem to be loading the configuration upon start up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants