run in docker container error

I can run my project localhost without any issues, but it compile error when I run it in a Docker container. Could someone help me figure out why this might be happening
No description
19 Replies
JavaBot
JavaBot2w ago
This post has been reserved for your question.
Hey @noreva! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here. 💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.
Kale Vivi
Kale Vivi7d ago
It can't autowire the websecurityconfig. Did you take a look at that part of the code?
Kyo-chan
Kyo-chan7d ago
How do you run the same project, not in Docker? Have you tried running it as a packaged jar? Like, you might be running it with commandline parameters that you didn't put in the docker image. Or it may have a config file it finds fine inside your project's folder layout, but which isn't packaged in images. Many things like that may happen, so, details on how you run it.
noreva
norevaOP7d ago
I run it with IntelliJ. When it runs successfully, I build the Docker image again
No description
Kyo-chan
Kyo-chan7d ago
I'd try running it as a standalone jar in a neutral directory, from commandline
noreva
norevaOP7d ago
Yes but i don't find anything wrong
noreva
norevaOP7d ago
It shows the same error as in Docker, and I’m not sure why
No description
Kyo-chan
Kyo-chan7d ago
Check whether files that need to be there for your project, are in the jar. I'd first suspect .properties files "already there"? What are you showing?
noreva
norevaOP7d ago
i find .properties file need to be in my project, are in the jar I think there’s an issue with my security file configuration how i autowired
Kyo-chan
Kyo-chan7d ago
Okay if you're sure, but I have no idea how does your screenshot shows that Anyway, I don't know what I was thinking. You have access to the full stacktrace, so look at the last cause
noreva
norevaOP7d ago
this is full
Kyo-chan
Kyo-chan7d ago
Hmm. ClassGraph that doesn't give helpful information when it fails, that's a rather odd situation. Are your libs old? Are you using a lib that's not typically used in web projects?
noreva
norevaOP7d ago
Hmm, I have built it successfully in a neutral directory with the help of Claude AI. It needs to change the content of the pom file let me run with docker
Kyo-chan
Kyo-chan7d ago
By all means, don't hesitate to make that even vaguer
noreva
norevaOP7d ago
@Kyo-chan When I build my project with Docker and it fails, then I build it again and it succeeds. Is that normal?
No description
Kyo-chan
Kyo-chan7d ago
No, that doesn't fall under normalcy. Every time I've worked with Docker, it was supposed to work the first time directly
noreva
norevaOP7d ago
Do you know what it is wrong with my frontend?
No description
JavaBot
JavaBot7d ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.
Want results from more Discord servers?
Add your server