0

While migration java from 8 to 11, all the junit mongo query are getting fail in jenkins Linux server.

Error. - -11:06:20.987 [main] WARN de.flapdoodle.embed.mongo.packageresolver.linux.LinuxPackageFinder - because there is no package for PRODUCTION:Platform{operatingSystem=Linux, architecture=X86_64} we fall back to PRODUCTION:Platform{operatingSystem=Linux, architecture=X86_64, version=Ubuntu_20_04}
09:36:21  11:06:21.031 [main] WARN 0% 1% 2% 3% 4% 5% 6% 7% 8% 9% 10% 11% 12% 13% 14% 15% 16% 17% 18% 19% 20% 21% 22% 23% 24% 25% 26% 27% 28% 29% 30% 31% 32% 33% 34% 35% 36% 37% 38% 39% 40% 41% 42% 43% 44% 45% 46% 47% 48% 49% 50% 51% 52% 53% 54% 55% 56% 57% 58% 59% 60% 61% 62% 63% 64% 65% 66% 67% 68% 69% 70% 71% 72% 73% 74% 75% 76% 77% 78% 79% 80% 81% 82% 83% 84% 85% 86% 87% 88% 89% 90% 91% 92% 93% 94% 95% 96% 97% 98% 99% 100% Download PRODUCTION:Platform{operatingSystem=Linux, architecture=X86_64} downloaded with 70794kb/s
09:36:21  Download PRODUCTION:Platform{operatingSystem=Linux, architecture=X86_64} DONE
09:36:21  11:06:20.987 [main] WARN de.flapdoodle.embed.mongo.packageresolver.linux.LinuxPackageFinder - because there is no package for PRODUCTION:Platform{operatingSystem=Linux, architecture=X86_64} we fall back to PRODUCTION:Platform{operatingSystem=Linux, architecture=X86_64, version=Ubuntu_20_04}
09:36:21  11:06:21.031 [main] WARN 

09:36:21  Extract /root/.embedmongo/linux/mongodb-linux-x86_64-ubuntu2004-4.4.17.tgz START
09:36:22  Extract /root/.embedmongo/linux/mongodb-linux-x86_64-ubuntu2004-4.4.17.tgz extract mongodb-linux-x86_64-ubuntu2004-4.4.17/bin/mongod
09:36:22  Extract /root/.embedmongo/linux/mongodb-linux-x86_64-ubuntu2004-4.4.17.tgz nothing left
09:36:22  Extract /root/.embedmongo/linux/mongodb-linux-x86_64-ubuntu2004-4.4.17.tgz DONE
09:36:22  
09:36:22  [mongod error]Error loading shared library libresolv.so.2: No such file or directory (needed by /tmp/extract-0b7e7b7a-a382-44e4-9742-b79b138cb3c1extractmongod)
09:36:22  [mongod error] Error relocating /tmp/../lib/ld-linux-x86-64.so.2: unsupported relocation type 37
09:36:22  [mongod error] Error relocating /tmp/extract-0b7e7b7a-a382-44e4-9742-b79b138cb3c1extractmongod: __snprintf_chk: symbol not found
09:36:22  [mongod error] Error relocating /tmp/extract-0b7e7b7a-a382-44e4-9742-b79b138cb3c1extractmongod: __memcpy_chk: symbol not found
09:36:22  [mongod error] Error relocating /tmp/extract-0b7e7b7a-a382-44e4-9742-
09:36:22  [mongod error] 
09:36:44  Exception java.lang.RuntimeException: Could not start process: 
09:36:44  ----------------------
09:36:44  Hmm.. no failure message.. 
09:36:44  ...the cause must be somewhere in the process output
09:36:44  ----------------------
09:36:44  
09:36:44

Previouly i was using flapdoodle 2.0.0 with jdk 8 it was working in local as well as jenkins. But i have migrated java 8 to 11 and flapdoodle 3.5.4 it is working in local but getting jenkins issue.

1 Answers1

0

Faced the same issue. Looks like there is a path and version mismatch. The version you are providing for embedded mongo builder as 'PRODUCTION' is deprecated.There is no such package available at mentioned package path.

After days of debugging, couldn't find any solution. But found a different library which works smoothly for the mentioned configuration.

Add the below dependency to your pom file:

<dependency>  <groupId>de.bwaldvogel</groupId>  <artifactId>mongo-java-server</artifactId>  <version>1.34.0</version>  <scope>test</scope></dependency>

Change the test configuration file as necessary. It should work smoothly.