Mule application in anypoint studio throws Caused by: java.lang.ClassNotFoundException: com.google.common.cache.CacheLoader error - mule

When i try to run Mule application I get[1],
Im not using gauva library as dependency in my pom.pacakging is defined as
<packaging>mule-application</packaging>
Why I get this error? How can I overcome?
Im using anypoint studio version =7.4.1 which uses mule runtime 4.2.2
[1]
Initializing app 'admin-api-v1' +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
ERROR 2020-02-04 09:47:08,034 [WrapperListener_start_runner] [event: ] org.mule.runtime.module.deployment.impl.internal.application.DefaultMuleApplication: java.lang.NoClassDefFoundError: com/google/common/cache/CacheLoader
java.lang.ClassNotFoundException: com.google.common.cache.CacheLoader
at java.net.URLClassLoader.findClass(URLClassLoader.java:382) ~[?:1.8.0_242]
at org.mule.runtime.module.artifact.api.classloader.FineGrainedControlClassLoader.findLocalClass(FineGrainedControlClassLoader.java:173) ~[mule-module-artifact-4.2.2.jar:4.2.2]
at org.mule.runtime.module.artifact.api.classloader.FineGrainedControlClassLoader.loadClass(FineGrainedControlClassLoader.java:90) ~[mule-module-artifact-4.2.2.jar:4.2.2]
at org.mule.runtime.module.artifact.api.classloader.MuleArtifactClassLoader.loadClass(MuleArtifactClassLoader.java:255) ~[mule-module-artifact-4.2.2.jar:4.2.2]
at java.lang.ClassLoader.loadClass(ClassLoader.java:352) ~[?:1.8.0_242]
at java.lang.Class.getDeclaredFields0(Native Method) ~[?:1.8.0_242]
at java.lang.Class.privateGetDeclaredFields(Class.java:2583) ~[?:1.8.0_242]
at java.lang.Class.getDeclaredFields(Class.java:1916) ~[?:1.8.0_242]
at org.mule.runtime.module.extension.internal.util.IntrospectionUtils.lambda$getFieldsStream$25(IntrospectionUtils.java:995) ~[mule-module-extensions-support-4.2.2.jar:4.2.2]
at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:269) ~[?:1.8.0_242]
at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948) ~[?:1.8.0_242]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) ~[?:1.8.0_242]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) ~[?:1.8.0_242]
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[?:1.8.0_242]
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0_242]
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:566) ~[?:1.8.0_242]
at org.mule.runtime.module.extension.internal.util.IntrospectionUtils.getFields(IntrospectionUtils.java:968) ~[mule-module-extensions-support-4.2.2.jar:4.2.2]
at org.mule.runtime.module.extension.internal.loader.java.type.runtime.TypeWrapper.getFields(TypeWrapper.java:120) ~[mule-module-extensions-support-4.2.2.jar:4.2.2]
at org.mule.runtime.module.extension.internal.loader.java.type.runtime.TypeWrapper.getAnnotatedFields(TypeWrapper.java:149) ~[mule-module-extensions-support-4.2.2.jar:4.2.2]
at org.mule.runtime.module.extension.internal.loader.java.type.runtime.ConfigurationWrapper.<init>(ConfigurationWrapper.java:32) ~[mule-module-extensions-support-4.2.2.jar:4.2.2]
at org.mule.runtime.module.extension.internal.loader.java.type.runtime.ExtensionTypeWrapper.lambda$getConfigurations$1(ExtensionTypeWrapper.java:50) ~[mule-module-extensions-support-4.2.2.jar:4.2.2]
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[?:1.8.0_242]
at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948) ~[?:1.8.0_242]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) ~[?:1.8.0_242]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) ~[?:1.8.0_242]
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[?:1.8.0_242]
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0_242]
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:566) ~[?:1.8.0_242]
at org.mule.runtime.module.extension.internal.loader.java.type.runtime.ExtensionTypeWrapper.getConfigurations(ExtensionTypeWrapper.java:51) ~[mule-module-extensions-support-4.2.2.jar:4.2.2]
at org.mule.runtime.module.extension.internal.loader.java.ConfigModelLoaderDelegate.declareConfigurations(ConfigModelLoaderDelegate.java:47) ~[mule-module-extensions-support-4.2.2.jar:4.2.2]
at org.mule.runtime.module.extension.internal.loader.java.DefaultJavaModelLoaderDelegate.declare(DefaultJavaModelLoaderDelegate.java:119) ~[mule-module-extensions-support-4.2.2.jar:4.2.2]
at org.mule.runtime.module.extension.api.loader.AbstractJavaExtensionModelLoader.declareExtension(AbstractJavaExtensionModelLoader.java:186) ~[mule-module-extensions-support-4.2.2.jar:4.2.2]
at org.mule.runtime.extension.api.loader.ExtensionModelLoader.loadExtensionModel(ExtensionModelLoader.java:71) ~[mule-extensions-api-1.2.2.jar:?]
at org.mule.runtime.module.deployment.impl.internal.artifact.ExtensionModelDiscoverer.discoverExtensionThroughJsonDescriber(ExtensionModelDiscoverer.java:125) ~[mule-module-deployment-model-impl-4.2.2.jar:4.2.2]
at org.mule.runtime.module.deployment.impl.internal.artifact.ExtensionModelDiscoverer.lambda$null$0(ExtensionModelDiscoverer.java:76) ~[mule-module-deployment-model-impl-4.2.2.jar:4.2.2]
at java.util.Optional.map(Optional.java:215) ~[?:1.8.0_242]
at org.mule.runtime.module.deployment.impl.internal.artifact.ExtensionModelDiscoverer.lambda$discoverPluginsExtensionModels$1(ExtensionModelDiscoverer.java:76) ~[mule-module-deployment-model-impl-4.2.2.jar:4.2.2]
at java.util.ArrayList.forEach(ArrayList.java:1257) ~[?:1.8.0_242]
at org.mule.runtime.module.deployment.impl.internal.artifact.ExtensionModelDiscoverer.discoverPluginsExtensionModels(ExtensionModelDiscoverer.java:68) ~[mule-module-deployment-model-impl-4.2.2.jar:4.2.2]
at org.mule.runtime.module.deployment.impl.internal.policy.ArtifactExtensionManagerFactory.create(ArtifactExtensionManagerFactory.java:70) ~[mule-module-deployment-model-impl-4.2.2.jar:4.2.2]
at org.mule.runtime.module.deployment.impl.internal.policy.ArtifactExtensionManagerFactory.create(ArtifactExtensionManagerFactory.java:61) ~[mule-module-deployment-model-impl-4.2.2.jar:4.2.2]
at org.mule.runtime.module.deployment.impl.internal.artifact.ArtifactExtensionManagerConfigurationBuilder.doConfigure(ArtifactExtensionManagerConfigurationBuilder.java:48) ~[mule-module-deployment-model-impl-4.2.2.jar:4.2.2]
at org.mule.runtime.core.api.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:53) ~[mule-core-4.2.2.jar:4.2.2]
at org.mule.runtime.core.api.context.DefaultMuleContextFactory$1.configure(DefaultMuleContextFactory.java:65) ~[mule-core-4.2.2.jar:4.2.2]
at org.mule.runtime.core.api.context.DefaultMuleContextFactory.doCreateMuleContext(DefaultMuleContextFactory.java:187) ~[mule-core-4.2.2.jar:4.2.2]
at org.mule.runtime.core.api.context.DefaultMuleContextFactory.createMuleContext(DefaultMuleContextFactory.java:59) ~[mule-core-4.2.2.jar:4.2.2]
at org.mule.runtime.module.deployment.impl.internal.artifact.ArtifactContextBuilder.lambda$build$2(ArtifactContextBuilder.java:499) ~[mule-module-deployment-model-impl-4.2.2.jar:4.2.2]
at org.mule.runtime.core.api.util.ExceptionUtils.tryExpecting(ExceptionUtils.java:227) ~[mule-core-4.2.2.jar:4.2.2]
at org.mule.runtime.core.api.util.ClassUtils.withContextClassLoader(ClassUtils.java:915) ~[mule-core-4.2.2.jar:4.2.2]
at org.mule.runtime.core.api.util.ClassUtils.withContextClassLoader(ClassUtils.java:879) ~[mule-core-4.2.2.jar:4.2.2]
at org.mule.runtime.module.deployment.impl.internal.artifact.ArtifactContextBuilder.build(ArtifactContextBuilder.java:409) ~[mule-module-deployment-model-impl-4.2.2.jar:4.2.2]
at org.mule.runtime.module.deployment.impl.internal.application.DefaultMuleApplication.doInit(DefaultMuleApplication.java:239) ~[mule-module-deployment-model-impl-4.2.2.jar:4.2.2]
at org.mule.runtime.module.deployment.impl.internal.application.DefaultMuleApplication.init(DefaultMuleApplication.java:207) ~[mule-module-deployment-model-impl-4.2.2.jar:4.2.2]
at org.mule.runtime.core.api.util.ClassUtils.lambda$withContextClassLoader$9(ClassUtils.java:860) ~[mule-core-4.2.2.jar:4.2.2]
at org.mule.runtime.core.api.util.ExceptionUtils.tryExpecting(ExceptionUtils.java:227) [mule-core-4.2.2.jar:4.2.2]
at org.mule.runtime.core.api.util.ClassUtils.withContextClassLoader(ClassUtils.java:915) [mule-core-4.2.2.jar:4.2.2]
at org.mule.runtime.core.api.util.ClassUtils.withContextClassLoader(ClassUtils.java:879) [mule-core-4.2.2.jar:4.2.2]
at org.mule.runtime.core.api.util.ClassUtils.withContextClassLoader(ClassUtils.java:859) [mule-core-4.2.2.jar:4.2.2]
at org.mule.runtime.module.deployment.impl.internal.artifact.DeployableArtifactWrapper.executeWithinArtifactClassLoader(DeployableArtifactWrapper.java:140) [mule-module-deployment-model-impl-4.2.2.jar:4.2.2]
at org.mule.runtime.module.deployment.impl.internal.artifact.DeployableArtifactWrapper.init(DeployableArtifactWrapper.java:83) [mule-module-deployment-model-impl-4.2.2.jar:4.2.2]
at org.mule.runtime.module.deployment.internal.DefaultArtifactDeployer.doInit(DefaultArtifactDeployer.java:63) [mule-module-deployment-4.2.2.jar:4.2.2]
at org.mule.runtime.module.deployment.internal.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:28) [mule-module-deployment-4.2.2.jar:4.2.2]
at org.mule.runtime.module.deployment.internal.DefaultArchiveDeployer.deployArtifact(DefaultArchiveDeployer.java:448) [mule-module-deployment-4.2.2.jar:4.2.2]
at org.mule.runtime.module.deployment.internal.DefaultArchiveDeployer.internalDeployPackagedArtifact(DefaultArchiveDeployer.java:530) [mule-module-deployment-4.2.2.jar:4.2.2]
at org.mule.runtime.module.deployment.internal.DefaultArchiveDeployer.deployOrRedeployPackagedArtifact(DefaultArchiveDeployer.java:495) [mule-module-deployment-4.2.2.jar:4.2.2]
at org.mule.runtime.module.deployment.internal.DefaultArchiveDeployer.deployPackagedArtifact(DefaultArchiveDeployer.java:377) [mule-module-deployment-4.2.2.jar:4.2.2]
at org.mule.runtime.module.deployment.internal.DefaultArchiveDeployer.deployPackagedArtifact(DefaultArchiveDeployer.java:53) [mule-module-deployment-4.2.2.jar:4.2.2]
at org.mule.runtime.module.deployment.internal.DeploymentDirectoryWatcher.deployPackedApps(DeploymentDirectoryWatcher.java:241) [mule-module-deployment-4.2.2.jar:4.2.2]
at org.mule.runtime.module.deployment.internal.DeploymentDirectoryWatcher.run(DeploymentDirectoryWatcher.java:312) [mule-module-deployment-4.2.2.jar:4.2.2]
at org.mule.runtime.module.deployment.internal.DeploymentDirectoryWatcher.start(DeploymentDirectoryWatcher.java:153) [mule-module-deployment-4.2.2.jar:4.2.2]
at org.mule.runtime.module.deployment.internal.MuleDeploymentService.start(MuleDeploymentService.java:143) [mule-module-deployment-4.2.2.jar:4.2.2]
at org.mule.runtime.module.launcher.MuleContainer.start(MuleContainer.java:252) [mule-module-launcher-4.2.2.jar:4.2.2]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_242]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_242]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_242]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_242]
at org.mule.runtime.module.reboot.internal.MuleContainerWrapper.start(MuleContainerWrapper.java:49) [mule-module-boot-ee-4.2.2.jar:4.2.2]
at org.tanukisoftware.wrapper.WrapperManager$11.run(WrapperManager.java:4429) [wrapper-3.5.37.jar:3.5.37]
INFO 2020-02-04 09:47:08,041 [WrapperListener_start_runner] [event: ] org.mule.runtime.module.deployment.impl.internal.artifact.AbstractDeployableArtifact: Application 'delwp-api-mule-hr-admin-api-v1' never started, nothing to dispose of
INFO 2020-02-04 09:47:08,041 [WrapperListener_start_runner] org.mule.runtime.core.internal.logging.LogUtil:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Disposing application 'admin-api-v1' +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
INFO 2020-02-04 09:47:08,363 [WrapperListener_start_runner] org.mule.runtime.core.internal.logging.LogUtil:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Failed to deploy artifact 'admin-api-v1', +
+ org.mule.runtime.deployment.model.api.DeploymentInitException: +
+ ClassNotFoundException: com.google.common.cache.CacheLoader +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
ERROR 2020-02-04 09:47:08,363 [WrapperListener_start_runner] org.mule.runtime.module.deployment.internal.DefaultArchiveDeployer: Failed to deploy artifact [delwp-api-mule-hr-admin-api-v1]
org.mule.runtime.deployment.model.api.DeploymentException: Failed to deploy artifact [delwp-api-mule-hr-admin-api-v1]
Caused by: org.mule.runtime.api.exception.MuleRuntimeException: org.mule.runtime.deployment.model.api.DeploymentInitException: ClassNotFoundException: com.google.common.cache.CacheLoader
Caused by: org.mule.runtime.deployment.model.api.DeploymentInitException: ClassNotFoundException: com.google.common.cache.CacheLoader
Caused by: org.mule.runtime.core.api.config.ConfigurationException: java.lang.NoClassDefFoundError: com/google/common/cache/CacheLoader
Caused by: java.lang.RuntimeException: java.lang.NoClassDefFoundError: com/google/common/cache/CacheLoader
EDIT
When i do #mvn dependency:tree -Dverbose I could not find any dependency for google.common.cache library. But there are several guava libaray dependencies, which are omitted for conflict
Line 86: [INFO] | | +- com.google.code.gson:gson:jar:2.6.2:compile
Line 88: [INFO] | | +- (com.google.guava:guava:jar:23.5-jre:compile - omitted for duplicate)
Line 98: [INFO] | | +- (com.google.guava:guava:jar:23.5-jre:compile - omitted for duplicate)
Line 115: [INFO] | | +- (com.google.code.gson:gson:jar:2.5:compile - omitted for conflict with 2.6.2)
Line 118: [INFO] | | | +- (com.google.guava:guava:jar:19.0:compile - omitted for conflict with 23.5-jre)
Line 137: [INFO] | +- com.google.guava:guava:jar:23.5-jre:compile
Line 138: [INFO] | | +- (com.google.code.findbugs:jsr305:jar:1.3.9:compile - omitted for conflict with 3.0.0)
Line 140: [INFO] | | +- com.google.errorprone:error_prone_annotations:jar:2.0.18:compile
Line 141: [INFO] | | +- com.google.j2objc:j2objc-annotations:jar:1.1:compile
Line 144: [INFO] | | \- (com.google.guava:guava:jar:15.0:compile - omitted for conflict with 23.5-jre)
Line 159: [INFO] | | \- (com.google.guava:guava:jar:23.5-jre:compile - omitted for duplicate)
Line 165: [INFO] | \- (com.google.guava:guava:jar:25.1-jre:compile - omitted for conflict with 23.5-jre)
Line 184: [INFO] | | | +- com.googlecode.libphonenumber:libphonenumber:jar:8.0.0:compile
Line 193: [INFO] | | \- com.googlecode.juniversalchardet:juniversalchardet:jar:1.0.3:compile
Line 194: [INFO] | +- com.google.code.findbugs:jsr305:jar:3.0.0:compile
Line 195: [INFO] | +- (com.google.guava:guava:jar:25.0-jre:compile - omitted for conflict with 23.5-jre)
Line 201: [INFO] | | | +- com.google.code.findbugs:annotations:jar:3.0.0:compile
Line 205: [INFO] | | +- (com.googlecode.juniversalchardet:juniversalchardet:jar:1.0.3:compile - omitted for duplicate)
Line 211: [INFO] | | +- (com.google.code.findbugs:jsr305:jar:3.0.0:compile - omitted for duplicate)
Line 212: [INFO] | | +- (com.google.guava:guava:jar:25.0-jre:compile - omitted for conflict with 23.5-jre)
Line 220: [INFO] | | +- (com.google.code.findbugs:jsr305:jar:3.0.0:compile - omitted for duplicate)
Line 221: [INFO] | | +- (com.google.guava:guava:jar:25.0-jre:compile - omitted for conflict with 23.5-jre)
Line 227: [INFO] | | \- (com.google.guava:guava:jar:25.0-jre:compile - omitted for conflict with 23.5-jre)
Line 237: [INFO] | +- (com.google.guava:guava:jar:23.5-jre:compile - omitted for duplicate)
Line 246: [INFO] | +- (com.google.guava:guava:jar:23.5-jre:compile - omitted for duplicate)
Line 256: [INFO] | | +- (com.google.guava:guava:jar:19.0:test - omitted for conflict with 23.5-jre)
Line 264: [INFO] | +- (com.google.code.gson:gson:jar:2.6.2:compile - scope updated from test; omitted for duplicate)
Line 283: [INFO] | | \- (com.google.guava:guava:jar:23.5-jre:compile - omitted for duplicate)
Line 286: [INFO] | \- (com.google.guava:guava:jar:25.1-jre:compile - omitted for conflict with 23.5-jre)

