Pages

Tuesday, May 26, 2015

Guava Hadoop Classpath Issue

Blogging this because it was slightly too large for a tweet.  If you've got a stacktrace like


java.lang.NoClassDefFoundError: com/google/common/io/LimitInputStream
at org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:467) at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1295) at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1292) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:415) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1642) at org.apache.hadoop.mapreduce.Job.submit(Job.java:1292) at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:1313)


You may find this problematic dependency tree
\---org.apache.hadoop:hadoop-client
    +---org.apache.hadoop:hadoop-common
        +---org.apache.hadoop:hadoop-auth

It seems Google has once again broken compatibility in Guava by removing LimitInputStream in Guava 15.  And while much of Hadoop (except the new versions which have upgraded their Guava version) are on an older version of Guva, the hadoop-auth module contains a newer version of Guava that most dependency management tools (aka Maven and Gradle) will choose over the older version.  Adding an exclusion for this transitive dependency should resolve this issue.

Friday, May 15, 2015

IntelliJ and junit-hierarchicalcontextrunner

For those using junit-hierarchicalcontextrunner getting an exception like
java.lang.Exception: The inner class com.mycompany.SomeClassTest$InnerClass is not static.
 at org.junit.runners.BlockJUnit4ClassRunner.validateNoNonStaticInnerClass(BlockJUnit4ClassRunner.java:113)
...
You might be able to get rid of that error (especially if it happens when running in IntelliJ, but not the commandline) by upgrading to JUnit 4.12 and junit-hierarchicalcontextrunner 4.12.0. However, if you're an IntelliJ user, you'll find that running an individual test still runs all the tests. This will be fixed in an upcoming release.

Friday, May 1, 2015

Codehaus Migration

Since Codehaus is shutting down, you may be wondering where a project you use has moved. Here's where some of the more popular projects have moved.

Project Old Homepage New Homepage
EasyMock http://easymock.codehaus.org/ http://easymock.org/
Enunciate http://enunciate.codehaus.org/ http://enunciate.webcohesion.com/
Esper http://esper.codehaus.org/ http://www.espertech.com/esper/index.php
Fabric3 http://fabric3.codehaus.org/ http://www.fabric3.org/
Gant http://gant.codehaus.org/ http://gant.github.io/
Geb http://geb.codehaus.org/ http://www.gebish.org/
GMavenPlus http://gmavenplus.codehaus.org/ https://github.com/groovy/GMavenPlus/
GPars http://gpars.codehaus.org/ http://gpars.github.io/
Griffon http://griffon.codehaus.org/ http://new.griffon-framework.org/
Groovy http://groovy.codehaus.org/ http://www.groovy-lang.org/
GroovyFX http://docs.codehaus.org/display/GROOVY/GroovyFX http://groovyfx.org/
Gumtree http://gumtree.codehaus.org/ https://github.com/Gumtree/gumtree
IzPack http://docs.codehaus.org/display/IZPACK/Home http://izpack.org/
Jackson http://jackson.codehaus.org/ https://github.com/FasterXML/jackson
JavaNCSS http://javancss.codehaus.org/ NONE YET (though Codehaus has a mirror on Github)
jMock http://jmock.codehaus.org/ http://www.jmock.org/
JRuby http://jruby.codehaus.org/ http://jruby.org/
M2Eclipse http://m2eclipse.codehaus.org/ http://eclipse.org/m2e/
Mojo http://mojo.codehaus.org/ https://github.com/mojohaus/ (still transitioning)
MVEL http://mvel.codehaus.org/ https://github.com/mvel/mvel
Pico Container http://picocontainer.codehaus.org/ https://github.com/picocontainer
Plexus Classworlds http://plexus.codehaus.org/plexus-classworlds/ https://github.com/sonatype/plexus-classworlds
Plexus Containers http://plexus.codehaus.org/plexus-containers/ https://github.com/sonatype/plexus-containers
Sonar http://sonar.codehaus.org/ http://www.sonarqube.org/
Sonar http://sitemesh.codehaus.org/ http://wiki.sitemesh.org/wiki/display/sitemesh/Home
StaxMate http://woodstox.codehaus.org/ https://github.com/FasterXML/StaxMate
SVN4J http://svn4j.codehaus.org/ http://sourceforge.net/projects/svn4j/
Woodstox http://woodstox.codehaus.org/ https://github.com/FasterXML/woodstox
XStream http://xstream.codehaus.org/ http://x-stream.github.io/


I'll keep this page updated as more information becomes available (let me know if you spot something incorrect or out of date). Also if there's a project not on this list that you think should be, let me know and I'll add it. I know some of these moves are old news, but I listed them anyway since once Codehaus shuts down, any redirects they may have had will stop working.