joelittlejohn / embedmongo-maven-plugin

Maven plugin wrapper for the flapdoodle.de embedded MongoDB API
Apache License 2.0
88 stars 51 forks source link

java.lang.NoClassDefFoundError: org/apache/commons/io/FileUtils #44

Closed franciscocpg closed 6 years ago

franciscocpg commented 9 years ago

When running the command

mvn -Dtest=br.com.levaetraz.facade.LogisticMapFacadeTestIT -Pintegration-test test-compile surefire:test

With maven

Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 10:51:28-0300)
Maven home: /home/francisco/programas/netbeans-8.0/java/maven
Java version: 1.7.0_21, vendor: Oracle Corporation
Java home: /usr/java/jdk1.7.0_21/jre
Default locale: pt_BR, platform encoding: UTF-8
OS name: "linux", version: "3.13.0-62-generic", arch: "amd64", family: "unix"

It's all fine and i get the output bellow at the end of the script

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.301s
[INFO] Finished at: Thu Aug 27 11:05:26 BRT 2015
[INFO] Final Memory: 14M/336M
[INFO] ------------------------------------------------------------------------
Thu Aug 27 11:05:26 [initandlisten] connection accepted from 127.0.0.1:35309 #3 (1 connection now open)
[mongod output] Thu Aug 27 11:05:26 [conn3] terminating, shutdown command received
[mongod output] Thu Aug 27 11:05:26 dbexit: shutdown called
[mongod output] Thu Aug 27 11:05:26 [conn3] shutdown: going to close listening sockets...
[mongod output] Thu Aug 27 11:05:26 [conn3] closing listening socket: 5
[mongod output] Thu Aug 27 11:05:26 [conn3] closing listening socket: 6
[mongod output] Thu Aug 27 11:05:26 [conn3] removing socket file: /tmp/mongodb-37018.sock
[mongod output] Thu Aug 27 11:05:26 [conn3] shutdown: going to flush diaglog...
[mongod output] Thu Aug 27 11:05:26 [conn3] shutdown: going to close sockets...
[mongod output] Thu Aug 27 11:05:26 [conn3] shutdown: waiting for fs preallocator...
[mongod output] 
Thu Aug 27 11:05:26 [conn3] shutdown: closing all files...
[mongod output] Thu Aug 27 11:05:26 [conn3] closeAllFiles() finished
[mongod output] Thu Aug 27 11:05:26 [conn3] shutdown: removing fs lock...
[mongod output] Thu Aug 27 11:05:26 dbexit: really exiting now

But when running the same command with this maven version

Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-14T15:37:52-03:00)
Maven home: /usr/share/maven3
Java version: 1.7.0_21, vendor: Oracle Corporation
Java home: /usr/java/jdk1.7.0_21/jre
Default locale: pt_BR, platform encoding: UTF-8
OS name: "linux", version: "3.13.0-62-generic", arch: "amd64", family: "unix"

Got this stranges java.lang.NoClassDefFoundError: org/apache/commons/io/FileUtils

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.358 s
[INFO] Finished at: 2015-08-27T11:22:58-03:00
[INFO] Final Memory: 18M/338M
[INFO] ------------------------------------------------------------------------
Exception in thread "Thread-2" java.lang.NoClassDefFoundError: org/apache/commons/io/FileUtils
    a  t  de.flapdoodle.embed.pr ocess.io.file.Files.forceDelete(Files.java:104)
    a  t  de.flapdoodle.embed.pr ocess.store.ArtifactStore.removeFileSet(ArtifactStore.java:91)
    a  t  de.flapdoodle.embed.pr ocess.store.CachingArtifactStore$FilesWithCounter.forceDelete(CachingArtifactStore.java:151)
    a  t  de.flapdoodle.embed.pr ocess.store.CachingArtifactStore.removeAll(CachingArtifactStore.java:94)
    a  t  de.flapdoodle.embed.pr ocess.store.CachingArtifactStore$CacheCleaner.run(CachingArtifactStore.java:171)
    a  t  java.lang.Thread.run(T hread.java:722)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.io.FileUtils
    a  t  org.codehaus.plexus.cl assworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
    a  t  org.codehaus.plexus.cl assworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:259)
    a  t  org.codehaus.plexus.cl assworlds.realm.ClassRealm.loadClass(ClassRealm.java:235)
    a  t  org.codehaus.plexus.cl assworlds.realm.ClassRealm.loadClass(ClassRealm.java:227)
    .  . . 6 more