The error seems to be caused by the json-logger module. It depends on Guava. Guava seems to depend on Google Cache, however it seems to not declare it as a library. Maybe it loads the cache library dynamically, or it is related to some shading. In any case it is a problem with that component and Guava.

Related

Why Gluon Mobile app for android platform fail to compile on wsl Ubuntu 20.04 LTS?

I am trying to develop android apk file by using wsl Ubuntu 20.04 LTS with maven plugins. I followed all requirements from https://docs.gluonhq.com/ and I have managed to perform some tasks correctly. The problem arise when running command
mvn -Pandroid gluonfx:build , compiling task failed and throws outputs as:
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------< com.gluonmaven.linux:gluonmavenlinux >----------------
[INFO] Building GluonMavenLinux 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- gluonfx-maven-plugin:1.0.16:build (default-cli) # gluonmavenlinux ---
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------< com.gluonmaven.linux:gluonmavenlinux >----------------
[INFO] Building GluonMavenLinux 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] >>> gluonfx-maven-plugin:1.0.16:compile (default-cli) > process-classes # gluonmavenlinux >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # gluonmavenlinux ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 6 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) # gluonmavenlinux ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 6 source files to /mnt/d/Epicstats/GluonMavenLinux/target/classes
[INFO]
[INFO] <<< gluonfx-maven-plugin:1.0.16:compile (default-cli) < process-classes # gluonmavenlinux <<<
[INFO]
[INFO]
[INFO] --- gluonfx-maven-plugin:1.0.16:compile (default-cli) # gluonmavenlinux ---
[Tue Dec 06 15:05:28 EAT 2022][INFO] ==================== COMPILE TASK ====================
_______ ___ __ __ _______ __ _
| || | | | | || || | | |
| ___|| | | | | || _ || |_| |
| | __ | | | |_| || | | || |
| || || |___ | || |_| || _ |
| |_| || || || || | | |
|_______||_______||_______||_______||_| |__|
Access to the latest docs, tips and tricks and more info on
[Tue Dec 06 15:05:30 EAT 2022][INFO] We will now compile your code for aarch64-linux-android. This may take some time.
how to get support? Register your usage of Gluon Substrate now at
https://gluonhq.com/activate
[Tue Dec 06 15:05:30 EAT 2022][SEVERE] Process compile-additional-sources failed with result: 2
Check the log files under /mnt/d/Epicstats/GluonMavenLinux/target/gluonfx/aarch64-android/gvm/log
And please check https://docs.gluonhq.com/ for more information.
[Tue Dec 06 15:05:30 EAT 2022][INFO] Logging process [compile-additional-sources] to file: /mnt/d/Epicstats/GluonMavenLinux/target/gluonfx/log/process-compile-additional-sources-1670328330610.log
[Tue Dec 06 15:05:30 EAT 2022][SEVERE] Compiling failed.
Check the log files under /mnt/d/Epicstats/GluonMavenLinux/target/gluonfx/aarch64-android/gvm/log
And please check https://docs.gluonhq.com/ for more information.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.542 s
[INFO] Finished at: 2022-12-06T15:05:30+03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.gluonhq:gluonfx-maven-plugin:1.0.16:compile (default-cli) on project gluonmavenlinux: Compiling failed -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 13.094 s
[INFO] Finished at: 2022-12-06T15:05:30+03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.gluonhq:gluonfx-maven-plugin:1.0.16:build (default-cli) on project gluonmavenlinux: Error, gluonfx:build failed -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.gluonhq:gluonfx-maven-plugin:1.0.16:build (default-cli) on project gluonmavenlinux: Error, gluonfx:build failed
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:375)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error, gluonfx:build failed
at com.gluonhq.NativeBuildMojo.execute (NativeBuildMojo.java:82)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:370)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
I have tried to resolve the problem by not running mvn -Pandroid gluonfx:build
and running mvn -Pandroid gluonfx:compile but the problem still exit. Later on I discovered that gluonfx:build is a combination of gluonfx:compile and gluonfx:link
Where might I be making mistakes, anyone who has an Idea.
I am using:
JDK 11
apache-maven-3.8.1
android-ndk-r25b
graalvm-svm-java11-linux-gluon-22.1.0.1-Final

