-
1. Re: Problem with deployed .jar files
peterj May 18, 2007 10:41 AM (in response to monze2)A jar file is deployed only it it contains EJBs (or a message-driven POJO or possibly other things that I can't recall right now). If the jar file contains only library classes, it is not deployed. If you have a jar file containing EJBs that needs a library jar, you should package both of them in an ear file.
-
2. Re: Problem with deployed .jar files
monze2 May 18, 2007 11:30 AM (in response to monze2)Thanks for the reply.
What you are witting is not wrong, the problem can be solved be deploying it as a EAR file. Then the exception 'ClassNotFoundException' will be shown.
However, that does not solve the problem that I'am talking about. If I deploy one jar file, that depends on another jar file, the execution of the first jar file will stop without any errors or warnings, if the second jar file is missing.
Should the missing jar files not also result in a 'ClassNotFoundException'?
jacob m -
3. Re: Problem with deployed .jar files
peterj May 18, 2007 11:55 AM (in response to monze2)Should the missing jar files not also result in a 'ClassNotFoundException'?
That depends entirely on the class that is missing. I guess I would need to know more about the contents of your two jar files. And what you put into META-INF/application.xml if you packaged them as an ear file. -
4. Re: Problem with deployed .jar files
monze2 May 18, 2007 12:19 PM (in response to monze2)First of all, that that you will take your time to help me.
I don't pack them as EAR files. I'm deploying a jar file, and "forget" to deploy the second jar file.
The content of the jar files is very simply. They both contain another jar file, which have one class, that print text to the screen (it is the way things are written where I work).
e.g.
jar1>
write "I'm alive"
use jar2 to print a line
write "I will never be written"
jar2>
write "I don't exist"
The result is:
"I'm alive"
If I deploy both jar files it works fine. But when I 'forget' the second jar file the program stop.
If I use 'java -cd jar1.jar ...' and it can find the second file, i get a 'ClassNotFoundException'. If I run them from eclipse, I get a 'ClassNotFoundException'. But in JBoss I get nothing...? No print to the error log, no print to the screen, nothing... the first jar files simple stops, and JBoss keep working as nothing has ever happened.
I can show the code, but i guess it will be just as easy for you to create the test your self.
jacob m -
5. Re: Problem with deployed .jar files
peterj May 18, 2007 3:10 PM (in response to monze2)It sounds as if you have a simple class, not an EJB, is that correct? If so, as I said in my first reply, such a jar file will not deploy.
Perhaps you should post the source for the class.