Thu Aug 27 11:22:58 [initandlisten] connection accepted from 127.0.0.1:35918 #3 (1 connection now open)
[mongod output] 
Thu Aug 27 11:22:58 [conn3] terminating, shutdown command received
[mongod output] Thu Aug 27 11:22:58 dbexit: shutdown called
[mongod output] Thu Aug 27 11:22:58 [conn3] shutdown: going to close listening sockets...
[mongod output] Thu Aug 27 11:22:58 [conn3] closing listening socket: 5
[mongod output] Thu Aug 27 11:22:58 [conn3] closing listening socket: 6
[mongod output] Thu Aug 27 11:22:58 [conn3] removing socket file: /tmp/mongodb-37018.sock
[mongod output] Thu Aug 27 11:22:58 [conn3] shutdown: going to flush diaglog...
[mongod output] Thu Aug 27 11:22:58 [conn3] shutdown: going to close sockets...
[mongod output] Thu Aug 27 11:22:58 [conn3] shutdown: waiting for fs preallocator...
[mongod output] Thu Aug 27 11:22:58 [conn3] shutdown: closing all files...
[mongod output] Thu Aug 27 11:22:58 [conn3] closeAllFiles() finished
[mongod output] Thu Aug 27 11:22:58 [conn3] shutdown: removing fs lock...
[mongod output] Thu Aug 27 11:22:58 dbexit: really exiting now
[mongod output] Exception in thread "Thread-3" java.lang.NoClassDefFoundError: org/apache/commons/io/FileUtils
    a  t  de.flapdoodle.embed.pr ocess.io.file.Files.forceDelete(Files.java:104)
    a  t  de.flapdoodle.embed.mo ngo.MongodProcess.deleteTempFiles(MongodProcess.java:92)
    a  t  de.flapdoodle.embed.mo ngo.AbstractMongoProcess.cleanupInternal(AbstractMongoProcess.java:116)
    a  t  de.flapdoodle.embed.pr ocess.runtime.AbstractProcess.stop(AbstractProcess.java:167)
    a  t  de.flapdoodle.embed.pr ocess.runtime.Executable.stop(Executable.java:71)
    a  t  de.flapdoodle.embed.pr ocess.runtime.Executable$JobKiller.run(Executable.java:88)
    a  t  java.lang.Thread.run(T hread.java:722)

Any clue?

joelittlejohn commented 9 years ago

I think this is caused by a problem in the flapdoodle embedded mongo library that this plugin uses. I think if we update to the latest version of that library, it's likely to fix this.

wThomas84 commented 8 years ago

Hi, I do experience the same issue. As the last comment on the flapdoodle.embed's related issue discussion points out, there is the chance it works with the newer version: https://github.com/flapdoodle-oss/de.flapdoodle.embed.mongo/issues/116

Is there any chance for a new release, comprising the updated version? Thanks in advance /Tom

joelittlejohn commented 8 years ago

Yes sure, it's about time we updated this dependency. I suspect there are probably some breaking changes so I'll update and see what needs to be done. On 29 Oct 2015 12:18 am, "wThomas84" notifications@github.com wrote:

Hi, I do experience the same issue. As the last comment on the flapdoodle.embed's related issue discussion points out, there is the chance it works with the newer version: flapdoodle-oss/de.flapdoodle.embed.mongo#116 https://github.com/flapdoodle-oss/de.flapdoodle.embed.mongo/issues/116

Is there any chance for a new release, comprising the updated version? Thanks in advance /Tom

— Reply to this email directly or view it on GitHub https://github.com/joelittlejohn/embedmongo-maven-plugin/issues/44#issuecomment-152038189 .