Mule esb 3.5 zip file

My Mule run as service mode
I have one app test in ~/test/mule and an other app prod in ~/prod/mule
Before, when I was deploying my project by deploy.sh (mvn clean install -P ${ENV}) a zip file was created in the commun folder /soft/mule-standalone-3.5.0/apps and Mule updated the application. It like this I do update of my Mule.
This worked until Friday 08.
Now when a .zip is in the /apps, Mule do nothing.
I deleted the anchor.txt file and its folder. The appliation print errors messages and I uploada new zip file in /soft/mule-standalone-3.5.0/apps folder, but there is still nothing going on.
best regard.
Mule status
./mule status
Mule is running (23770).
Maven log
DEPLOY ###### [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building middleware-services 2.2.0 [INFO]
------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) #
middleware-services --- [INFO] Deleting
/home/aeschbach/test/mule/target [INFO] [INFO] ---
maven-mule-plugin:1.9:attach-test-resources
(default-attach-test-resources) # middleware-services --- [INFO]
attaching test resource /home/aeschbach/test/mule/src/main/app [INFO]
[INFO] --- build-helper-maven-plugin:1.7:add-resource (add-resource) #
middleware-services --- [INFO] [INFO] ---
maven-resources-plugin:3.0.1:resources (default-resources) #
middleware-services --- [INFO] Using 'UTF-8' encoding to copy filtered
resources. [INFO] Copying 11 resources [INFO] Copying 4 resources
[INFO] skip non existing resourceDirectory
/home/aeschbach/test/mule/src/main/api [INFO] Copying 3 resources
[INFO] [INFO] --- maven-mule-plugin:1.9:filter-resources
(default-filter-resources) # middleware-services --- [INFO] [INFO] ---
maven-compiler-plugin:2.3.2:compile (default-compile) #
middleware-services --- [INFO] Compiling 169 source files to
/home/aeschbach/test/mule/target/classes [INFO] [INFO] ---
maven-resources-plugin:3.0.1:testResources (default-testResources) #
middleware-services --- [INFO] Using 'UTF-8' encoding to copy filtered
resources. [INFO] Copying 0 resource [INFO] Copying 4 resources [INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile
(default-testCompile) # middleware-services --- [INFO] Compiling 2
source files to /home/aeschbach/test/mule/target/test-classes [INFO]
[INFO] --- maven-surefire-plugin:2.19.1:test (default-test) #
middleware-services ---
------------------------------------------------------- T E S T S
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO] [INFO] --- maven-mule-plugin:1.9:mule (default-mule) #
middleware-services --- [INFO] Copying classes directly [INFO] Adding
org.apache.pdfbox:jempbox:jar:1.8.9 as a lib [INFO] Adding
com.itextpdf:itextpdf:jar:5.5.13 as a lib [INFO] Adding
commons-logging:commons-logging:jar:1.1.1 as a lib [INFO] Adding
org.apache.pdfbox:pdfbox:jar:1.8.9 as a lib [INFO] Adding
org.apache.httpcomponents:httpcore:jar:4.4.10 as a lib [INFO] Adding
commons-dbcp:commons-dbcp:jar:1.4 as a lib [INFO] Adding
com.fasterxml.jackson.core:jackson-databind:jar:2.11.0 as a lib
[INFO] Adding org.mockito:mockito-all:jar:1.9.5 as a lib [INFO]
Adding net.sf.barcode4j:barcode4j:jar:2.1 as a lib [INFO] Adding
org.jvnet:mimepull:jar:1.6 as a lib [INFO] Adding
mysql:mysql-connector-java:jar:5.1.6 as a lib [INFO] Adding
org.apache.httpcomponents:httpclient:jar:4.5.6 as a lib [INFO]
Adding com.jcraft:jsch:jar:0.1.42 as a lib [INFO] Adding
com.fasterxml.jackson.core:jackson-core:jar:2.11.0 as a lib [INFO]
Adding com.fasterxml.jackson.core:jackson-annotations:jar:2.11.0 as
a lib [INFO] Adding org.apache.pdfbox:fontbox:jar:1.8.9 as a lib
[INFO] Adding com.sun.jersey.contribs:jersey-multipart:jar:1.6 as a
lib [INFO] Adding com.oracle:ojdbc:jar:8 as a lib [INFO] Copying
mappings [INFO] Building zip:
/home/aeschbach/test/mule/target/middleware-services-test.zip [INFO]
already added, skipping [INFO] [INFO] ---
maven-install-plugin:2.3.1:install (default-install) #
middleware-services --- [INFO] No primary artifact to install,
installing attached artifacts instead. [INFO] Installing
/home/aeschbach/test/mule/pom.xml to
/home/aeschbach/.m2/repository/ch/koala/middleware-services/2.2.0/middleware-services-2.2.0.pom
[INFO] Installing
/home/aeschbach/test/mule/target/middleware-services-test.zip to
/home/aeschbach/.m2/repository/ch/koala/middleware-services/2.2.0/middleware-services-2.2.0.zip
[INFO] [INFO] --- maven-mule-plugin:1.9:install (default-install) #
middleware-services --- [INFO] Copying
/home/aeschbach/test/mule/target/middleware-services-test.zip to
/soft/mule-standalone-3.5.0/apps/middleware-services-test.temp [INFO]
Renaming
/soft/mule-standalone-3.5.0/apps/middleware-services-test.temp to
/soft/mule-standalone-3.5.0/apps/middleware-services-test.zip [INFO]
------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO]
------------------------------------------------------------------------ [INFO] Total time: 9.566s [INFO] Finished at: Wed Oct 14 11:47:03 CEST
2020 [INFO] Final Memory: 52M/709M [INFO]
test - DEPLOYMENT SUCCESS
Mule.log
Message : Failed to invoke
JerseyResourcesComponent{restWebServices.component.394477431}.
Component that caused exception is:
JerseyResourcesComponent{restWebServices.component.394477431}. Message
payload is of type: String Type :
org.mule.component.ComponentException Code :
MULE_ERROR--2 JavaDoc :
http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/component/ComponentException.html
Payload : /rest/v1/doc
******************************************************************************** Exception stack is:
null (java.lang.NullPointerException) java.io.Reader:78 (null)
Failed to invoke JerseyResourcesComponent{restWebServices.component.394477431}.
Component that caused exception is:
JerseyResourcesComponent{restWebServices.component.394477431}. Message
payload is of type: String (org.mule.component.ComponentException)
org.mule.component.AbstractComponent:144
(http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/component/ComponentException.html)
******************************************************************************** Root Exception stack trace: java.lang.NullPointerException at
java.io.Reader.(Reader.java:78) at
java.io.InputStreamReader.(InputStreamReader.java:72) at
ch.koala.utils.Util.getStringFromInputStream(Util.java:58) at
ch.koala.services.RestServices.getAPIDoc(RestServices.java:1320) at
sun.reflect.GeneratedMethodAccessor740.invoke(Unknown Source) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497) at
com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:187)
at
com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:71)
at
com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:280)
at
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at
com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
at
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at
com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
at
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1341)
at
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1273)
at
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1223)
at
org.mule.module.jersey.JerseyResourcesComponent.doInvoke(JerseyResourcesComponent.java:159)
at
org.mule.component.AbstractComponent.invokeInternal(AbstractComponent.java:122)
at
org.mule.component.AbstractComponent.access$000(AbstractComponent.java:57)
at
org.mule.component.AbstractComponent$1$1.process(AbstractComponent.java:238)
at
org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)
at
org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:58)
at
org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
at
org.mule.interceptor.AbstractEnvelopeInterceptor.process(AbstractEnvelopeInterceptor.java:51)
at
org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)
at
org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:58)
at
org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
at
org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)
at
org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:58)
at
org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
at
org.mule.component.AbstractComponent.process(AbstractComponent.java:156)
at
org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)
at
org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:58)
at
org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
at
org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)
at
org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
at
org.mule.processor.AsyncInterceptingMessageProcessor.process(AsyncInterceptingMessageProcessor.java:97)
at
org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)
at
org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:58)
at
org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
at
org.mule.construct.DynamicPipelineMessageProcessor.process(DynamicPipelineMessageProcessor.java:54)
at
org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)
at
org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:58)
at
org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
at
org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.jav...

