I am super stuck with trying to run my program thats written for using activemq as a jms provider. I dont know what else to try or what documentation to read. Currently my project is in maven. But to me it doesnt matter whether it runs with or without maven.
I execute mvn clean compile and it builds. Then I am in the folder my pom.xml resides in and execute java -cp target/classes task3.broker.JmsBrokerServer
I have 3 packages task3.broker , task3.client and task3.common. And I wanna run this file.
I get the follwing error (translated)
Error: Main class task3.broker.JmsBrokerServer can not be initialized
Cause: java.lang.NoClassDefFoundError: javax/jms/JMSException
If there is any information you'd need in order to help me just let me know, I will provide it as soon and as precise as I can. Thanks in advance !!
#Hi everyone!
70 messages · Page 1 of 1 (latest)
⌛ This post has been reserved for your question.
Hey @twin sphinx! Please use
/closeor theClose Postbutton above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed 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.
you need to add dependencies in classpath as well @twin sphinx
could I kindly ask you for help on how to do that properly, I am quite lost when it comes to that
use this to copy dependencies in target folder mvn install dependency:copy-dependencies
@twin sphinx
I'll do it right now
thank you
If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
so after it finished I compiled again and still it fails
with the same error
using windows?
manjaro vm
did dependency folder get generated in target?
doesnt look like it to me, or am I missing it ?
sure , give me a second
wait what output exactly , the one from the dependency installation ?
yes it should print out destination
thats after all the download info
the part before that is a bit long, idk if you wnated that too
is that good ?
yes
idk why ls is not listing dependency folder
can you refresh?
anyway try java -cp "target/classes:target/dependency/*" task3.broker.JmsBrokerServer
same error unfortunately (its in german I can translate it if you want)
try with *.jar instead
like this ?
would it help you if I showed you what my grouppartners windows ide provides for when he presses the play button ?
it works on his windows machine
i know it works on windows thats where i know this from lol
lol I understand
try this without double quotes
same error :/
can you see dependency folder?
no
this image suggests it created it
I know I know but even after closing and reopening the terminal it gives me this
maybe if I rerun the command
I executed mvn clean compile
oh
oh
clean
that may have cleaned it , right ?
If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
Yes ! it was the clean
there it is :)
sorry for being that clumsy
its okay, does it run now?
I'll try it right now
halleuja
Thank you so so much
idk how to spell that