wThomas84 commented 8 years ago

Strange, I just learned that updating to your version 0.2.0 seems to fix the issue at least for me, although I couldn't find any changes in the history of your pom regarding the flapdoodle dependency.

yacota commented 8 years ago

Upgrading to 1.50.0 won't solve this FileUtils issue, but will help others trying to use MongoDb-3.0.x Check https://github.com/joelittlejohn/embedmongo-maven-plugin/issues/50

guruxu commented 8 years ago

Something is happening here that's removing commons-io from the dependency tree.

mvn dependency:tree in this repo:

...
[INFO] +- de.flapdoodle.embed:de.flapdoodle.embed.mongo:jar:1.46.0:compile
[INFO] |  \- de.flapdoodle.embed:de.flapdoodle.embed.process:jar:1.39.0:compile
[INFO] |     +- org.apache.commons:commons-lang3:jar:3.1:compile
[INFO] |     +- net.java.dev.jna:jna:jar:4.0.0:compile
[INFO] |     +- net.java.dev.jna:jna-platform:jar:4.0.0:compile
[INFO] |     \- org.apache.commons:commons-compress:jar:1.3:compile
...

mvn dependency:tree in de.flapdoodle.embed.mongo 1.46.0:

...
[INFO] +- de.flapdoodle.embed:de.flapdoodle.embed.process:jar:1.39.0:compile
[INFO] |  +- commons-io:commons-io:jar:2.4:compile
[INFO] |  +- org.apache.commons:commons-lang3:jar:3.1:compile
[INFO] |  +- net.java.dev.jna:jna:jar:4.0.0:compile
[INFO] |  +- net.java.dev.jna:jna-platform:jar:4.0.0:compile
[INFO] |  \- org.apache.commons:commons-compress:jar:1.3:compile
...```
indriesergiu commented 8 years ago

If you run

mvn -Dverbose dependency:tree

the commons-io dependency will show up.

[INFO] +- de.flapdoodle.embed:de.flapdoodle.embed.mongo:jar:1.46.0:compile
[INFO] |  \- de.flapdoodle.embed:de.flapdoodle.embed.process:jar:1.39.0:compile
[INFO] |     +- commons-io:commons-io:jar:2.2:compile
[INFO] |     +- org.apache.commons:commons-lang3:jar:3.1:compile
[INFO] |     +- net.java.dev.jna:jna:jar:4.0.0:compile
[INFO] |     +- net.java.dev.jna:jna-platform:jar:4.0.0:compile
[INFO] |     |  \- (net.java.dev.jna:jna:jar:4.0.0:compile - omitted for duplicate)
[INFO] |     \- org.apache.commons:commons-compress:jar:1.3:compile

Although the listed version is 2.2 (instead of 2.4). Might have something to do with the commons-io dependency (version 2.2) from the maven-plugin-testing-harness.

[INFO] +- org.apache.maven.plugin-testing:maven-plugin-testing-harness:jar:3.3.0:test
[INFO] |  +- (commons-io:commons-io:jar:2.2:compile - scope updated from test; omitted for duplicate)
[INFO] |  \- org.codehaus.plexus:plexus-archiver:jar:2.2:test
[INFO] |     +- (org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:test - omitted for duplicate)
[INFO] |     +- (org.codehaus.plexus:plexus-utils:jar:3.0.7:test - omitted for conflict with 3.0.20)
[INFO] |     \- org.codehaus.plexus:plexus-io:jar:2.0.4:test
[INFO] |        \- (org.codehaus.plexus:plexus-utils:jar:3.0:test - omitted for conflict with 3.0.20)

Maven docs say that

More specifically, in verbose mode the dependency tree shows dependencies that were omitted for: being a duplicate of another; conflicting with another's version and/or scope; and introducing a cycle into the dependency tree.

pedroxs commented 8 years ago

I have the same issue with Maven 3.3.3, but using Maven 3.0.5 works flawlessly.

benson-basis commented 8 years ago

It fails for me with Maven 3.2.5, even if I stick commons-io 2.4 explicitly into the plugin declaration as a dependency.

benson-basis commented 8 years ago

This is a problem with the thread context class loader. de.flapdoodle.embed.process.store.CachingArtifactStore$CacheCleaner.run is running in a thread and the tccl isn't set right. Let me see if this can be fixed in here.

benson-basis commented 8 years ago

it's more complex. The flapdoodle code creates a thread. That thread tries to run 'late' in the process, by which time, something is horribly wrong with the classloading environment.

miguelfc commented 8 years ago

I have the same problem with versions 3.2.1 and 3.3.9. With 3.0.5 works correctly.

joelittlejohn commented 8 years ago

Note, there are more reports of this at flapdoodle-oss/de.flapdoodle.embed.mongo#116. Cause is still unclear but it looks like some kind of unsafe cleanup approach is taken in the flapdoodle API.

Steve973 commented 7 years ago

FYI - This is still happening with version 0.3.4 of this plugin as of 12 January 2017.

abelsromero commented 7 years ago

Same here, I used <artifactId>de.flapdoodle.embed.mongo</artifactId> <version>1.50.5</version> and I still getting the message:

Exception in thread "Thread-1" java.lang.NoClassDefFoundError: de/flapdoodle/embed/process/extract/ExtractedFileSets
        at de.flapdoodle.embed.process.store.ArtifactStore.removeFileSet(ArtifactStore.java:90)
        at de.flapdoodle.embed.process.store.CachingArtifactStore$FilesWithCounter.forceDelete(CachingArtifactStore.java:176)
        at de.flapdoodle.embed.process.store.CachingArtifactStore.removeAll(CachingArtifactStore.java:100)
        at de.flapdoodle.embed.process.store.CachingArtifactStore$CacheCleaner.run(CachingArtifactStore.java:196)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: de.flapdoodle.embed.process.extract.ExtractedFileSets
        at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
        at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
        at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
        at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
        ... 5 more
Sat Feb 11 11:19:44 [initandlisten] connection accepted from 127.0.0.1:52080 #1 (1 connection now open)
[mongod output] Sat Feb 11 11:19:44 [conn1] terminating, shutdown command received
[mongod output] Sat Feb 11 11:19:44 dbexit: shutdown called
[mongod output] Sat Feb 11 11:19:44 [conn1] shutdown: going to close listening sockets...
[mongod output] Sat Feb 11 11:19:44 [conn1] closing listening socket: 384
[mongod output] Sat Feb 11 11:19:44 [conn1] shutdown: going to flush diaglog...
[mongod output] Sat Feb 11 11:19:44 [conn1] shutdown: going to close sockets...
[mongod output] Sat Feb 11 11:19:44 [conn1] shutdown: waiting for fs preallocator...
[mongod output] Sat Feb 11 11:19:44 [conn1] shutdown: closing all files...
[mongod output] Sat Feb 11 11:19:44 [conn1] closeAllFiles() finished
[mongod output] Sat Feb 11 11:19:44 [conn1] shutdown: removing fs lock...
[mongod output] Sat Feb 11 11:19:44 dbexit: really exiting now
[mongod output]
Exception in thread "Thread-3" java.lang.NoClassDefFoundError: org/apache/commons/io/FileUtils
        at de.flapdoodle.embed.process.io.file.Files.forceDelete(Files.java:119)
        at de.flapdoodle.embed.mongo.MongodProcess.deleteTempFiles(MongodProcess.java:92)
        at de.flapdoodle.embed.mongo.AbstractMongoProcess.cleanupInternal(AbstractMongoProcess.java:124)
        at de.flapdoodle.embed.process.runtime.AbstractProcess.stop(AbstractProcess.java:172)
        at de.flapdoodle.embed.process.runtime.AbstractProcess$JobKiller.run(AbstractProcess.java:243)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.io.FileUtils
        at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
        at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
        at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
        at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
        ... 6 more
eblancost commented 7 years ago

Same here. is this resolved ?

Exception in thread "Thread-1" java.lang.NoClassDefFoundError: de/flapdoodle/embed/process/extract/ExtractedFileSets
        at de.flapdoodle.embed.process.store.ArtifactStore.removeFileSet(ArtifactStore.java:90)
        at de.flapdoodle.embed.process.store.CachingArtifactStore$FilesWithCounter.forceDelete(CachingArtifactStore.java:176)
        at de.flapdoodle.embed.process.store.CachingArtifactStore.removeAll(CachingArtifactStore.java:100)
        at de.flapdoodle.embed.process.store.CachingArtifactStore$CacheCleaner.run(CachingArtifactStore.java:196)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: de.flapdoodle.embed.process.extract.ExtractedFileSets
        at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
        at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
        at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
        at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
        ... 5 more
Exception in thread "Thread-3" java.lang.NoClassDefFoundError: org/apache/commons/io/FileUtils
        at de.flapdoodle.embed.process.io.file.Files.forceDelete(Files.java:119)
        at de.flapdoodle.embed.mongo.MongodProcess.deleteTempFiles(MongodProcess.java:92)
        at de.flapdoodle.embed.mongo.AbstractMongoProcess.cleanupInternal(AbstractMongoProcess.java:124)
        at de.flapdoodle.embed.process.runtime.AbstractProcess.stop(AbstractProcess.java:172)
        at de.flapdoodle.embed.process.runtime.AbstractProcess$JobKiller.run(AbstractProcess.java:243)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.io.FileUtils
        at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
        at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
        at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
        at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
        ... 6 more
joelittlejohn commented 7 years ago

It seems that this is something to do with what parts of Maven are still available when this flapdoodle shutdown hook runs, and whether the plexus classloader has been partially destroyed.

Can everyone that comments here please include your exact Maven version?

eblancost commented 7 years ago

Hello,

Apache Maven 3.3.9

Cheers.

joelittlejohn commented 7 years ago

Another plugin that appears to be having something like the same problem: https://github.com/eclipse/jetty.project/issues/537

joelittlejohn commented 7 years ago

Another example here: https://issues.jboss.org/browse/JBASMP-61?_sscc=t

And some further advice linked from that JBoss issue: http://maven.apache.org/plugin-developers/common-bugs.html#Using_Shutdown_Hooks

zjgoodman commented 6 years ago

As of today (March 7 2018) a stacktrace similar to this issue is still happening even with version 0.3.4 of the plugin. I am building with Maven 3.3.9.

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 42.571 s
[INFO] Finished at: 2018-03-07T13:36:27-06:00
[INFO] Final Memory: 77M/706M
[INFO] ------------------------------------------------------------------------
Exception in thread "Thread-7" Exception in thread "Thread-13" java.lang.NoClassDefFoundError: de/flapdoodle/embed/process/extract/ExtractedFileSets
    at de.flapdoodle.embed.process.store.ArtifactStore.removeFileSet(ArtifactStore.java:90)
    at de.flapdoodle.embed.process.store.CachingArtifactStore$FilesWithCounter.forceDelete(CachingArtifactStore.java:176)
    at de.flapdoodle.embed.process.store.CachingArtifactStore.removeAll(CachingArtifactStore.java:100)
    at de.flapdoodle.embed.process.store.CachingArtifactStore$CacheCleaner.run(CachingArtifactStore.java:196)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: de.flapdoodle.embed.process.extract.ExtractedFileSets
    at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
    ... 5 more
java.lang.NoClassDefFoundError: de/flapdoodle/embed/process/extract/ExtractedFileSets
    at de.flapdoodle.embed.process.store.ArtifactStore.removeFileSet(ArtifactStore.java:90)
    at de.flapdoodle.embed.process.store.CachingArtifactStore$FilesWithCounter.forceDelete(CachingArtifactStore.java:176)
    at de.flapdoodle.embed.process.store.CachingArtifactStore.removeAll(CachingArtifactStore.java:100)
    at de.flapdoodle.embed.process.store.CachingArtifactStore$CacheCleaner.run(CachingArtifactStore.java:196)
    at java.lang.Thread.run(Thread.java:745)
jeremyrdavis commented 6 years ago

I'm getting this now after compiling and installing de.flapdoodle.embed.mongo-2.0.4-SNAPSHOT from master

I'm using: Maven 3.3.9 Oracle JDK 1.8.0_74

It looks like the test executes correctly and then the error is thrown, which makes sense given this thread. Has there been any progress on this issue?

joelittlejohn commented 6 years ago

@jeremyrdavis Do you mean you also modified this plugin to use de.flapdoodle.embed.mongo-2.0.4-SNAPSHOT and used a locally installed snapshot of this plugin too?

jeremyrdavis commented 6 years ago

@joelittlejohn I'm not sure where I got the 2.0.4-SNAPSHOT, sorry. I cloned and installed versions 0.3.0 through 0.3.6-SNAPSHOT and ran my integration test with each version. The test appears to run correctly, but it throws "java.lang.NoClassDefFoundError: org/apache/commons/io/FileUtils" from "de.flapdoodle.embed.process.io.file.Files.forceDelete(Files.java:104)" in the shutdown hook.

tski-asym commented 6 years ago

I am also getting this issue

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:10 min (Wall Clock)
[INFO] Finished at: 2018-04-10T18:30:28-04:00
[INFO] Final Memory: 89M/1354M
[INFO] ------------------------------------------------------------------------
Exception in thread "Thread-7" java.lang.NoClassDefFoundError: de/flapdoodle/embed/process/extract/ExtractedFileSets
    at de.flapdoodle.embed.process.store.ArtifactStore.removeFileSet(ArtifactStore.java:90)
    at de.flapdoodle.embed.process.store.CachingArtifactStore$FilesWithCounter.forceDelete(CachingArtifactStore.java:176)
    at de.flapdoodle.embed.process.store.CachingArtifactStore.removeAll(CachingArtifactStore.java:100)
    at de.flapdoodle.embed.process.store.CachingArtifactStore$CacheCleaner.run(CachingArtifactStore.java:196)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: de.flapdoodle.embed.process.extract.ExtractedFileSets
    at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
    ... 5 more
mvn --version
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T11:41:47-05:00)
Maven home: /usr/local/Cellar/maven/3.3.9/libexec
Java version: 1.8.0_131, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.12.6", arch: "x86_64", family: "mac"
            <plugin>
                <groupId>com.github.joelittlejohn.embedmongo</groupId>
                <artifactId>embedmongo-maven-plugin</artifactId>
                <version>0.3.5</version>
                <executions>
                    <execution>
                        <id>start</id>
                        <goals>
                            <goal>start</goal>
                        </goals>
                        <phase>process-test-classes</phase>
                        <configuration>
                            <version>3.2.6</version>
                        </configuration>
                    </execution>
                    <execution>
                        <id>stop</id>
                        <goals>
                            <goal>stop</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
Mr-Snailman commented 6 years ago

I just upgraded my plugin version from 0.3.5 -> 0.4.0, and the 'ExtractedFileSets' exceptions stopped occurring at the end of my successful build... Hopefully this is for the long term!

marvec commented 6 years ago

This is still an issue with 0.4.0, de.flapdoodle.embed.mongo 2.1.1, Maven 3.5.3, OracleJDK 10.0.2

joelittlejohn commented 6 years ago

@marvec Strange, others are saying the problem is fixed with 0.4.0. I wonder if there is something else going on with your build. Maybe the versions are not as you expect and are being overridden somehow?

dizzzz commented 6 years ago

I see the same issue too. Maybe a maven caching thingy?

joelittlejohn commented 6 years ago

Sorry, I realise now that the change that was expected to fix this was not included in 0.4.0. This issue should (hopefully) be fixed if you use 0.4.1.

tymur-berezhnoi commented 5 years ago

Sorry, I realise now that the change that was expected to fix this was not included in 0.4.0. This issue should (hopefully) be fixed if you use 0.4.1.

Works for me in version 0.4.1.