Re: NoClassDefFoundError while running test
We found the solution: We did cvs exports with timestamps to find the day when the build broke and did a diff of the project before and after. Then we noticed we removed a static block of code in our tests to set a conf file. The problem was passing -D to maven wasn't getting passed for the test. One has to use the maven.junit.sysproperties property. Adding that worked. Here's my theory: The JAR we use needs the conf. It has some code in static blocks which needs the conf. Without it, it throws an exception or something, which means the JAR is unavailable. With the JAR unavailable, our code can't link and we get NoClassDefFoundError. Very strange to have this error with a JAR in the classpath! -Michael -- This E-mail is confidential. It may also be legally privileged. If you are not the addressee you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return E-mail. Internet communications cannot be guaranteed to be timely, secure, error or virus-free. The sender does not accept liability for any errors or omissions. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: NoClassDefFoundError while running test
> Can you be a little more specific? I'm assuming you're using Maven > 1.x...? Also, which class is it trying unsuccessfully to find? > > Without that info, it'll be hard-to-impossible for anyone to help much, > I'm afraid... The classes are in a JAR file in one of my dependency JARs. The JAR is supplied by our customer. Sorry I forgot to mention that I'm using Maven 1.0.2. I'd like to upgrade to 1.1 but I'm afraid of having problems with the plugins, such as the Clover plugin. If most of them work then I may try upgrading to see if it works better. -Michael -- This E-mail is confidential. It may also be legally privileged. If you are not the addressee you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return E-mail. Internet communications cannot be guaranteed to be timely, secure, error or virus-free. The sender does not accept liability for any errors or omissions. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: NoClassDefFoundError while running test
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Can you be a little more specific? I'm assuming you're using Maven 1.x...? Also, which class is it trying unsuccessfully to find? Without that info, it'll be hard-to-impossible for anyone to help much, I'm afraid... - -john Michael Mattox wrote: | For some reason my project is giving me NoClassDefFoundError while running | my unit tests. It's happening on both the server and on my PC so I know | it's not the environment. The project compiles so I know the dependency | is correct. I run maven with -X and I see the JAR in the list (at the | top) so I know the JAR is in the classpath. I have no idea why I would | get a NoClassDefFoundError. How can it not find the classes? I've opened | up the JAR with winzip and the classes are inside. The project has been | working for a month now and then it seems to have stopped. I'm really | stuck on this. If anyone has any ideas on how this could even be possible | I'd appreciate it. | | Thanks, | Michael | | | | -- | This E-mail is confidential. It may also be legally privileged. If you are | not the addressee you may not copy, forward, disclose or use any part of it. | If you have received this message in error, please delete it and all copies | from your system and notify the sender immediately by return E-mail. | Internet communications cannot be guaranteed to be timely, secure, error or | virus-free. The sender does not accept liability for any errors or omissions. | | | - | To unsubscribe, e-mail: [EMAIL PROTECTED] | For additional commands, e-mail: [EMAIL PROTECTED] | | | -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.6 (GNU/Linux) iD8DBQFC8PcmK3h2CZwO/4URAlP+AJ0Z9wXy9k5csqYlv3ElD+8Eo0nqeQCgsU64 davjHbkHP71kUf4efxGgkUA= =rZ6d -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
NoClassDefFoundError while running test
For some reason my project is giving me NoClassDefFoundError while running my unit tests. It's happening on both the server and on my PC so I know it's not the environment. The project compiles so I know the dependency is correct. I run maven with -X and I see the JAR in the list (at the top) so I know the JAR is in the classpath. I have no idea why I would get a NoClassDefFoundError. How can it not find the classes? I've opened up the JAR with winzip and the classes are inside. The project has been working for a month now and then it seems to have stopped. I'm really stuck on this. If anyone has any ideas on how this could even be possible I'd appreciate it. Thanks, Michael -- This E-mail is confidential. It may also be legally privileged. If you are not the addressee you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return E-mail. Internet communications cannot be guaranteed to be timely, secure, error or virus-free. The sender does not accept liability for any errors or omissions. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]