We don't use shaded plugin. arvindmac:m2m-platform tyu$ mvn -version Apache Maven 2.2.0 (r788681; 2009-06-26 06:04:01-0700) Java version: 1.6.0_17 Java home: /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home Default locale: en_US, platform encoding: MacRoman OS name: "mac os x" version: "10.6.3" arch: "x86_64" Family: "mac"
On Mon, May 17, 2010 at 10:45 AM, Martin Gainty <[email protected]> wrote: > > Yu > > > Anders..Kalpak and Ron are correct ..changing the package name causes this > problem > > If you disagree.. post your code and pom.xml and settings.xml (and indicate > which version of maven) so we can download and test your configuration > > Are you using the shaded plugin ? > > > Martin > ______________________________________________ > Verzicht und Vertraulichkeitanmerkung > > Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene > Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte > Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht > dient lediglich dem Austausch von Informationen und entfaltet keine > rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von > E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. > > > > > Date: Mon, 17 May 2010 09:39:47 -0700 > > Subject: Re: unit test not finding dependent class > > From: [email protected] > > To: [email protected] > > > > I abbreviated the company name for privacy. > > That shouldn't be the cause. > > > > On Sun, May 16, 2010 at 2:28 PM, Ron Wheeler < > [email protected] > > > wrote: > > > > > com/iq/m2m/platform/tester/MergePkgsTester > > > /com/ciq/m2m/platform/tester/MergePkgsTester.class > > > > > > 2 different package names > > > ciq!=iq > > > > > > Ron > > > > > > > > > On 16/05/2010 3:41 PM, Ted Yu wrote: > > > > > >> The classes are not dynamically loaded. > > >> > > >> Thanks > > >> > > >> On Sunday, May 16, 2010, Kalpak Gadre<[email protected]> wrote: > > >> > > >> > > >>> Just in case.. Are you dynamically loading these classes from your > code? > > >>> > > >>> You can see these kind of errors in case you are dynamically loading > > >>> classes using System class loader instead of the immediate class > loader. The > > >>> test runner will segregate the classes by providing a custom class > loader > > >>> for each test. All your classes will be added to this child class > loader. So > > >>> trying to load classes from System class loader will fail as the > System > > >>> class loader does not know about these classes. > > >>> > > >>> - Kalpak > > >>> > > >>> > > >>> > > >>> -rw-r--r-- 1 tyu staff 5691 May 16 08:58 > > >>> > > >>> > target/classes/com/ciq/m2m/platform/mmp2/input/OtaUploadRecordReader.class > > >>> > > >>> That test passes. > > >>> > > >>> But the same problem appears for other tests: > > >>> arvindmac:m2m-platform tyu$ vi > > >>> > > >>> > target/surefire-reports/com.ciq.m2m.platform.mmp2.MeasureMergeReducerTest.txt > > >>> > > >>> java.lang.NoClassDefFoundError: > > >>> com/iq/m2m/platform/tester/MergePkgsTester > > >>> > > >>> Although the class has been generated: > > >>> ... > > >>> -rw-r--r-- 1 tyu staff 5141 May 16 08:58 > > >>> target/classes/com/ciq/m2m/platform/tester/MergePkgsTester.class > > >>> > > >>> On Sun, May 16, 2010 at 7:16 AM, Anders Hammar<[email protected]> > > >>> wrote: > > >>> > > >>> > > >>> > > >>> Is OtaUploadRecordReader a class you've written and that's in the > same > > >>> Maven > > >>> project? If so, check that it is being compiled by checking that the > > >>> .class > > >>> file exists under target/classes/ > > >>> > > >>> If it's not being compiled there's some error you need to fix in your > > >>> project. > > >>> > > >>> /Anders > > >>> > > >>> On Fri, May 14, 2010 at 19:41, Ted Yu<[email protected]> wrote: > > >>> > > >>> > > >>> > > >>> Hi, > > >>> Here is the information about maven I use: > > >>> > > >>> Apache Maven 2.2.0 (r788681; 2009-06-26 06:04:01-0700) > > >>> Java version: 1.6.0_17 > > >>> Java home: > > >>> > > >>> > > >>> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home > > >>> > > >>> > > >>> Default locale: en_US, platform encoding: MacRoman > > >>> OS name: "mac os x" version: "10.6.3" arch: "x86_64" Family: "mac" > > >>> > > >>> I see strange unit test failure which was due to a dependent class in > the > > >>> same package not being found: > > >>> java.lang.NoClassDefFoundError: > > >>> com/ciq/m2m/platform/mmp2/input/OtaUploadRecordReader > > >>> at > > >>> > > >>> > > >>> > > >>> > > >>> > > >>> > com.ciq.m2m.platform.mmp2.input.OtaUploadRecordReaderSingleFileTest.createRecordReader(OtaUploadRecordReaderSingleFileTest.java:18) > > >>> > > >>> > > >>> In Eclipse, I can successfully run the same unit test. > > >>> > > >>> Can someone provide hint ? > > >>> > > >>> Thanks > > >>> > > >>> > > >>> > > >>> > > >>> > > >>> > > >>> > > >>> > > >>> > > >>> --------------------------------------------------------------------- > > >>> To unsubscribe, e-mail: [email protected] > > >>> For additional commands, e-mail: [email protected] > > >>> > > >>> > > >>> > > >>> > > >> --------------------------------------------------------------------- > > >> To unsubscribe, e-mail: [email protected] > > >> For additional commands, e-mail: [email protected] > > >> > > >> > > >> > > >> > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [email protected] > > > For additional commands, e-mail: [email protected] > > > > > > > > _________________________________________________________________ > Hotmail has tools for the New Busy. Search, chat and e-mail from your > inbox. > > http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1 >
