#nimby_09436

1 messages · Page 1 of 1 (latest)

mystic bayBOT
stiff radish
#

what's the 500 error exactly?

lone latch
stiff radish
#

what are the logs from your server (the one running at localhost:8080) saying are happening that causes the 500?

lone latch
#

I cannot find that info, but I can see the test webhook endpoint being hit instead in the dashboard

stiff radish
#

you need to find that info since that's where the 500 comes from, so it's the first step to debugging what's happening

lone latch
#

I have found the following: java.lang.NoClassDefFoundError: Could not initialize class com.stripe.net.ApiResource as well as: org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class com.stripe.net.ApiResource

stiff radish
#

interesting! sounds like your project's classpath is broken or something

lone latch
#

Okay thank you I will try that. I have recently changed the dependency to a more recent version, is it possible that is related?

stiff radish
#

yep

lone latch
#

I've tried reinstalling but no luck, do you have any idea why the hosted endpoint would be hit instead of the local listener?

stiff radish
#

well they'll both be hit if you have two endpoints

#

an Event gets created on your account and it's sent to all webhook endpoints on your account that listen to that event type

lone latch
#

I see, thanks

lone latch
#

I've found the problem line is: Event event = Webhook.constructEvent(payload, header, webhookSecret); but not sure what the problem is, do you have any idea?

stiff radish
#

and what error does that line throw?

#

the NoClassDefFoundError one from earlier?

lone latch
#

Yes I think so

stiff radish
#

can you confirm?

lone latch
#

Yes it is the following: Exception in handleWebhookEvent() with cause = 'NULL' and exception = 'Could not initialize class com.stripe.net.ApiResource'

java.lang.NoClassDefFoundError: Could not initialize class com.stripe.net.ApiResource

stiff radish
#

but in any case, I don't have a better suggestion than trying to reinstall the library and maybe start with a fresh project, it seems like a problem with the dependencies not being installed properly

lone latch
#

Okay thank you, I'll keep trying