I cannot use spring boot application on AWS EC2
Basically i have a running application on localhost, when i try to run my application on Aws ec2 , it gives me errors and i cannot understand why.
I uploaded the full error file but here is what is i think causing the issue:
40 Replies
⌛
This post has been reserved for your question.
Hey @Ed! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose Post
button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
1-
2-
my networkcontroller class:
my GeoserviceImpl:
my code is functioning 100% offline but not online
Are you deploying this as a Jar?
yeah
Does the Jar work locally
i haven't tested 1 sec
no actually no
but it works from inside intellije
IntelliJ != Jar
Welcome to learning that the hard way
What is in
geo-lite.mmdb
?i have no idea, i am coding with a friend, we are doing backend for a speedtesting website
he is using it for finding geo location of the user
If it is just Static Data, you could encode that into the Application.
i think it is i couldn't even read it
Otherwise you're doing access a little wrong

its been 3 hours i am trying to figure out why aws is not working, i tried running the server as .war on tomcat , then jar but nothing seems to work
Remove the
classpath:
, bundle to a Jar, try again locally
We're not in the classpath
, we're in the Resources Directory.i couldn't understand
its still not working: here is the highlights of the issue:
(The system cannot find the file specified)
should my string be something like this:
Maybe? Been a while since I did this
I just know we're not on the classpath
it didnt work
i fixed it!!!!
What was the fix?
jar doesnt access file like normal device does
must be through inputstream
It's really weird depending on the Class Loader.
now it runs in windows i hope it runs on aws
If the Jar ran, it'll run
i hope i really hope
i am 4 hours past my bed time from this error
IT DIDNT RUN
fml
did the jar run locally?
yeah
sorry i uploaded a lot i think
how big is that file?
51mb
jar is 54 mb, the geo thing is 69 mbs
How much RAM is in your EC2 instead?
instance*
Since you're running out of Heap
i might have fixed it with this java -Xmx6g myprogram
it should be 30 i believe
ITS FUCKING WORKING 😄
32 GB?
beautiful error

i think so yeah
Well, good job
they dont mention actually but i think it was 32
tyty
i appreciate your help man
Its time for me to go to bed
good night friend
Post Closed
This post has been closed by <@351059014341099521>.