Question: Mauve Contig Mover Command Line Error
gravatar for jlc232
5.3 years ago by
University of British Columbia, Vancouver, Canada
jlc2320 wrote:


I'm encountering the following error when trying to run Mauve Contig Mover to reorder the contigs in a draft genome from the Command line. 


$ java -Xmx500m -cp /Applications/ org.gel.mauve.contigs.ContigOrderer -output mA17 -ref EGDe.gbk -draft mA17.fasta
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: org/biojava/bio/seq/OptimizableFilter
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(
    at java.lang.Class.privateGetMethodRecursive(
    at java.lang.Class.getMethod0(
    at java.lang.Class.getMethod(
    at sun.launcher.LauncherHelper.validateMainClass(
    at sun.launcher.LauncherHelper.checkAndLoadMain(
Caused by: java.lang.ClassNotFoundException:
    at java.lang.ClassLoader.loadClass(
    at sun.misc.Launcher$AppClassLoader.loadClass(
    at java.lang.ClassLoader.loadClass(
    ... 7 more


I'm running Mac OSX 10.9.5, with JDK v. 8, and Mauve-2.4.0, though I've tried other versions of Mauve and have gotten the same error. 


Any thoughts on this would be greatly appreciated!

mauve draft-genome • 2.9k views
ADD COMMENTlink modified 5.3 years ago by alexander.d.esin20 • written 5.3 years ago by jlc2320

Are you able to run Mauve with some small toy datasets, using the same command-line?

ADD REPLYlink written 5.3 years ago by h.mon32k
gravatar for alexander.d.esin
5.3 years ago by
United Kingdom
alexander.d.esin20 wrote:

I had an exactly identical problem trying to run the Contig Mover from the command line, and stumbled across your question. In case you still need it, or someone else stumbles across this - this is how I fixed it. My error message was identical to the one above. I am also running Mac OSX 10.9.5 with JDK 8, and the latest snapshot of Mauve.


The older method is still workable, but I went back to it and simply solved it by running the command line as such:

java -Xmx4096m -cp "/Applications/*" org.gel.mauve.contigs.ContigOrderer (etc)

This way the java classpath (-cp) will pick up all the Jars in the directory, including the essential biojava .jars.


I downloaded the following .jar binaries from

  • biojava.jar
  • bytecode.jar
  • commons-cli.jar

I placed these in my $JAVA_HOME/jre/lib/ext directory

$JAVA_HOME can be found by running from terminal shell:


In my case tthe full path was: /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/lib/ext

After transferring the .jar files my Contig Mover ran without problems with the same arguments and setup as your initial command line!

Hope this works for you.


ADD COMMENTlink modified 14 months ago by _r_am32k • written 5.3 years ago by alexander.d.esin20

I was trying your updated terminal command but got this error: ref file: org.gel.mauve.contigs.ContigMauveAlignFrame[panel0,0,0,400x383,invalid] Directory already contains reorder

Any help with this?

ADD REPLYlink written 4.5 years ago by rrcutler120

You've probably figured this out or given up, but for anyone who happens upon this question: you just need to first delete the directory that Mauve created the first time you tried to run it (should be called alignment1).

ADD REPLYlink written 3.6 years ago by jessica0

This answer did it for me, except for one thing: The Contig Mover uses the progressiveMauve script and (unless I've missed something) assumes it will be on the system PATH. So first, I created a symbolic link to that in /usr/local/bin:

ln -s /Applications/ /usr/local/bin/
ADD REPLYlink modified 3.6 years ago • written 3.6 years ago by jessica0
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2361 users visited in the last hour