Error: Unable to access jarfile target/*jar

AnonymousTRIAL

2 years ago

https://job-seeking-production.up.railway.app
I'm using spring boot application with mysql ..all process done but it application failed to respond that i hava use dockerfile

0 Replies

AnonymousTRIAL

2 years ago

ok what i do


2 years ago

explain why you have it like that, what is uvicorn doing in a dockerfile for a spring boot app?


2 years ago

uvicorn is typically used to run fastapi python apps


AnonymousTRIAL

2 years ago

ok ,that is 1st time i try to deploy the application


AnonymousTRIAL

2 years ago

so i try all method


2 years ago

do you use python at all in this project?


AnonymousTRIAL

2 years ago

no


2 years ago

then I don't see the purpose of including uvicorn


AnonymousTRIAL

2 years ago

ok


AnonymousTRIAL

2 years ago

now i remove it


2 years ago

okay


AnonymousTRIAL

2 years ago

ok,what keyword to use


AnonymousTRIAL

2 years ago

for host and post


AnonymousTRIAL

2 years ago

in docker


AnonymousTRIAL

2 years ago

hello brody


AnonymousTRIAL

2 years ago

help me man


AnonymousTRIAL

2 years ago

CMD webservice:app --host 0.0.0.0 --port $PORT


2 years ago

you said you didn't use python at all in this project, why are you using uvicorn??


2 years ago

do you use python in this project, yes or no


AnonymousTRIAL

2 years ago

no


2 years ago

okay


2 years ago

your CMD keyword should start the java server


AnonymousTRIAL

2 years ago

okay


AnonymousTRIAL

2 years ago

what keyword should i used


AnonymousTRIAL

2 years ago

FROM maven:3-openjdk-17 AS build
COPY . .
RUN mvn clean package -DskipTests

FROM openjdk:17.0.1-jdk-slim
COPY --from=build /target/jobseeking-0.0.1-SNAPSHOT.war jobseeking.war
EXPOSE 8080

ENTRYPOINT ["java", "-jar", "jobseeking.war"]


2 years ago

why even use a dockerfile? maybe nixpacks can build your app just fine


AnonymousTRIAL

2 years ago

ok, how to use nixpacks ?


2 years ago

remove the dockerfile


AnonymousTRIAL

2 years ago

now show like that brody

1167189819621908500


AnonymousTRIAL

2 years ago

bro


AnonymousTRIAL

2 years ago

are you there?


AnonymousTRIAL

2 years ago

Error: Unable to access jarfile target/*jar


2 years ago

are you building a jar file? if so, you likely have your paths wrong when you build or run the jar file


AnonymousTRIAL

2 years ago

how to correct the paths


2 years ago

i strongly recommend you familurelize yourself with the technologies you are trying to use


AnonymousTRIAL

2 years ago

Can you tell me the way to learn this technique?


2 years ago

same way you learn anything now-a-days, youtube videos


AnonymousTRIAL

2 years ago

Any youtube videos you recommend?


2 years ago

i dont know java and i dont personally watch programming youtube videos anyway


AnonymousTRIAL

2 years ago

Where do you learn from?


2 years ago

stack overflow


AnonymousTRIAL

2 years ago

it successfully run but it show application failed to response

1167323812942057500


2 years ago

please read this


AnonymousTRIAL

2 years ago

brody thank it's done


2 years ago

awesome




AnonymousTRIAL

2 years ago

you great


2 years ago

thank you


wfontelasTRIAL

9 months ago

49a1e42c-c61d-4f9c-973d-8528e0cf1a81