"error: cannot access Killable" while compiling the code with selenium java 3.11 libraries

The code compilation is failing with "error: cannot access Killable" at the line
class FirefoxWebDriver extends FirefoxDriver{
......
We have upgraded to Selenium 3.11 from 3.3.1. We are trying to run tests on browser configured with selenium grid using Docker. I found that Killable class was removed. Kindly suggest if I need update any code chagnes.
Thanks.
It is tough to analyze/conclude without your Project Setup information (i.e. you are using Selenium JARs, Ant, Maven or Gradle), your code trials and the error stack trace.
However this error message...
error: cannot access Killable
...implies that your program faced an error while while accessing Killable.
Killable.class file
As per the discussion Killable ClassNotFound the Killable.class file was contained in selenium-api-2.21.0.jar. Additionally, using Maven dependency of selenium-server 2.21.0 produced the error:
Exception in thread "main" java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/openqa/selenium/internal/Killable
Explaination
As you have mentioned you have upgraded from Selenium 3.3.1 to Selenium 3.11 the possible reason is version conflict among the binaries you are using either in the form of JARs, Maven or Gradle dependency and can be due to presence of one/multiple among the following:
selenium-server 2.21.0.jar
selenium-api-2.21.0.jar
Maven dependency of selenium-server 2.21.0 or selenium-api-2.21.0
Gradle dependency of selenium-server 2.21.0 or selenium-api-2.21.0
Solution
If you are using Selenium Java Jars download and add the respective jar/jars either (from):
selenium-server-standalone-3.11.0.jar
selenium-java-3.11.0.zip
If you are using Maven dependency for Selenium use either of the following:
Selenium Java Client dependency:
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.11.0</version>
</dependency>
Selenium Server dependency:
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>3.11.0</version>
</dependency>
trivia
If you are using Maven you can add this block in your root pom (within the build section just add to the plugins) to troubleshoot the different versions of binaries you got.
<build>
<plugins>
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<id>enforce</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<DependencyConvergence />
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
For your reference selenium-server 2.21.0 output tree was as follows:
[INFO] \- org.seleniumhq.selenium:selenium-server:jar:2.21.0:compile
[INFO] +- org.bouncycastle:bcprov-jdk15on:jar:1.47:compile
[INFO] +- mx4j:mx4j-tools:jar:3.0.1:compile
[INFO] +- org.mortbay.jetty:servlet-api-2.5:jar:6.1.9:compile
[INFO] +- org.seleniumhq.selenium:jetty-repacked:jar:7.6.1:compile
[INFO] +- net.jcip:jcip-annotations:jar:1.0:compile
[INFO] +- org.seleniumhq.selenium:selenium-java:jar:2.21.0:compile
[INFO] | +- org.seleniumhq.selenium:selenium-android-driver:jar:2.21.0:compile
[INFO] | | \- org.seleniumhq.selenium:selenium-remote-driver:jar:2.21.0:compile
[INFO] | | +- cglib:cglib-nodep:jar:2.1_3:compile
[INFO] | | +- org.json:json:jar:20080701:compile
[INFO] | | \- com.google.guava:guava:jar:11.0.1:compile
[INFO] | | \- com.google.code.findbugs:jsr305:jar:1.3.9:compile
[INFO] | +- org.seleniumhq.selenium:selenium-chrome-driver:jar:2.21.0:compile
[INFO] | +- org.seleniumhq.selenium:selenium-htmlunit-driver:jar:2.21.0:compile
[INFO] | | +- org.seleniumhq.selenium:selenium-api:jar:2.21.0:compile
[INFO] | | +- net.sourceforge.htmlunit:htmlunit:jar:2.9:compile
[INFO] | | | +- xalan:xalan:jar:2.7.1:compile
[INFO] | | | | \- xalan:serializer:jar:2.7.1:compile
[INFO] | | | +- commons-collections:commons-collections:jar:3.2.1:compile
[INFO] | | | +- commons-lang:commons-lang:jar:2.6:compile
[INFO] | | | +- org.apache.httpcomponents:httpmime:jar:4.1.2:compile
[INFO] | | | +- net.sourceforge.htmlunit:htmlunit-core-js:jar:2.9:compile
[INFO] | | | +- xerces:xercesImpl:jar:2.9.1:compile
[INFO] | | | | \- xml-apis:xml-apis:jar:1.3.04:compile
[INFO] | | | +- net.sourceforge.nekohtml:nekohtml:jar:1.9.15:compile
[INFO] | | | +- net.sourceforge.cssparser:cssparser:jar:0.9.5:compile
[INFO] | | | | \- org.w3c.css:sac:jar:1.3:compile
[INFO] | | | \- commons-logging:commons-logging:jar:1.1.1:compile
[INFO] | | \- org.apache.httpcomponents:httpclient:jar:4.1.2:compile
[INFO] | | \- org.apache.httpcomponents:httpcore:jar:4.1.2:compile
[INFO] | +- org.seleniumhq.selenium:selenium-firefox-driver:jar:2.21.0:compile
[INFO] | | +- commons-io:commons-io:jar:2.0.1:compile
[INFO] | | \- org.apache.commons:commons-exec:jar:1.1:compile
[INFO] | +- org.seleniumhq.selenium:selenium-ie-driver:jar:2.21.0:compile
[INFO] | | +- net.java.dev.jna:jna:jar:3.4.0:compile
[INFO] | | \- net.java.dev.jna:platform:jar:3.4.0:compile
[INFO] | +- org.seleniumhq.selenium:selenium-iphone-driver:jar:2.21.0:compile
[INFO] | +- org.seleniumhq.selenium:selenium-safari-driver:jar:2.21.0:compile
[INFO] | +- org.seleniumhq.selenium:selenium-support:jar:2.21.0:compile
[INFO] | \- org.webbitserver:webbit:jar:0.4.6:compile
[INFO] | \- org.jboss.netty:netty:jar:3.2.7.Final:compile
[INFO] +- org.yaml:snakeyaml:jar:1.8:compile
[INFO] \- commons-codec:commons-codec:jar:1.6:compile

while creating archetype getting following error

D:\Training\workspace\vppsource>mvn archetype:generate -B -DarchetypeGroupId=org
.appfuse.archetypes -DarchetypeArtifactId=appfuse-modular-struts-archetype -Darc
hetypeVersion=2.1.0-M1 -DgroupId=com.vmware -DartifactId=vpp
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [archetype:generate] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] Preparing archetype:generate
[INFO] No goals needed for project - skipping
[INFO] [archetype:generate {execution: default-cli}]
[INFO] Generating project in Batch mode
[WARNING] Error reading archetype catalog http://repo1.maven.org/maven2
org.apache.maven.wagon.TransferFailedException: Error transferring file: Connect
ion timed out: connect
at org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputD
ata(LightweightHttpWagon.java:143)
at org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:11
6)
at org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:88)
at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61)
at org.apache.maven.archetype.source.RemoteCatalogArchetypeDataSource.ge
tArchetypeCatalog(RemoteCatalogArchetypeDataSource.java:97)
at org.apache.maven.archetype.DefaultArchetypeManager.getRemoteCatalog(D
efaultArchetypeManager.java:195)
at org.apache.maven.archetype.DefaultArchetypeManager.getRemoteCatalog(D
efaultArchetypeManager.java:184)
at org.apache.maven.archetype.ui.DefaultArchetypeSelector.getArchetypesB
yCatalog(DefaultArchetypeSelector.java:278)
at org.apache.maven.archetype.ui.DefaultArchetypeSelector.selectArchetyp
e(DefaultArchetypeSelector.java:69)
at org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execu
te(CreateProjectFromArchetypeMojo.java:186)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:694)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
Goal(DefaultLifecycleExecutor.java:569)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:539)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:284)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:6
0)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at java.net.Socket.connect(Socket.java:478)
at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
at sun.net.www.http.HttpClient.(HttpClient.java:233)
at sun.net.www.http.HttpClient.New(HttpClient.java:306)
at sun.net.www.http.HttpClient.New(HttpClient.java:323)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLC
onnection.java:860)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConne
ction.java:801)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection
.java:726)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
nection.java:1049)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:373
)
at org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputD
ata(LightweightHttpWagon.java:115)
... 28 more
[WARNING] No archetype found in Remote catalog. Defaulting to internal Catalog
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 46 seconds
[INFO] Finished at: Wed Jun 09 16:11:07 IST 2010
[INFO] Final Memory: 11M/28M
[INFO] ------------------------------------------------------------------------
Are you behind a proxy server? You may need to configure proxy settings in your Maven settings.xml file.
I had the same problem.
Adding this:
<proxies>
<proxy>
<active>true</active>
<protocol>http</protocol>
<host>proxy.acme.com</host>
<port>8080</port>
<username>myusername</username>
<password>mypassword</password>
<nonProxyHosts></nonProxyHosts>
</proxy>
</proxies>
to the bottom of my C:\Users\myuser.m2\settings.xml file fixed the issue.
See http://maven.apache.org/guides/mini/guide-proxies.html for more details.

