#nimby_09436
1 messages · Page 1 of 1 (latest)
what's the 500 error exactly?
I get the following: [500] POST http://localhost:8080/webhook [evt_3Nute6JsvgNOF5oj0sqnsiG4]
2023-09-27 10:03:04 <-- [500] POST http://localhost:8080/webhook [evt_3Nute6JsvgNOF5oj0v7wBDmF]
2023-09-27 10:03:04 <-- [500] POST http://localhost:8080/webhook [evt_3Nute6JsvgNOF5oj0N1sCgcr]
what are the logs from your server (the one running at localhost:8080) saying are happening that causes the 500?
I cannot find that info, but I can see the test webhook endpoint being hit instead in the dashboard
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
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
interesting! sounds like your project's classpath is broken or something
I'd try reinstalling our library (https://github.com/stripe/stripe-java#installation) and restarting the process and things like that
Okay thank you I will try that. I have recently changed the dependency to a more recent version, is it possible that is related?
yep
I've tried reinstalling but no luck, do you have any idea why the hosted endpoint would be hit instead of the local listener?
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
I see, thanks
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?
Yes I think so
can you confirm?
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
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
Okay thank you, I'll keep trying