Hi Pavel, I usually do interactive debugging by using -Dmaven.surefire.debug, e.g. mvn -Dmaven.surefire.debug test -Phadoop-2 -Dhadoop-23.version=2.4.0.2081 -Dtest=TestHiveHBaseStorageHandler#testTableCreateExternal. Maven will launch a VM running as a server and listen any incoming debug requests on port 5005, and then create a debug config in eclipse on [Remote Java Application] with socket(localhost:5005) attached to launch debugging.
I did tried your approach, but not working out, and I got jar dependency problems, why not to adopt the way mentioned above? You got full control over. Hopefully it helps, thanks! -Xiaobing On Wed, Jul 23, 2014 at 6:40 AM, Nick Dimiduk <ndimi...@gmail.com> wrote: > I'm sure google knows; I don't. > > For what it's worth, I run tests via maven and attach the debugger to the > remote process when necessary. > > -n > > On Tuesday, July 22, 2014, Pavel Chadnov <pavelchad...@gmail.com> wrote: > > > How can I do it in eclipse. I do this in console and it works > > > > On Tuesday, July 22, 2014, Nick Dimiduk <ndimi...@gmail.com > > <javascript:_e(%7B%7D,'cvml','ndimi...@gmail.com');>> wrote: > > > >> Are you specifying a hadoop profile via eclipse? Ie, from maven, > >> -Phadoop-2. > >> > >> > >> On Tue, Jul 22, 2014 at 4:03 PM, Pavel Chadnov <pavelchad...@gmail.com> > >> wrote: > >> > >>> Hey Guys, > >>> > >>> > >>> I'm trying to run Hive unit tests on eclipse and have few failures. One > >>> of > >>> the interesting one is throwing this exception as shown below when ran > >>> from > >>> eclipse, this one passes fine from the console. > >>> > >>> > >>> java.lang.IncompatibleClassChangeError: Implementing class > >>> > >>> at java.lang.ClassLoader.defineClass1(Native Method) > >>> > >>> at java.lang.ClassLoader.defineClass(ClassLoader.java:800) > >>> > >>> at > >>> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) > >>> > >>> at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) > >>> > >>> at java.net.URLClassLoader.access$100(URLClassLoader.java:71) > >>> > >>> ............... > >>> > >>> ............... > >>> > >>> at java.lang.Class.forName(Class.java:190) > >>> > >>> at > >>> org.apache.hadoop.hive.shims.ShimLoader.createShim(ShimLoader.java:120) > >>> > >>> at > org.apache.hadoop.hive.shims.ShimLoader.loadShims(ShimLoader.java:115) > >>> > >>> at > >>> > >>> > org.apache.hadoop.hive.shims.ShimLoader.getHadoopShims(ShimLoader.java:80) > >>> > >>> at > >>> > org.apache.hadoop.hive.conf.HiveConf$ConfVars.<clinit>(HiveConf.java:254) > >>> > >>> at > >>> > org.apache.hadoop.hive.ql.exec.Utilities.getPlanPath(Utilities.java:652) > >>> > >>> at > >>> > org.apache.hadoop.hive.ql.exec.Utilities.setPlanPath(Utilities.java:641) > >>> > >>> at > >>> > org.apache.hadoop.hive.ql.exec.Utilities.setBaseWork(Utilities.java:584) > >>> > >>> at > >>> org.apache.hadoop.hive.ql.exec.Utilities.setMapWork(Utilities.java:575) > >>> > >>> at > >>> > >>> > org.apache.hadoop.hive.ql.exec.Utilities.setMapRedWork(Utilities.java:568) > >>> > >>> at > >>> > >>> > org.apache.hadoop.hive.ql.io.TestSymlinkTextInputFormat.setUp(TestSymlinkTextInputFormat.java:84) > >>> > >>> at junit.framework.TestCase.runBare(TestCase.java:132) > >>> > >>> > >>> I tried adding hadoop-shims project in the classpath by manually adding > >>> them but no luck. Would really appreciate any help here. > >>> > >>> > >>> Thanks, > >>> > >>> Pavel > >>> > >> > >> > > > > -- > > Regards, > > Pavel Chadnov > > > > > -- CONFIDENTIALITY NOTICE NOTICE: This message is intended for the use of the individual or entity to which it is addressed and may contain information that is confidential, privileged and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, you are hereby notified that any printing, copying, dissemination, distribution, disclosure or forwarding of this communication is strictly prohibited. If you have received this communication in error, please contact the sender immediately and delete it from your system. Thank You.