Problem using Maven with Cargo plug-in

When I'm using Maven with the cargo plug-ing to handle hot deployments to tomcat, maven fails on the clean task if the .war artifact doesn't currently exist. So if I run mvn clean, then mvn clean package - it errors out. What can I do to have cargo ignore that?
C:\work2\Fresh\fresh-ui>mvn clean
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building fresh-ui
[INFO] task-segment: [clean]
[INFO] ------------------------------------------------------------------------
[INFO] [cargo:deployer-undeploy {execution: clean-undeploy}]
[INFO] [mcat5xRemoteDeployer] Undeploying [C:\work2\Fresh\fresh-ui\target\fresh.
war]
[INFO] [clean:clean {execution: default-clean}]
[INFO] Deleting directory C:\work2\Fresh\fresh-ui\target
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5 seconds
[INFO] Finished at: Tue Aug 18 09:49:16 PDT 2009
[INFO] Final Memory: 9M/16M
[INFO] ------------------------------------------------------------------------
C:\work2\Fresh\fresh-ui>mvn clean
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building fresh-ui
[INFO] task-segment: [clean]
[INFO] ------------------------------------------------------------------------
[INFO] [cargo:deployer-undeploy {execution: clean-undeploy}]
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to create deployable for the parameters (container [id = [tomcat5x
]], deployable type [war]).
C:\work2\Fresh\fresh-ui\target\fresh.war (The system cannot find the path specif
ied)
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.codehaus.cargo.container.ContainerException: Failed to create deployable for
the parameters (container [id = [tomcat5x]], deployable type [war]).
at org.codehaus.cargo.generic.spi.AbstractGenericHintFactory.createImple
mentation(AbstractGenericHintFactory.java:157)
at org.codehaus.cargo.generic.spi.AbstractIntrospectionGenericHintFactor
y.createImplementation(AbstractIntrospectionGenericHintFactory.java:86)
at org.codehaus.cargo.generic.deployable.DefaultDeployableFactory.create
Deployable(DefaultDeployableFactory.java:163)
at org.codehaus.cargo.maven2.configuration.Deployable.createDeployable(D
eployable.java:136)
at org.codehaus.cargo.maven2.AbstractDeployerMojo.performDeployerActionO
nAllDeployables(AbstractDeployerMojo.java:99)
at org.codehaus.cargo.maven2.AbstractDeployerMojo.doExecute(AbstractDepl
oyerMojo.java:47)
at org.codehaus.cargo.maven2.AbstractCargoMojo.execute(AbstractCargoMojo
.java:255)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:483)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:678)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
fecycle(DefaultLifecycleExecutor.java:540)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:519)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:371)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:332)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:181)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:4
1)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.codehaus.cargo.generic.deployable.DefaultDeployableFactory.create
Instance(DefaultDeployableFactory.java:196)
at org.codehaus.cargo.generic.spi.AbstractGenericHintFactory.createImple
mentation(AbstractGenericHintFactory.java:153)
... 25 more
Caused by: org.codehaus.cargo.container.ContainerException: Failed to parse Tomc
at WAR file in [C:\work2\Fresh\fresh-ui\target\fresh.war]
at org.codehaus.cargo.container.tomcat.TomcatWAR.<init>(TomcatWAR.java:5
5)
... 31 more
Caused by: org.codehaus.cargo.util.CargoException: Failed to find file [C:\work2
\Fresh\fresh-ui\target\fresh.war]
at org.codehaus.cargo.util.DefaultFileHandler.getInputStream(DefaultFile
Handler.java:351)
at org.codehaus.cargo.module.DefaultJarArchive.getContentAsStream(Defaul
tJarArchive.java:231)
at org.codehaus.cargo.module.DefaultJarArchive.getResource(DefaultJarArc
hive.java:154)
at org.codehaus.cargo.module.webapp.tomcat.TomcatWarArchive.parseTomcatC
ontextXml(TomcatWarArchive.java:92)
at org.codehaus.cargo.module.webapp.tomcat.TomcatWarArchive.<init>(Tomca
tWarArchive.java:61)
at org.codehaus.cargo.container.tomcat.TomcatWAR.<init>(TomcatWAR.java:5
1)
... 31 more
Caused by: java.io.FileNotFoundException: C:\work2\Fresh\fresh-ui\target\fresh.w
ar (The system cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at org.codehaus.cargo.util.DefaultFileHandler.getInputStream(DefaultFile
Handler.java:347)
... 36 more
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.codehaus.cargo.generic.deployable.DefaultDeployableFactory.create
Instance(DefaultDeployableFactory.java:196)
at org.codehaus.cargo.generic.spi.AbstractGenericHintFactory.createImple
mentation(AbstractGenericHintFactory.java:153)
at org.codehaus.cargo.generic.spi.AbstractIntrospectionGenericHintFactor
y.createImplementation(AbstractIntrospectionGenericHintFactory.java:86)
at org.codehaus.cargo.generic.deployable.DefaultDeployableFactory.create
Deployable(DefaultDeployableFactory.java:163)
at org.codehaus.cargo.maven2.configuration.Deployable.createDeployable(D
eployable.java:136)
at org.codehaus.cargo.maven2.AbstractDeployerMojo.performDeployerActionO
nAllDeployables(AbstractDeployerMojo.java:99)
at org.codehaus.cargo.maven2.AbstractDeployerMojo.doExecute(AbstractDepl
oyerMojo.java:47)
at org.codehaus.cargo.maven2.AbstractCargoMojo.execute(AbstractCargoMojo
.java:255)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:483)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:678)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
fecycle(DefaultLifecycleExecutor.java:540)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:519)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:371)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:332)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:181)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:4
1)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.codehaus.cargo.container.ContainerException: Failed to parse Tomc
at WAR file in [C:\work2\Fresh\fresh-ui\target\fresh.war]
at org.codehaus.cargo.container.tomcat.TomcatWAR.<init>(TomcatWAR.java:5
5)
... 31 more
Caused by: org.codehaus.cargo.util.CargoException: Failed to find file [C:\work2
\Fresh\fresh-ui\target\fresh.war]
at org.codehaus.cargo.util.DefaultFileHandler.getInputStream(DefaultFile
Handler.java:351)
at org.codehaus.cargo.module.DefaultJarArchive.getContentAsStream(Defaul
tJarArchive.java:231)
at org.codehaus.cargo.module.DefaultJarArchive.getResource(DefaultJarArc
hive.java:154)
at org.codehaus.cargo.module.webapp.tomcat.TomcatWarArchive.parseTomcatC
ontextXml(TomcatWarArchive.java:92)
at org.codehaus.cargo.module.webapp.tomcat.TomcatWarArchive.<init>(Tomca
tWarArchive.java:61)
at org.codehaus.cargo.container.tomcat.TomcatWAR.<init>(TomcatWAR.java:5
1)
... 31 more
Caused by: java.io.FileNotFoundException: C:\work2\Fresh\fresh-ui\target\fresh.w
ar (The system cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at org.codehaus.cargo.util.DefaultFileHandler.getInputStream(DefaultFile
Handler.java:347)
... 36 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3 seconds
[INFO] Finished at: Tue Aug 18 09:49:22 PDT 2009
[INFO] Final Memory: 8M/16M
[INFO] ------------------------------------------------------------------------
C:\work2\Fresh\fresh-ui>
From what I can see, you've bound deployer-undeploy to the pre-clean phase of the clean lifecycle. Thus, when performing the first clean, the war is safely undeployed and then target is removed. When performing the second clean, cargo:deployer-undeploy can't find the war in target and fails.
To me, Cargo shouldn't fail and this is likely a bug in Cargo's maven 2 plugin or in the core API that should handle this case gracefully. I'd open an issue in Cargo's issue tracker.
As mentioned by Rich in a comment, the current workaround is to run clean only once.