#Hi everyone!

70 messages · Page 1 of 1 (latest)

twin sphinx
#

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 !!

frank spindleBOT
#

This post has been reserved for your question.

Hey @twin sphinx! Please use /close or the Close 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.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

median merlin
#

you need to add dependencies in classpath as well @twin sphinx

twin sphinx
median merlin
#

use this to copy dependencies in target folder mvn install dependency:copy-dependencies

frank spindleBOT
# twin sphinx 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.

twin sphinx
#

with the same error

median merlin
#

using windows?

twin sphinx
median merlin
#

did dependency folder get generated in target?

twin sphinx
median merlin
#

its missing

#

can you paste output of maven here

twin sphinx
twin sphinx
median merlin
#

yes it should print out destination

twin sphinx
#

the part before that is a bit long, idk if you wnated that too

median merlin
#

nah this is good

#

see it says copying *.jar in [destination]

twin sphinx
median merlin
#

yes

#

idk why ls is not listing dependency folder

#

can you refresh?

#

anyway try java -cp "target/classes:target/dependency/*" task3.broker.JmsBrokerServer

twin sphinx
median merlin
#

try with *.jar instead

twin sphinx
#

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

median merlin
#

i know it works on windows thats where i know this from lol

twin sphinx
median merlin
twin sphinx
median merlin
#

can you see dependency folder?

twin sphinx
median merlin
twin sphinx
median merlin
#

this is weird

#

why wont it copy

twin sphinx
#

maybe if I rerun the command

#

I executed mvn clean compile

#

oh

#

oh

#

clean

#

that may have cleaned it , right ?

median merlin
#

maybe

#

not sure

twin sphinx
#

I will try to rerun what you gave me, one second

#

thank you for your patience !

frank spindleBOT
# twin sphinx thank you for your patience !

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.

twin sphinx
#

there it is :)

#

sorry for being that clumsy

median merlin
#

its okay, does it run now?

twin sphinx
#

I'll try it right now

twin sphinx
#

It runs

median merlin
#

halleuja

twin sphinx
#

Thank you so so much

median merlin
#

idk how to spell that

twin sphinx
#

I cant express how thankful I am for your help

#

I spent so many hours reading some poorly written articles online about java classpaths

twin sphinx
#

thank you !! :)