james-mime4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: Build issues - NoClassDefFound - MimeTokenStream
Date Thu, 09 Jan 2014 08:58:34 GMT
On Wed, 2014-01-08 at 14:42 -0500, Devin Suiter RDX wrote:
> Hello all,
> 
> I apologize if this seems like a rookie question. Also, I could not locate
> a mime4j-user list to submit it to on the project page, since it is really
> a user question.
> 
> I am trying to parse an email stack dump from raw text into MIME records.
> Most of my Java development experience has been in MapReduce, so it is a
> little slanted from the traditional Java programming, but this project does
> not fit MapReduce pattern, so I am writing in in Java. Harsh J. over at
> Cloudera introduced me to the mime4j tool.
> 
> When I attempt to run my jar, I get a NoClassDefFound Exception from
> MimeTokenStream. I'm using Maven and have mime4j-core, -dom, -storage, and
> -benchmark all on version 0.7.2 listed as compile-scope dependencies, and
> so I am puzzled why the class is not being imported and packaged with
> Maven. 

Devin,

This is most likely a classpath issue. There is likely to be an older
version of mime4j on the classpath.

> I have also manually extracted the contents of
> the apache-mime4j-0.7.2-bin.tar.gz archive and this did not help either.
> 
> So, I tried to build the archives from source. I downloaded the source from
> here:
> http://www.apache.org/dist/james/mime4j/0.7.2/apache-mime4j-project-0.7.2-source-release.zip-
> I couldn't locate a source-release.tar.gz
> 
> Maven tells me the project cannot be built, because the benchmark child
> module and the assemble child module POM.xml files are not present. I ran a
> tree on the benchmark directory path, and there is definitely no POM.xml in
> there.
> 

You probably should be using binary artifacts from Maven central (Maven
default repository) unless you have a reason for building mime4j from
source.

If you are familiar with Subversion or Git, get sources directly from
the repository

http://svn.apache.org/repos/asf/james/mime4j/branches/apache-mime4j-0.7/
https://github.com/apache/james-mime4j.git 

> Thoughts on why the build might be failing? Obviously because the POM is
> not there, but the project page specifically references Maven as the build
> tool, so why would the child POM not be present? Or is this release not a
> good one for me to use, even though it is the most recent?
> 

I cant say for sure, but I am quite certain that the head of the 0.7
branch should build without errors.

Hope this helps somewhat.

Oleg



Mime
View raw message