Fuse 6.2 Integration with Websphere MQ 8.0.0.3 - ibm-mq
I am attempting to link the newest Jboss Fuse 6.2 with the newest Websphere MQ 8.0.0.3.
I am having issues where the application gives up waiting for the service:
[ERROR] Failed to execute goal org.apache.camel:camel-maven-plugin:2.15.1.redhat-620133:run (default-cli) on project WebsphereThroughput: null: MojoExecutionException: InvocationTargetException: Gave up waiting for service (objectClass=org.apache.camel.CamelContext) -> [Help 1]
I have added a ConnectionFactory to my blueprint source:
<bean id="wmq" class="org.apache.camel.component.jms.JmsComponent">
<property name="connectionFactory">
<bean class="com.ibm.jms.MQConnectionFactory">
<property name="transportType" value="1" />
<property name="hostName" value="<InsertIPAddressOfRemoteWMQServer>"/>
<property name="port" value="1414"/>
<property name="queueManager" value="WQM"/>
</bean>
</property>
</bean>
My route is simple and takes a message from a file and inserts it onto a Websphere MQ queue named INPUT:
<camelContext xmlns="http://camel.apache.org/schema/spring">
<route>
<from uri="file:C:\Users\Administrator\Desktop\test"/>
<to uri="wmq:queue:INPUT"/>
</route>
</camelContext>
Finally I have added the following IBM dependencies inside of the pom.xml file (As well as installing them onto my local maven repository):
<dependency>
<groupId>com.ibm.mq</groupId>
<artifactId>com.ibm.mq.allclient</artifactId>
<version>8.0.0.3</version>
</dependency>
<dependency>
<groupId>com.ibm</groupId>
<artifactId>com.ibm.mq</artifactId>
<version>8.0.0.3</version>
</dependency>
<dependency>
<groupId>com.ibm</groupId>
<artifactId>com.ibm.mqjms</artifactId>
<version>8.0.0.3</version>
</dependency>
<dependency>
<groupId>jms</groupId>
<artifactId>jms</artifactId>
<version>8.0.0.3</version>
</dependency>
I would appreciate any help as this has been stumping me for a while now. Thank you.
Stack Trace:
[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Camel Blueprint Route 1.0.0
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for com.sun.xml.bind:jaxb-core:jar:2.2.11 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for com.sun.xml.bind:jaxb-impl:jar:2.2.11 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # test ---
[INFO] Deleting C:\Users\Administrator\workspace\test\target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # test ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) # test ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-bundle-plugin:2.3.7:manifest (bundle-manifest) # test ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # test ---
[INFO] Not copying test resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) # test ---
[INFO] Not compiling test sources
[INFO]
[INFO] --- maven-surefire-plugin:2.18.1:test (default-test) # test ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-bundle-plugin:2.3.7:bundle (default-bundle) # test ---
[WARNING] Bundle org.Fuse.Testing:test:bundle:1.0.0 : Instructions in Private-Package, or -testpackages that are never used: org\.Fuse\.Testing\.test\..*|org\.Fuse\.Testing\.test
Classpath: Jar:.,Jar:camel-core,Jar:jaxb-core,Jar:jaxb-impl,Jar:camel-blueprint,Jar:camel-core-xml,Jar:camel-core-osgi,Jar:slf4j-api,Jar:slf4j-log4j12,Jar:log4j,Jar:camel-test-blueprint,Jar:camel-test,Jar:camel-core,Jar:org.apache.aries.blueprint,Jar:org.apache.aries.util,Jar:org.apache.aries.proxy.impl,Jar:org.apache.aries.proxy.api,Jar:de.kalpatec.pojosr.framework,Jar:pax-swissbox-tinybundles,Jar:ops4j-base-lang,Jar:ops4j-base-io,Jar:ops4j-base-monitors,Jar:ops4j-base-store,Jar:pax-swissbox-bnd,Jar:bndlib,Jar:commons-logging,Jar:junit,Jar:hamcrest-core,Jar:org.apache.felix.configadmin,Jar:org.apache.felix.fileinstall,Jar:camel-jms,Jar:camel-spring,Jar:spring-aop,Jar:aopalliance,Jar:spring-jms,Jar:spring-core,Jar:spring-messaging,Jar:spring-context,Jar:spring-expression,Jar:spring-tx,Jar:spring-beans
[INFO]
[INFO] >>> camel-maven-plugin:2.15.1.redhat-620133:run (default-cli) # test >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # test ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) # test ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-bundle-plugin:2.3.7:manifest (bundle-manifest) # test ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # test ---
[INFO] Not copying test resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) # test ---
[INFO] Not compiling test sources
[INFO]
[INFO] <<< camel-maven-plugin:2.15.1.redhat-620133:run (default-cli) # test <<<
[INFO]
[INFO] --- camel-maven-plugin:2.15.1.redhat-620133:run (default-cli) # test ---
[INFO] Using org.apache.camel.test.blueprint.Main to initiate a CamelContext
[WARNING] Invalid POM for com.sun.xml.bind:jaxb-core:jar:2.2.11, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] Invalid POM for com.sun.xml.bind:jaxb-impl:jar:2.2.11, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] Invalid POM for com.sun.xml.bind:jaxb-core:jar:2.2.11, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] Invalid POM for com.sun.xml.bind:jaxb-impl:jar:2.2.11, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] Invalid POM for com.sun.xml.bind:jaxb-core:jar:2.2.11, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] Invalid POM for com.sun.xml.bind:jaxb-impl:jar:2.2.11, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] Invalid POM for com.sun.xml.bind:jaxb-core:jar:2.2.11, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] Invalid POM for com.sun.xml.bind:jaxb-impl:jar:2.2.11, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO] Starting Camel ...
[mel.test.blueprint.Main.main()] MainSupport INFO Apache Camel 2.15.1.redhat-620133 starting
[mel.test.blueprint.Main.main()] Activator INFO Camel activator starting
[mel.test.blueprint.Main.main()] Activator INFO Camel activator started
[mel.test.blueprint.Main.main()] BlueprintExtender INFO No quiesce support is available, so blueprint components will not participate in quiesce operations
[ Blueprint Extender: 1] BlueprintContainerImpl INFO Bundle test is waiting for namespace handlers [http://camel.apache.org/schema/blueprint]
[ Blueprint Extender: 1] BeanRecipe WARN Object to be destroyed is not an instance of UnwrapperedBeanHolder, type: null
[ Blueprint Extender: 1] BlueprintCamelContext INFO Apache Camel 2.15.1.redhat-620133 (CamelContext: camel-1) is shutting down
[ Blueprint Extender: 1] BlueprintCamelContext INFO Apache Camel 2.15.1.redhat-620133 (CamelContext: camel-1) uptime not started
[ Blueprint Extender: 1] BlueprintCamelContext INFO Apache Camel 2.15.1.redhat-620133 (CamelContext: camel-1) is shutdown in 0.016 seconds
[ Blueprint Extender: 1] BlueprintContainerImpl ERROR Unable to start blueprint container for bundle test
org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to instantiate components
at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:672)
at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:370)
at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:261)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at org.apache.aries.blueprint.container.ExecutorServiceWrapper.run(ExecutorServiceWrapper.java:106)
at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: javax/jms/ConnectionFactory
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructors(Unknown Source)
at org.apache.aries.blueprint.container.BeanRecipe.findMatchingConstructors(BeanRecipe.java:509)
at org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecipe.java:327)
at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:806)
at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)
at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)
at java.util.concurrent.FutureTask.run(Unknown Source)
at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)
at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:245)
at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:183)
at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:668)
... 13 more
Caused by: java.lang.ClassNotFoundException: javax.jms.ConnectionFactory
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 26 more
[mel.test.blueprint.Main.main()] CamelBlueprintHelper WARN Test bundle headers: Bundle-ManifestVersion=2, Bundle-Name=System Bundle, Bundle-SymbolicName=de.kalpatec.pojosr.framework, Bundle-Vendor=kalpatec, Bundle-Version=0.2.1
[mel.test.blueprint.Main.main()] CamelBlueprintHelper WARN ServiceReference: [org.apache.camel.spi.TypeConverterLoader], bundle: org.apache.camel.camel-spring [28], symbolicName: org.apache.camel.camel-spring
[mel.test.blueprint.Main.main()] CamelBlueprintHelper WARN ServiceReference: [org.apache.camel.spi.DataFormatResolver], bundle: org.apache.camel.camel-core [3], symbolicName: org.apache.camel.camel-core
[mel.test.blueprint.Main.main()] CamelBlueprintHelper WARN ServiceReference: [org.osgi.framework.hooks.bundle.EventHook], bundle: org.apache.aries.blueprint [13], symbolicName: org.apache.aries.blueprint
[mel.test.blueprint.Main.main()] CamelBlueprintHelper WARN ServiceReference: [org.apache.felix.cm.PersistenceManager], bundle: org.apache.felix.configadmin [25], symbolicName: org.apache.felix.configadmin
[mel.test.blueprint.Main.main()] CamelBlueprintHelper WARN ServiceReference: [org.apache.aries.blueprint.NamespaceHandler], bundle: org.apache.aries.blueprint [13], symbolicName: org.apache.aries.blueprint
[mel.test.blueprint.Main.main()] CamelBlueprintHelper WARN ServiceReference: [org.apache.camel.spi.TypeConverterLoader], bundle: org.apache.camel.camel-core [3], symbolicName: org.apache.camel.camel-core
[mel.test.blueprint.Main.main()] CamelBlueprintHelper WARN ServiceReference: [org.apache.camel.spi.ComponentResolver], bundle: org.apache.camel.camel-spring [28], symbolicName: org.apache.camel.camel-spring
[mel.test.blueprint.Main.main()] CamelBlueprintHelper WARN ServiceReference: [org.osgi.service.cm.ConfigurationAdmin], bundle: org.apache.felix.configadmin [25], symbolicName: org.apache.felix.configadmin
[mel.test.blueprint.Main.main()] CamelBlueprintHelper WARN ServiceReference: [org.apache.aries.blueprint.NamespaceHandler], bundle: org.apache.aries.blueprint [13], symbolicName: org.apache.aries.blueprint
[mel.test.blueprint.Main.main()] CamelBlueprintHelper WARN ServiceReference: [org.osgi.service.url.URLStreamHandlerService], bundle: org.apache.felix.fileinstall [26], symbolicName: org.apache.felix.fileinstall
[mel.test.blueprint.Main.main()] CamelBlueprintHelper WARN ServiceReference: [org.osgi.service.startlevel.StartLevel], bundle: de.kalpatec.pojosr.framework [0], symbolicName: de.kalpatec.pojosr.framework
[mel.test.blueprint.Main.main()] CamelBlueprintHelper WARN ServiceReference: [org.osgi.service.cm.ManagedServiceFactory], bundle: org.apache.felix.fileinstall [26], symbolicName: org.apache.felix.fileinstall
[mel.test.blueprint.Main.main()] CamelBlueprintHelper WARN ServiceReference: [org.apache.aries.blueprint.NamespaceHandler], bundle: org.apache.aries.blueprint [13], symbolicName: org.apache.aries.blueprint
[mel.test.blueprint.Main.main()] CamelBlueprintHelper WARN ServiceReference: [org.apache.aries.blueprint.NamespaceHandler], bundle: org.apache.aries.blueprint [13], symbolicName: org.apache.aries.blueprint
[mel.test.blueprint.Main.main()] CamelBlueprintHelper WARN ServiceReference: [org.apache.aries.blueprint.services.ParserService], bundle: org.apache.aries.blueprint [13], symbolicName: org.apache.aries.blueprint
[mel.test.blueprint.Main.main()] CamelBlueprintHelper WARN ServiceReference: [org.apache.aries.blueprint.NamespaceHandler], bundle: org.apache.aries.blueprint [13], symbolicName: org.apache.aries.blueprint
[mel.test.blueprint.Main.main()] CamelBlueprintHelper WARN ServiceReference: [org.apache.aries.blueprint.NamespaceHandler], bundle: org.apache.camel.camel-blueprint [6], symbolicName: org.apache.camel.camel-blueprint
[mel.test.blueprint.Main.main()] CamelBlueprintHelper WARN ServiceReference: [org.osgi.service.packageadmin.PackageAdmin], bundle: de.kalpatec.pojosr.framework [0], symbolicName: de.kalpatec.pojosr.framework
[mel.test.blueprint.Main.main()] CamelBlueprintHelper WARN ServiceReference: [org.apache.aries.blueprint.NamespaceHandler], bundle: org.apache.aries.blueprint [13], symbolicName: org.apache.aries.blueprint
[mel.test.blueprint.Main.main()] CamelBlueprintHelper WARN ServiceReference: [org.osgi.service.blueprint.container.BlueprintContainer], bundle: org.apache.aries.blueprint [13], symbolicName: org.apache.aries.blueprint
[mel.test.blueprint.Main.main()] CamelBlueprintHelper WARN ServiceReference: [org.apache.camel.spi.TypeConverterLoader], bundle: de.kalpatec.pojosr.framework [0], symbolicName: de.kalpatec.pojosr.framework
[mel.test.blueprint.Main.main()] CamelBlueprintHelper WARN ServiceReference: [org.apache.camel.spi.LanguageResolver], bundle: org.apache.camel.camel-spring [28], symbolicName: org.apache.camel.camel-spring
[mel.test.blueprint.Main.main()] CamelBlueprintHelper WARN ServiceReference: [org.apache.camel.spi.LanguageResolver], bundle: org.apache.camel.camel-core [3], symbolicName: org.apache.camel.camel-core
[mel.test.blueprint.Main.main()] CamelBlueprintHelper WARN ServiceReference: [org.apache.camel.spi.ComponentResolver], bundle: org.apache.camel.camel-core [3], symbolicName: org.apache.camel.camel-core
[mel.test.blueprint.Main.main()] CamelBlueprintHelper WARN ServiceReference: [org.osgi.service.cm.ConfigurationListener, org.apache.felix.fileinstall.ArtifactListener, org.apache.felix.fileinstall.ArtifactInstaller], bundle: org.apache.felix.fileinstall [26], symbolicName: org.apache.felix.fileinstall
[mel.test.blueprint.Main.main()] CamelBlueprintHelper WARN ServiceReference: [org.apache.aries.proxy.ProxyManager], bundle: org.apache.aries.proxy.impl [15], symbolicName: org.apache.aries.proxy.impl
[mel.test.blueprint.Main.main()] CamelBlueprintHelper WARN ServiceReference: [org.osgi.service.blueprint.container.BlueprintContainer], bundle: org.apache.camel.camel-blueprint [6], symbolicName: org.apache.camel.camel-blueprint
[mel.test.blueprint.Main.main()] CamelBlueprintHelper WARN ServiceReference: [org.apache.camel.spi.ComponentResolver], bundle: org.apache.camel.camel-jms [27], symbolicName: org.apache.camel.camel-jms
[mel.test.blueprint.Main.main()] BlueprintExtender INFO Destroying BlueprintContainer for bundle test
[mel.test.blueprint.Main.main()] BlueprintExtender INFO Destroying BlueprintContainer for bundle org.apache.aries.blueprint
[mel.test.blueprint.Main.main()] BlueprintExtender INFO Destroying BlueprintContainer for bundle org.apache.camel.camel-blueprint
[mel.test.blueprint.Main.main()] Activator INFO Camel activator stopping
[mel.test.blueprint.Main.main()] Activator INFO Camel activator stopped
[mel.test.blueprint.Main.main()] CamelBlueprintHelper INFO Deleting work directory target/bundles/1442417582122
[ERROR] *************************************
[ERROR] Error occurred while running main from: org.apache.camel.test.blueprint.Main
[ERROR]
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.camel.maven.RunMojo$1.run(RunMojo.java:488)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: Gave up waiting for service (objectClass=org.apache.camel.CamelContext)
at org.apache.camel.test.blueprint.CamelBlueprintHelper.getOsgiService(CamelBlueprintHelper.java:240)
at org.apache.camel.test.blueprint.CamelBlueprintHelper.getOsgiService(CamelBlueprintHelper.java:202)
at org.apache.camel.test.blueprint.Main.doStart(Main.java:104)
at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
at org.apache.camel.main.MainSupport.run(MainSupport.java:150)
at org.apache.camel.main.MainSupport.run(MainSupport.java:354)
at org.apache.camel.test.blueprint.Main.main(Main.java:81)
... 6 more
[ERROR] *************************************
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 34.478 s
[INFO] Finished at: 2015-09-16T11:33:32-05:00
[INFO] Final Memory: 33M/458M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.camel:camel-maven-plugin:2.15.1.redhat-620133:run (default-cli) on project test: null: MojoExecutionException: InvocationTargetException: Gave up waiting for service (objectClass=org.apache.camel.CamelContext) -> [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
After many different possible solutions I have found what works:
First - I did not have the correct version of the .jar files. The .jars must be the same version as the MQ you are using. (in my case I should have been using 8.0.0.2)
Second - The jars you need are : com.ibm.mq.allclient.jar, fscontext.jar, providerutil.jar, and jms.jar
Third - The jars must be imported through Maven. The .jars cannot be added to the classpath as Fuse does not know to look here.
Finally - The bean looked like this:
<bean id="websphere" class="org.apache.camel.component.jms.JmsComponent">
<property name="connectionFactory">
<bean class="com.ibm.mq.jms.MQConnectionFactory">
<property name="transportType" value="1" />
<property name="hostName" value="IPAddress"/>
<property name="port" value="1414"/>
<property name="queueManager" value="WQM"/>
<property name="channel" value="SYSTEM.ADMIN.SVRCONN"/>
</bean>
</property>
</bean>
This article could be usefull for you:
http://www.soapassion.com/jboss/integrate-ibm-websphere-mq-8-jboss-fuse-6-3/
If you're using Fuse in Karaf container, then you'll need an osgi component. If you have that components, then Fuse (Karaf) will recognize them.
You can access IBM MQ 8 with JBoss Fuse 6.2 via the IBM MQ 7.5 client code. IBM MQ 8 is JMS 2.0, while JBoss Fuse 6.2 is JMS 1.1 based. IBM certifies the 7.5 client code against the 8 broker.
Related
maven-release plugin fails to create a release if parent pom uses ranges
I have a single module project, which I can create releases using maven-release-plugin 16:13:52 [INFO] Run maven with 'release:prepare release:perform -B -U -e -Dresume=false' ... 16:13:56 [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - 16:13:56 [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - --- maven-release-plugin:2.5.3:prepare (default-cli) # my-srv --- 16:13:57 [main] INFO org.apache.maven.shared.release.phase.ScmCheckModificationsPhase - Verifying that there are no local modifications... 16:13:57 [main] INFO org.apache.maven.shared.release.phase.ScmCheckModificationsPhase - ignoring changes on: **\pom.xml.next, **\release.properties, **\pom.xml.branch, **\pom.xml.tag, **\pom.xml.backup, **\pom.xml.releaseBackup 16:13:57 [main] INFO org.apache.maven.scm.manager.plexus.DefaultScmManager - Executing: cmd.exe /X /C "git rev-parse --show-prefix" 16:13:57 [main] INFO org.apache.maven.scm.manager.plexus.DefaultScmManager - Working directory: d:\jenkins\tools\ci-home\workspace\my-srv_master 16:13:57 [main] INFO org.apache.maven.scm.manager.plexus.DefaultScmManager - Executing: cmd.exe /X /C "git status --porcelain ." 16:13:57 [main] INFO org.apache.maven.scm.manager.plexus.DefaultScmManager - Working directory: d:\jenkins\tools\ci-home\workspace\my-srv_master 16:13:57 [Thread-4] WARNING org.apache.maven.scm.manager.plexus.DefaultScmManager - Ignoring unrecognized line: ?? effective-pom.xml 16:13:57 [main] INFO org.apache.maven.shared.release.phase.CheckDependencySnapshotsPhase - Checking dependencies and plugins for snapshots ... 16:13:57 [main] INFO org.apache.maven.shared.release.phase.RewritePomsForReleasePhase - Transforming 'WS-Proxy'... 16:13:57 [main] INFO org.apache.maven.shared.release.phase.GenerateReleasePomsPhase - Not generating release POMs 16:13:57 [main] INFO org.apache.maven.shared.release.phase.RunPrepareGoalsPhase - Executing goals 'clean verify'... 16:13:59 [Thread-6] INFO org.apache.maven.shared.release.exec.InvokerMavenExecutor - [INFO] Scanning for projects... 16:13:59 [Thread-6] INFO org.apache.maven.shared.release.exec.InvokerMavenExecutor - [INFO] 16:13:59 [Thread-6] INFO org.apache.maven.shared.release.exec.InvokerMavenExecutor - [INFO] --------------< com.mycompany.services:my-srv >--------------- 16:13:59 [Thread-6] INFO org.apache.maven.shared.release.exec.InvokerMavenExecutor - [INFO] Building WS-Proxy 1.8.13 16:13:59 [Thread-6] INFO org.apache.maven.shared.release.exec.InvokerMavenExecutor - [INFO] --------------------------------[ pom ]--------------------------------- 16:14:00 [Thread-6] INFO org.apache.maven.shared.release.exec.InvokerMavenExecutor - [INFO] 16:14:00 [Thread-6] INFO org.apache.maven.shared.release.exec.InvokerMavenExecutor - [INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) # my-srv --- 16:14:00 [Thread-6] INFO org.apache.maven.shared.release.exec.InvokerMavenExecutor - [INFO] Deleting D:\jenkins\tools\ci-home\workspace\my-srv_master\target 16:14:00 [Thread-6] INFO org.apache.maven.shared.release.exec.InvokerMavenExecutor - [INFO] 16:14:00 [Thread-6] INFO org.apache.maven.shared.release.exec.InvokerMavenExecutor - [INFO] --- buildnumber-maven-plugin:1.4:create (create-buildnumber) # my-srv --- 16:14:00 [Thread-6] INFO org.apache.maven.shared.release.exec.InvokerMavenExecutor - [INFO] Change the default 'git' provider implementation to 'jgit'. 16:14:01 [Thread-6] INFO org.apache.maven.shared.release.exec.InvokerMavenExecutor - [INFO] Storing buildNumber: 31a2d2bb9470473ed8cb36d0493377ad6e8a5103 at timestamp: 1623680040903 16:14:01 [Thread-6] INFO org.apache.maven.shared.release.exec.InvokerMavenExecutor - [INFO] Storing buildScmBranch: master 16:14:01 [Thread-6] INFO org.apache.maven.shared.release.exec.InvokerMavenExecutor - [INFO] 16:14:01 [Thread-6] INFO org.apache.maven.shared.release.exec.InvokerMavenExecutor - [INFO] --- buildnumber-maven-plugin:1.4:create-timestamp (create-timestamp) # my-srv --- ... I use a fixed version for the parent pom ... <parent> <groupId>com.mycompany.services</groupId> <artifactId>parent</artifactId> <version>0.5.0</version> </parent> <artifactId>my-srv</artifactId> <packaging>pom</packaging> <version>1.8.14-SNAPSHOT</version> ... No we actually want to use version ranges for the parent ... <parent> <groupId>com.mycompany.services</groupId> <artifactId>parent</artifactId> <version>[0.5.0,0.7.0)</version> </parent> <artifactId>my-srv</artifactId> <packaging>pom</packaging> <version>1.8.12-SNAPSHOT</version> ... However, this now fails as follows 10:58:54 [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - 10:58:54 [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - --- maven-release-plugin:2.5.3:prepare (default-cli) # my-srv --- 10:58:54 [main] INFO org.apache.maven.shared.release.phase.ScmCheckModificationsPhase - Verifying that there are no local modifications... 10:58:54 [main] INFO org.apache.maven.shared.release.phase.ScmCheckModificationsPhase - ignoring changes on: **\pom.xml.next, **\release.properties, **\pom.xml.branch, **\pom.xml.tag, **\pom.xml.backup, **\pom.xml.releaseBackup 10:58:54 [main] INFO org.apache.maven.scm.manager.plexus.DefaultScmManager - Executing: cmd.exe /X /C "git rev-parse --show-prefix" 10:58:54 [main] INFO org.apache.maven.scm.manager.plexus.DefaultScmManager - Working directory: d:\jenkins\tools\ci-home\workspace\my-srv_master 10:58:55 [main] INFO org.apache.maven.scm.manager.plexus.DefaultScmManager - Executing: cmd.exe /X /C "git status --porcelain ." 10:58:55 [main] INFO org.apache.maven.scm.manager.plexus.DefaultScmManager - Working directory: d:\jenkins\tools\ci-home\workspace\my-srv_master 10:58:55 [Thread-4] WARNING org.apache.maven.scm.manager.plexus.DefaultScmManager - Ignoring unrecognized line: ?? effective-pom.xml 10:58:55 [main] INFO org.apache.maven.shared.release.phase.CheckDependencySnapshotsPhase - Checking dependencies and plugins for snapshots ... 10:58:55 [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------ 10:58:55 [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - BUILD FAILURE 10:58:55 [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------ 10:58:55 [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Total time: 2.863 s 10:58:55 [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Finished at: 2021-06-21T10:58:55+02:00 10:58:55 [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------ 10:58:55 [main] ERROR org.apache.maven.cli.MavenCli - Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.3:prepare (default-cli) on project my-srv: Can't release project due to non released dependencies : 10:58:55 [main] ERROR org.apache.maven.cli.MavenCli - com.mycompany.services:parent:pom:0.6.1-SNAPSHOT 10:58:55 [main] ERROR org.apache.maven.cli.MavenCli - in project 'WS-Proxy' (com.mycompany.services:my-srv:pom:1.8.12-SNAPSHOT) 10:58:55 [main] ERROR org.apache.maven.cli.MavenCli - -> [Help 1] 10:58:55 org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.3:prepare (default-cli) on project my-srv: Can't release project due to non released dependencies : 10:58:55 com.mycompany.services:parent:pom:0.6.1-SNAPSHOT 10:58:55 in project 'WS-Proxy' (com.mycompany.services:my-srv:pom:1.8.12-SNAPSHOT) I understand that the dependency com.mycompany.services:parent:pom:0.6.1-SNAPSHOT is a SNAPSHOT but why. According to Dependency Mediation and Conflict Resolution Resolution of dependency ranges should not resolve to a snapshot (development version) unless it is included as an explicit boundary. I addition, there is a release version com.mycompany.services:parent:pom:0.6.1 available.
graalvm native image for springboot fat jar throws NoSuchMethodException xxx.<init>() at runtime
I managed to build native-image for my springboot fat jar, but it throws exception: "java.lang.NoSuchMethodException: com.my.passgenerator.PassGeneratorApplication.<init>()" when I run it. I tried to add a default construction and an empty init() method and both fails. How can I overcome this exception and get this native image running? Following is the full log: [root#hostserver pass-generator]# mvn -Pstg clean package -Dmaven.test.skip=true [INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for com.sensetime.intersense:pass-generator:jar:0.0.1-stg-SNAPSHOT [WARNING] 'version' contains an expression but should be a constant. # com.sensetime.intersense:pass-generator:0.0.1-${target.env}-SNAPSHOT, /tmp/pass-generator/pom.xml, line 47, column 11 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building pass-generator 0.0.1-stg-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) # pass-generator --- [INFO] Deleting /tmp/pass-generator/target [INFO] [INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) # pass-generator --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 1 resource [INFO] Copying 1 resource [INFO] [INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) # pass-generator --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 10 source files to /tmp/pass-generator/target/classes [INFO] [INFO] --- maven-antrun-plugin:1.8:run (default) # pass-generator --- [INFO] Executing tasks main: [copy] Copying 3 files to /tmp/pass-generator/target/classes/refs [copy] Copied 5 empty directories to 1 empty directory under /tmp/pass-generator/target/classes/refs [copy] Copying 1 file to /tmp/pass-generator/target/classes [copy] Warning: Could not find file /tmp/pass-generator/target/classes/application-stg.yml to copy. [copy] Warning: Could not find file /tmp/pass-generator/target/classes/bootstrap-stg.yml to copy. [copy] Warning: Could not find file /tmp/pass-generator/target/classes/application-stg.yaml to copy. [copy] Warning: Could not find file /tmp/pass-generator/target/classes/config-stg.properties to copy. [INFO] Executed tasks [INFO] [INFO] --- maven-resources-plugin:3.1.0:testResources (default-testResources) # pass-generator --- [INFO] Not copying test resources [INFO] [INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) # pass-generator --- [INFO] Not compiling test sources [INFO] [INFO] --- maven-surefire-plugin:2.22.2:test (default-test) # pass-generator --- [INFO] Tests are skipped. [INFO] [INFO] --- maven-jar-plugin:3.2.0:jar (default-jar) # pass-generator --- [INFO] Building jar: /tmp/pass-generator/target/pass-generator-0.0.1-stg-SNAPSHOT.jar [INFO] [INFO] --- native-image-maven-plugin:20.1.0:native-image (default) # pass-generator --- [INFO] ImageClasspath Entry: org.springframework.boot:spring-boot-starter:jar:2.3.0.RELEASE:compile (file:///root/.m2/repository/org/springframework/boot/spring-boot-starter/2.3.0.RELEASE/spring-boot-starter-2.3.0.RELEASE.jar) [INFO] ImageClasspath Entry: org.springframework.boot:spring-boot:jar:2.3.0.RELEASE:compile (file:///root/.m2/repository/org/springframework/boot/spring-boot/2.3.0.RELEASE/spring-boot-2.3.0.RELEASE.jar) [INFO] ImageClasspath Entry: org.springframework:spring-context:jar:5.2.6.RELEASE:compile (file:///root/.m2/repository/org/springframework/spring-context/5.2.6.RELEASE/spring-context-5.2.6.RELEASE.jar) [INFO] ImageClasspath Entry: org.springframework:spring-aop:jar:5.2.6.RELEASE:compile (file:///root/.m2/repository/org/springframework/spring-aop/5.2.6.RELEASE/spring-aop-5.2.6.RELEASE.jar) [INFO] ImageClasspath Entry: org.springframework:spring-beans:jar:5.2.6.RELEASE:compile (file:///root/.m2/repository/org/springframework/spring-beans/5.2.6.RELEASE/spring-beans-5.2.6.RELEASE.jar) [INFO] ImageClasspath Entry: org.springframework:spring-expression:jar:5.2.6.RELEASE:compile (file:///root/.m2/repository/org/springframework/spring-expression/5.2.6.RELEASE/spring-expression-5.2.6.RELEASE.jar) [INFO] ImageClasspath Entry: org.springframework.boot:spring-boot-autoconfigure:jar:2.3.0.RELEASE:compile (file:///root/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/2.3.0.RELEASE/spring-boot-autoconfigure-2.3.0.RELEASE.jar) [INFO] ImageClasspath Entry: jakarta.annotation:jakarta.annotation-api:jar:1.3.5:compile (file:///root/.m2/repository/jakarta/annotation/jakarta.annotation-api/1.3.5/jakarta.annotation-api-1.3.5.jar) [INFO] ImageClasspath Entry: org.springframework:spring-core:jar:5.2.6.RELEASE:compile (file:///root/.m2/repository/org/springframework/spring-core/5.2.6.RELEASE/spring-core-5.2.6.RELEASE.jar) [INFO] ImageClasspath Entry: org.springframework:spring-jcl:jar:5.2.6.RELEASE:compile (file:///root/.m2/repository/org/springframework/spring-jcl/5.2.6.RELEASE/spring-jcl-5.2.6.RELEASE.jar) [INFO] ImageClasspath Entry: org.yaml:snakeyaml:jar:1.26:compile (file:///root/.m2/repository/org/yaml/snakeyaml/1.26/snakeyaml-1.26.jar) [INFO] ImageClasspath Entry: org.projectlombok:lombok:jar:1.18.0:compile (file:///root/.m2/repository/org/projectlombok/lombok/1.18.0/lombok-1.18.0.jar) [INFO] ImageClasspath Entry: org.springframework.boot:spring-boot-configuration-processor:jar:2.3.0.RELEASE:compile (file:///root/.m2/repository/org/springframework/boot/spring-boot-configuration-processor/2.3.0.RELEASE/spring-boot-configuration-processor-2.3.0.RELEASE.jar) [INFO] ImageClasspath Entry: org.apache.commons:commons-lang3:jar:3.7:compile (file:///root/.m2/repository/org/apache/commons/commons-lang3/3.7/commons-lang3-3.7.jar) [INFO] ImageClasspath Entry: org.springframework.boot:spring-boot-starter-logging:jar:2.3.0.RELEASE:compile (file:///root/.m2/repository/org/springframework/boot/spring-boot-starter-logging/2.3.0.RELEASE/spring-boot-starter-logging-2.3.0.RELEASE.jar) [INFO] ImageClasspath Entry: ch.qos.logback:logback-classic:jar:1.2.3:compile (file:///root/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar) [INFO] ImageClasspath Entry: ch.qos.logback:logback-core:jar:1.2.3:compile (file:///root/.m2/repository/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar) [INFO] ImageClasspath Entry: org.slf4j:slf4j-api:jar:1.7.30:compile (file:///root/.m2/repository/org/slf4j/slf4j-api/1.7.30/slf4j-api-1.7.30.jar) [INFO] ImageClasspath Entry: org.apache.logging.log4j:log4j-to-slf4j:jar:2.13.2:compile (file:///root/.m2/repository/org/apache/logging/log4j/log4j-to-slf4j/2.13.2/log4j-to-slf4j-2.13.2.jar) [INFO] ImageClasspath Entry: org.apache.logging.log4j:log4j-api:jar:2.13.2:compile (file:///root/.m2/repository/org/apache/logging/log4j/log4j-api/2.13.2/log4j-api-2.13.2.jar) [INFO] ImageClasspath Entry: org.slf4j:jul-to-slf4j:jar:1.7.30:compile (file:///root/.m2/repository/org/slf4j/jul-to-slf4j/1.7.30/jul-to-slf4j-1.7.30.jar) [INFO] ImageClasspath Entry: org.jasypt:jasypt:jar:1.9.2:compile (file:///root/.m2/repository/org/jasypt/jasypt/1.9.2/jasypt-1.9.2.jar) [INFO] ImageClasspath Entry: com.github.ulisesbocchio:jasypt-spring-boot:jar:2.0.0:compile (file:///root/.m2/repository/com/github/ulisesbocchio/jasypt-spring-boot/2.0.0/jasypt-spring-boot-2.0.0.jar) [INFO] ImageClasspath Entry: org.springframework.experimental:spring-graalvm-native:jar:0.7.0:compile (file:///root/.m2/repository/org/springframework/experimental/spring-graalvm-native/0.7.0/spring-graalvm-native-0.7.0.jar) [WARNING] jar:file:///root/.m2/repository/org/springframework/experimental/spring-graalvm-native/0.7.0/spring-graalvm-native-0.7.0.jar!/META-INF/native-image/org.springframework.experimental/spring-graal-native/native-image.properties does not match recommended META-INF/native-image/${groupId}/${artifactId}/native-image.properties layout. [INFO] ImageClasspath Entry: com.sensetime.intersense:pass-generator:jar:0.0.1-stg-SNAPSHOT (file:///tmp/pass-generator/target/pass-generator-0.0.1-stg-SNAPSHOT.jar) [INFO] Executing: /root/graalvm-ce-java8-20.1.0/jre/bin/native-image -cp /root/.m2/repository/org/springframework/boot/spring-boot-starter/2.3.0.RELEASE/spring-boot-starter-2.3.0.RELEASE.jar:/root/.m2/repository/org/springframework/boot/spring-boot/2.3.0.RELEASE/spring-boot-2.3.0.RELEASE.jar:/root/.m2/repository/org/springframework/spring-context/5.2.6.RELEASE/spring-context-5.2.6.RELEASE.jar:/root/.m2/repository/org/springframework/spring-aop/5.2.6.RELEASE/spring-aop-5.2.6.RELEASE.jar:/root/.m2/repository/org/springframework/spring-beans/5.2.6.RELEASE/spring-beans-5.2.6.RELEASE.jar:/root/.m2/repository/org/springframework/spring-expression/5.2.6.RELEASE/spring-expression-5.2.6.RELEASE.jar:/root/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/2.3.0.RELEASE/spring-boot-autoconfigure-2.3.0.RELEASE.jar:/root/.m2/repository/jakarta/annotation/jakarta.annotation-api/1.3.5/jakarta.annotation-api-1.3.5.jar:/root/.m2/repository/org/springframework/spring-core/5.2.6.RELEASE/spring-core-5.2.6.RELEASE.jar:/root/.m2/repository/org/springframework/spring-jcl/5.2.6.RELEASE/spring-jcl-5.2.6.RELEASE.jar:/root/.m2/repository/org/yaml/snakeyaml/1.26/snakeyaml-1.26.jar:/root/.m2/repository/org/projectlombok/lombok/1.18.0/lombok-1.18.0.jar:/root/.m2/repository/org/springframework/boot/spring-boot-configuration-processor/2.3.0.RELEASE/spring-boot-configuration-processor-2.3.0.RELEASE.jar:/root/.m2/repository/org/apache/commons/commons-lang3/3.7/commons-lang3-3.7.jar:/root/.m2/repository/org/springframework/boot/spring-boot-starter-logging/2.3.0.RELEASE/spring-boot-starter-logging-2.3.0.RELEASE.jar:/root/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar:/root/.m2/repository/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar:/root/.m2/repository/org/slf4j/slf4j-api/1.7.30/slf4j-api-1.7.30.jar:/root/.m2/repository/org/apache/logging/log4j/log4j-to-slf4j/2.13.2/log4j-to-slf4j-2.13.2.jar:/root/.m2/repository/org/apache/logging/log4j/log4j-api/2.13.2/log4j-api-2.13.2.jar:/root/.m2/repository/org/slf4j/jul-to-slf4j/1.7.30/jul-to-slf4j-1.7.30.jar:/root/.m2/repository/org/jasypt/jasypt/1.9.2/jasypt-1.9.2.jar:/root/.m2/repository/com/github/ulisesbocchio/jasypt-spring-boot/2.0.0/jasypt-spring-boot-2.0.0.jar:/root/.m2/repository/org/springframework/experimental/spring-graalvm-native/0.7.0/spring-graalvm-native-0.7.0.jar:/tmp/pass-generator/target/pass-generator-0.0.1-stg-SNAPSHOT.jar --allow-incomplete-classpath --no-fallback -H:+ReportExceptionStackTraces --initialize-at-build-time=org.springframework.util.unit.DataSize -H:+TraceClassInitialization --no-server -R:MaxHeapSize=16g -J-Xmx16G -H:Class=com.my.passgenerator.PassGeneratorApplication [com.my.passgenerator.passgeneratorapplication:1026375] classlist: 3,609.05 ms, 1.63 GB ____ _ _____ _ / ___| _ __ _ __(_)_ __ __ _ | ___|__ __ _| |_ _ _ _ __ ___ \___ \| '_ \| '__| | '_ \ / _` | | |_ / _ \/ _` | __| | | | '__/ _ \ ___) | |_) | | | | | | | (_| | | _| __/ (_| | |_| |_| | | | __/ |____/| .__/|_| |_|_| |_|\__, | |_| \___|\__,_|\__|\__,_|_| \___| |_| |___/ Feature operating in FEATURE mode Removing unused configurations Use -Dspring.native.verbose=true on native-image call to see more detailed information from the feature [com.my.passgenerator.passgeneratorapplication:1026375] (cap): 872.48 ms, 1.63 GB Found #6 types in static reflection list to register Skipping #6 types not on the classpath Attempting proxy registration of #19 proxies Skipped registration of #17 proxies - relevant types not on classpath [com.my.passgenerator.passgeneratorapplication:1026375] setup: 2,094.23 ms, 1.63 GB Registering resources - #35 patterns Registering resources - #2 bundles Processing META-INF/spring.factories files... spring.factories processing, problem adding access for key org.springframework.boot.diagnostics.analyzer.ValidationExceptionFailureAnalyzer: javax/validation/ValidationException Processing spring.factories - ApplicationListener lists #10 application listeners Processing spring.factories - PropertySourceLoader lists #2 property source loaders spring.factories processing, problem adding access for key org.springframework.boot.autoconfigure.jdbc.HikariDriverConfigurationFailureAnalyzer: org/springframework/jdbc/CannotGetJdbcConnectionException Processing spring.factories - ApplicationListener lists #0 application listeners Processing spring.factories - EnableAutoConfiguration lists #127 configurations Excluding 115 auto-configurations from spring.factories file Processing spring.factories - ApplicationListener lists #1 application listeners Processing spring.factories - ApplicationListener lists #1 application listeners Found no META-INF/spring.components -> synthesizing one... Computed spring.components is vvv ^^^ Registered 0 entries Configuring initialization time for specific types and packages: #87 buildtime-init-classes #23 buildtime-init-packages #33 runtime-init-classes #1 runtime-init-packages Warning: class initialization of class org.springframework.boot.validation.MessageInterpolatorFactory failed with exception java.lang.NoClassDefFoundError: javax/validation/ValidationException. This class will be initialized at run time because option --allow-incomplete-classpath is used for image building. Use the option --initialize-at-run-time=org.springframework.boot.validation.MessageInterpolatorFactory to explicitly request delayed initialization of this class. Number of types dynamically registered for reflective access: #856 [com.my.passgenerator.passgeneratorapplication:1026375] (clinit): 503.31 ms, 4.40 GB [com.my.passgenerator.passgeneratorapplication:1026375] (typeflow): 10,414.71 ms, 4.40 GB [com.my.passgenerator.passgeneratorapplication:1026375] (objects): 11,721.04 ms, 4.40 GB [com.my.passgenerator.passgeneratorapplication:1026375] (features): 2,246.52 ms, 4.40 GB [com.my.passgenerator.passgeneratorapplication:1026375] analysis: 25,801.80 ms, 4.40 GB [com.my.passgenerator.passgeneratorapplication:1026375] universe: 815.05 ms, 4.40 GB [com.my.passgenerator.passgeneratorapplication:1026375] (parse): 1,752.35 ms, 4.40 GB [com.my.passgenerator.passgeneratorapplication:1026375] (inline): 1,700.91 ms, 5.03 GB [com.my.passgenerator.passgeneratorapplication:1026375] (compile): 15,841.57 ms, 7.29 GB [com.my.passgenerator.passgeneratorapplication:1026375] compile: 20,640.83 ms, 7.29 GB [com.my.passgenerator.passgeneratorapplication:1026375] image: 2,280.36 ms, 7.31 GB [com.my.passgenerator.passgeneratorapplication:1026375] write: 373.32 ms, 7.31 GB [com.my.passgenerator.passgeneratorapplication:1026375] [total]: 61,399.55 ms, 7.31 GB [INFO] [INFO] --- spring-boot-maven-plugin:2.3.0.RELEASE:repackage (repackage) # pass-generator --- [INFO] Replacing main artifact with repackaged archive [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 01:04 min [INFO] Finished at: 2020-06-13T16:54:19+08:00 [INFO] Final Memory: 49M/1304M [INFO] ------------------------------------------------------------------------ You have new mail in /var/spool/mail/root [root#hostserver pass-generator]# ./target/com.my.passgenerator.passgeneratorapplication 2020-06-13 16:54:32.506 ERROR 1030001 --- [ main] o.s.boot.SpringApplication : Application run failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'passGeneratorApplication': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.my.passgenerator.PassGeneratorApplication]: No default constructor found; nested exception is java.lang.NoSuchMethodException: com.my.passgenerator.PassGeneratorApplication.() at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1320) ~[na:na] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1214) ~[na:na] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[na:na] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[na:na] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[na:na] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226) ~[na:na] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[na:na] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[na:na] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:895) ~[na:na] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:878) ~[na:na] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) ~[na:na] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:758) ~[com.my.passgenerator.passgeneratorapplication:na] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:750) ~[com.my.passgenerator.passgeneratorapplication:na] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) ~[com.my.passgenerator.passgeneratorapplication:na] at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) ~[com.my.passgenerator.passgeneratorapplication:na] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237) ~[com.my.passgenerator.passgeneratorapplication:na] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) ~[com.my.passgenerator.passgeneratorapplication:na] at com.my.passgenerator.PassGeneratorApplication.main(PassGeneratorApplication.java:29) [com.my.passgenerator.passgeneratorapplication:na] Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.my.passgenerator.PassGeneratorApplication]: No default constructor found; nested exception is java.lang.NoSuchMethodException: com.my.passgenerator.PassGeneratorApplication.() at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:83) ~[na:na] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1312) ~[na:na] ... 17 common frames omitted Caused by: java.lang.NoSuchMethodException: com.my.passgenerator.PassGeneratorApplication.() at java.lang.Class.getConstructor0(DynamicHub.java:3082) ~[na:na] at java.lang.Class.getDeclaredConstructor(DynamicHub.java:2178) ~[na:na] at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:78) ~[na:na] ... 18 common frames omitted
I've got the same error while switching from the compile.sh script building method to the native-image-maven-plugin described in this so answer. The crucial error here is the No default constructor found message and the problem happens while the Spring Feature is working inside the native-image-maven-plugin execution: Found no META-INF/spring.components -> synthesizing one... Computed spring.components is vvv ^^^ Registered 0 entries Configuring initialization time for specific types and packages: #87 buildtime-init-classes #23 buildtime-init-packages #33 runtime-init-classes Spring heavily relies on classpath scanning at runtime, where your #SpringBootApplication or #Component annotated components are found normally. But there's a big challenge to get Spring applications to work with GraalVM Native Image, since runtime classpath scanning isn't possible here anymore. The Spring Feature spring-graalvm-native therefore tries to either process a META-INF/spring.components file or computes in memory. The latter doesn't work right now using the native-image-maven-plugin. To fix that, you need to add an explicit dependency to the spring-context-indexer in your pom.xml (see a fully working example here): <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context-indexer</artifactId> </dependency> The current Spring Feature docs also tell us about this dependency we should use. If you added the spring-context-indexer to your pom.xml, it will create a file target/classes/META_INF/spring.components containing your #SpringBootApplication annotated class: com.my.passgenerator.PassGeneratorApplication=org.springframework.stereotype.Component Also your build output should state, that the file has been processed and an entry was registered like that: Processing META-INF/spring.components files... Registered 1 entries Configuring initialization time for specific types and packages: #87 buildtime-init-classes #23 buildtime-init-packages #33 runtime-init-classes If you add more #Component annotated classes, the file will contain them also and will also be registered in the native-image build process. After a successful Maven build, your Spring Boot native app should start as expected. For more info you can also have a look at this blog post about using the native-image-maven-plugin for Spring Boot GraalVM Native Image builds.
Is there a way to porsue with maven build after running wildfly:run goal?
I would like to complete Maven build lifecycle after wildfly:run goal's execution. The fact is that wildfly:run goal starts a standalone application server and from that point the CLI shows Wildfly's Log messages only. [INFO] --- wildfly-maven-plugin:2.1.0.Beta1-SNAPSHOT:run (default) # PrimeFaces1 --- [WARNING] The POM for org.wildfly.plugins:wildfly-plugin-core:jar:2.1.0.Beta1-SNAPSHOT is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [INFO] JAVA_HOME : C:\Program Files\Java\jdk1.8.0_201\jre [INFO] JBOSS_HOME: C:\Users\Consul19\eclipse-workspace\MultiRunTest\PrimeFaces1\target\wildfly-18.0.1.Final [INFO] JAVA_OPTS : -Xms64m -Xmx512m -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Djboss.modules.system.pkgs=org.jboss.byteman [INFO] Server is starting up. Press CTRL + C to stop the server. [INFO] JBoss Threads version 2.3.3.Final [INFO] JBoss Remoting version 5.0.12.Final [INFO] XNIO version 3.7.2.Final [INFO] XNIO NIO Implementation Version 3.7.2.Final [INFO] ELY00001: WildFly Elytron version 1.9.1.Final 13:04:25,585 INFO [org.jboss.modules] (main) JBoss Modules version 1.9.1.Final 13:04:26,228 INFO [org.jboss.msc] (main) JBoss MSC version 1.4.11.Final 13:04:26,248 INFO [org.jboss.threads] (main) JBoss Threads version 2.3.3.Final 13:04:26,472 INFO [org.jboss.as] (MSC service thread 1-2) WFLYSRV0049: WildFly Full 18.0.1.Final (WildFly Core 10.0.3.Final) starting 13:04:27,800 INFO [org.wildfly.security] (ServerService Thread Pool -- 28) ELY00001: WildFly Elytron version 1.10.4.Final Actually I would like to run next goals but the server takes control of the CLI Besides, in the pom.xml, I've tried to sobstitute wildfly:run with the wildfly:deploy goal, which deploy the artifact on the local JBOSS server(already started), And in this case the maven build goes on until the end. [INFO] --- maven-war-plugin:2.2:war (default-war) # PrimeFaces1 --- [INFO] Packaging webapp [INFO] Assembling webapp [PrimeFaces1] in [C:\Users\Consul19\eclipse-workspace\MultiRunTest\PrimeFaces1\target\PrimeFaces1-1.0-SNAPSHOT] [INFO] Processing war project [INFO] Copying webapp resources [C:\Users\Consul19\eclipse-workspace\MultiRunTest\PrimeFaces1\src\main\webapp] [INFO] Webapp assembled in [128 msecs] [INFO] Building war: C:\Users\Consul19\eclipse-workspace\MultiRunTest\PrimeFaces1\target\PrimeFaces1-1.0-SNAPSHOT.war [INFO] WEB-INF\web.xml already added, skipping [INFO] [INFO] <<< wildfly-maven-plugin:2.1.0.Beta1-SNAPSHOT:deploy (default-cli) < package # PrimeFaces1 <<< [INFO] [INFO] [INFO] --- wildfly-maven-plugin:2.1.0.Beta1-SNAPSHOT:deploy (default-cli) # PrimeFaces1 --- [INFO] JBoss Threads version 2.3.3.Final [INFO] JBoss Remoting version 5.0.12.Final [INFO] XNIO version 3.7.2.Final [INFO] XNIO NIO Implementation Version 3.7.2.Final [INFO] ELY00001: WildFly Elytron version 1.9.1.Final [INFO] [INFO] --------------------< com.mkyong.core:PrimeFaces2 >--------------------- [INFO] Building PrimeFaces2 1.0-SNAPSHOT [3/3] [INFO] --------------------------------[ war ]--------------------------------- [INFO] [INFO] >>> wildfly-maven-plugin:2.1.0.Beta1-SNAPSHOT:deploy (default-cli) > package # PrimeFaces2 >>> [INFO] [INFO] --- maven-resources-plugin:3.0.2:resources (default-resources) # PrimeFaces2 --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory C:\Users\Consul19\eclipse-workspace\MultiRunTest\PrimeFaces2\src\main\resources [INFO] [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) # PrimeFaces2 --- [INFO] Nothing to compile - all classes are up to date As you can see in this case the deploy goal doesn't "lock" the CLI but the build process still continues until the end
This behaviour is expected for the wildfly:run command, you're supposed to interrupt the server from the outside once you're done testing. Quoting the goal's documentation, This goal will block until cancelled or a shutdown is invoked from a management client. If that doesn't suit you, you can instead use wildlfy:start followed by wildfly:deploy.
Spring4.1 with GAE Error on local server
I have my test webapp and it is perfectly running in local jetty. but it's not working in local gae this is the error i'm getting I'm new to spring and google app engine, sorry if I made a stupid mistake [INFO] Sep 14, 2014 5:06:16 PM org.springframework.web.context.ContextLoader initWebApplicationContext [INFO] SEVERE: Context initialization failed [INFO] java.lang.IncompatibleClassChangeError: Implementing class [INFO] at java.lang.ClassLoader.defineClass1(Native Method) [INFO] at java.lang.ClassLoader.defineClass(ClassLoader.java:800) [INFO] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) [INFO] at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) [INFO] at java.net.URLClassLoader.access$100(URLClassLoader.java:71) [INFO] at java.net.URLClassLoader$1.run(URLClassLoader.java:361) [INFO] at java.net.URLClassLoader$1.run(URLClassLoader.java:355) [INFO] at java.security.AccessController.doPrivileged(Native Method) [INFO] at java.net.URLClassLoader.findClass(URLClassLoader.java:354) [INFO] at java.lang.ClassLoader.loadClass(ClassLoader.java:425) [INFO] at com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java:216) [INFO] at java.lang.ClassLoader.loadClass(ClassLoader.java:358) [INFO] at java.lang.ClassLoader.defineClass1(Native Method) [INFO] at java.lang.ClassLoader.defineClass(ClassLoader.java:800) [INFO] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) [INFO] at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) [INFO] at java.net.URLClassLoader.access$100(URLClassLoader.java:71) [INFO] at java.net.URLClassLoader$1.run(URLClassLoader.java:361) [INFO] at java.net.URLClassLoader$1.run(URLClassLoader.java:355) [INFO] at java.security.AccessController.doPrivileged(Native Method) [INFO] at java.net.URLClassLoader.findClass(URLClassLoader.java:354) [INFO] at java.lang.ClassLoader.loadClass(ClassLoader.java:425) [INFO] at com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java:216) [INFO] at java.lang.ClassLoader.loadClass(ClassLoader.java:358) [INFO] at org.springframework.core.DefaultParameterNameDiscoverer.<init>(DefaultParameterNameDiscoverer.java:42) [INFO] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.<init>(AbstractAutowireCapableBeanFactory.java:124) [INFO] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.<init>(AbstractAutowireCapableBeanFactory.java:171) [INFO] at org.springframework.beans.factory.support.DefaultListableBeanFactory.<init>(DefaultListableBeanFactory.java:187) [INFO] at org.springframework.context.support.AbstractRefreshableApplicationContext.createBeanFactory(AbstractRefreshableApplicationContext.java:200) [INFO] at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:126) [INFO] at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:537) [INFO] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:452) [INFO] at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:385) [INFO] at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:284) [INFO] at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111) [INFO] at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548) [INFO] at org.mortbay.jetty.servlet.Context.startContext(Context.java:136) [INFO] at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250) [INFO] at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517) [INFO] at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467) [INFO] at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) [INFO] at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130) [INFO] at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) [INFO] at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130) [INFO] at org.mortbay.jetty.Server.doStart(Server.java:224) [INFO] at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) [INFO] at com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:255) [INFO] at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:288) [INFO] at com.google.appengine.tools.development.AutomaticInstanceHolder.startUp(AutomaticInstanceHolder.java:26) [INFO] at com.google.appengine.tools.development.AbstractModule.startup(AbstractModule.java:87) [INFO] at com.google.appengine.tools.development.Modules.startup(Modules.java:105) [INFO] at com.google.appengine.tools.development.DevAppServerImpl.doStart(DevAppServerImpl.java:258) [INFO] at com.google.appengine.tools.development.DevAppServerImpl.access$000(DevAppServerImpl.java:47) [INFO] at com.google.appengine.tools.development.DevAppServerImpl$1.run(DevAppServerImpl.java:213) [INFO] at com.google.appengine.tools.development.DevAppServerImpl$1.run(DevAppServerImpl.java:211) [INFO] at java.security.AccessController.doPrivileged(Native Method) [INFO] at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:211) [INFO] at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:277) [INFO] at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:48) [INFO] at com.google.appengine.tools.development.DevAppServerMain.run(DevAppServerMain.java:219) [INFO] at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:210)
You need to run a maven Clean within Eclipse to remove java.lang.IncompatibleClassChangeError: Implementing class Error... But Spring 4.1.0 still gave me an error called No such method I downgraded the spring version to 3.1.1 now it works
Maven build fails with Munit tests
Built a mavenized mule application as a domain project in anypoint studio. Added munit tests. I can run the munit test suites and all tests complete successfully. I can build and deploy the application when skipping the munit tests (with -DskipMunitTests). However, now I want the build to include the munit tests, but when I remove -DskipMunitTests, I get the following error... [INFO] Building Mule inventoryService Application 1.0.0-SNAPSHOT [INFO] --- mule-app-maven-plugin:1.2:attach-test-resources (default-attach-test-resources) # inventoryService --- [INFO] attaching test resource C:\Users\user\AnypointStudio\BPMtoMulesoft\inventoryService\src\main\app [INFO] --- build-helper-maven-plugin:1.7:add-resource (add-resource) # inventoryService --- [INFO] --- maven-resources-plugin:3.0.2:resources (default-resources) # inventoryService --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 9 resources [INFO] Copying 6 resources [INFO] Copying 2 resources [INFO] skip non existing resourceDirectory C:\Users\user\AnypointStudio\BPMtoMulesoft\inventoryService\mappings [INFO] --- mule-app-maven-plugin:1.2:filter-resources (default-filter-resources) # inventoryService --- [INFO] --- maven-compiler-plugin:3.6.1:compile (default-compile) # inventoryService --- [INFO] Nothing to compile - all classes are up to date [INFO] --- maven-resources-plugin:3.0.2:testResources (default-testResources) # inventoryService --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 2 resources [INFO] Copying 9 resources [INFO] Copying 6 resources [INFO] --- maven-compiler-plugin:3.6.1:testCompile (default-testCompile) # inventoryService --- [INFO] Nothing to compile - all classes are up to date [INFO] --- maven-surefire-plugin:2.20:test (default-test) # inventoryService --- [INFO] --- munit-maven-plugin:1.3.4:test (test) # inventoryService --- [INFO] Acquiring dynamic ports... [INFO] Dynamic port definition [DONE] [INFO] Mule working directory set to: C:\Users\user\AnypointStudio\BPMtoMulesoft\inventoryService\target\.mule [org.mule.munit.remote.RemoteRunner]Run Started Coverage port: 51497 resources: BCStd-httpListenerConfig.xml,global.xml,interfaces.xml,inventoryService.xml INFO 2018-02-15 11:40:41,084 [Thread-1] org.mule.munit.plugins.coverage.server.MunitCoverageServer: Waiting for coverage connection INFO 2018-02-15 11:40:41,099 [main] org.mule.munit.runner.MuleContextManager: Loading mule-app.properties ... INFO 2018-02-15 11:40:41,144 [main] org.mule.munit.runner.domain.MunitDomainContextBuilder: Loading mule-deploy.properties ... SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/C:/Users/user/.m2/repository/org/apache/logging/log4j/log4j-slf4j-impl/2.5/log4j-slf4j-impl-2.5.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/C:/Users/user/.m2/repository/org/slf4j/slf4j-log4j12/1.7.5/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory] INFO 2018-02-15 11:40:41,529 [main] org.mule.lifecycle.AbstractLifecycleManager: Initialising RegistryBroker INFO 2018-02-15 11:40:41,674 [main] org.mule.config.spring.MuleDomainContext: Refreshing org.mule.config.spring.MuleDomainContext#335b5620: startup date [Thu Feb 15 11:40:41 CST 2018]; root of context hierarchy INFO 2018-02-15 11:40:42,969 [main] org.mule.config.spring.processors.ContextExclusiveInjectorProcessor: JSR-330 'javax.inject.Inject' annotation found and supported for autowiring INFO 2018-02-15 11:40:43,734 [main] org.mule.util.journal.TransactionJournal: Using files for tx logs C:\Users\user\AnypointStudio\BPMtoMulesoft\inventoryService\.\.mule\queue-tx-log\tx1.log and C:\Users\user\AnypointStudio\BPMtoMulesoft\inventoryService\.\.mule\queue-tx-log\tx2.log INFO 2018-02-15 11:40:43,749 [main] org.mule.util.journal.TransactionJournal: Using files for tx logs C:\Users\user\AnypointStudio\BPMtoMulesoft\inventoryService\.\.mule\queue-xa-tx-log\tx1.log and C:\Users\user\AnypointStudio\BPMtoMulesoft\inventoryService\.\.mule\queue-xa-tx-log\tx2.log INFO 2018-02-15 11:40:44,254 [main] org.mule.config.spring.SpringXmlDomainConfigurationBuilder: Configured Mule using "org.mule.config.spring.SpringXmlDomainConfigurationBuilder" with configuration resource(s): "[ConfigResource{resourceName='jar:file:/C:/Users/user/.m2/repository/com/mercury/mulesoft/muledomain/1.0.0-SNAPSHOT/muledomain-1.0.0-SNAPSHOT.zip!/mule-domain-config.xml'}]" INFO 2018-02-15 11:40:44,254 [main] org.mule.util.queue.QueueXaResourceManager: Starting ResourceManager INFO 2018-02-15 11:40:44,254 [main] org.mule.util.queue.QueueXaResourceManager: Started ResourceManager INFO 2018-02-15 11:40:44,294 [main] org.mule.module.http.internal.listener.DefaultHttpListenerConfig: Listening for requests on http://0.0.0.0:8081 INFO 2018-02-15 11:40:44,299 [main] org.mule.DefaultMuleContext: Mule Runtime and Integration Platform Version: 3.8.4 Build: 0fc91f08 MuleSoft, Inc. For more information go to http://www.mulesoft.org Server started: 2/15/18 11:40 AM Server ID: id JDK: 1.8.0_111 (mixed mode) OS encoding: Cp1252, Mule encoding: UTF-8 OS: Windows 7 - Service Pack 1 (6.1, amd64) Host: blah (ip) Agents Running: None INFO 2018-02-15 11:40:44,349 [main] org.mule.lifecycle.AbstractLifecycleManager: Initialising RegistryBroker INFO 2018-02-15 11:40:44,369 [main] org.mule.module.extension.internal.manager.DefaultExtensionManager: Starting discovery of extensions INFO 2018-02-15 11:40:44,504 [main] org.mule.module.extension.internal.manager.DefaultExtensionManager: Discovered 1 extensions INFO 2018-02-15 11:40:44,504 [main] org.mule.module.extension.internal.manager.DefaultExtensionManager: Registering extension validation (version 3.8) INFO 2018-02-15 11:40:44,514 [main] org.mule.munit.runner.spring.config.MunitApplicationContext: Refreshing org.mule.munit.runner.spring.config.MunitApplicationContext#397ef2: startup date [Thu Feb 15 11:40:44 CST 2018]; parent: org.mule.config.spring.MuleDomainContext#335b5620 WARN 2018-02-15 11:40:45,324 [main] org.mule.transport.http.builder.HttpHeaderDefinitionParser: Schema warning: Use of element <header> is deprecated. HTTP transport is deprecated and will be removed in Mule 4.0. Use HTTP module instead.. WARN 2018-02-15 11:40:45,529 [main] org.mule.munit.runner.spring.config.MunitApplicationContext: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'Secure_Property_Placeholder': Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (2) are: PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'key' threw exception; nested exception is java.lang.RuntimeException: Property MULEENC could not be found PropertyAccessException 2: org.springframework.beans.MethodInvocationException: Property 'location' threw exception; nested exception is java.lang.RuntimeException: Property mule.env could not be found INFO 2018-02-15 11:40:45,549 [main] org.mule.lifecycle.AbstractLifecycleManager: Disposing RegistryBroker java.lang.RuntimeException: org.mule.api.config.ConfigurationException: Error creating bean with name 'Secure_Property_Placeholder': Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (2) are: PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'key' threw exception; nested exception is java.lang.RuntimeException: Property MULEENC could not be found PropertyAccessException 2: org.springframework.beans.MethodInvocationException: Property 'location' threw exception; nested exception is java.lang.RuntimeException: Property mule.env could not be found (org.mule.api.lifecycle.InitialisationException) at org.mule.munit.runner.mule.SuiteRunner.<init>(SuiteRunner.java:59) at org.mule.munit.runner.mule.SuiteRunner.<init>(SuiteRunner.java:45) at org.mule.munit.remote.RemoteRunner.runTestSuite(RemoteRunner.java:75) at org.mule.munit.remote.RemoteRunner.run(RemoteRunner.java:55) at org.mule.munit.remote.RemoteRunner.main(RemoteRunner.java:39) Caused by: org.mule.api.config.ConfigurationException: Error creating bean with name 'Secure_Property_Placeholder': Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (2) are: PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'key' threw exception; nested exception is java.lang.RuntimeException: Property MULEENC could not be found PropertyAccessException 2: org.springframework.beans.MethodInvocationException: Property 'location' threw exception; nested exception is java.lang.RuntimeException: Property mule.env could not be found (org.mule.api.lifecycle.InitialisationException) at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:49) at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:69) at org.mule.context.DefaultMuleContextFactory$1.configure(DefaultMuleContextFactory.java:89) ..... ... 4 more Caused by: org.mule.api.lifecycle.InitialisationException: Error creating bean with name 'Secure_Property_Placeholder': Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (2) are: PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'key' threw exception; nested exception is java.lang.RuntimeException: Property MULEENC could not be found PropertyAccessException 2: org.springframework.beans.MethodInvocationException: Property 'location' threw exception; nested exception is java.lang.RuntimeException: Property mule.env could not be found at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:112) at org.mule.config.spring.SpringXmlConfigurationBuilder.createSpringRegistry(SpringXmlConfigurationBuilder.java:177) at org.mule.config.spring.SpringXmlConfigurationBuilder.doConfigure(SpringXmlConfigurationBuilder.java:100) at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:43) ... 12 more Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'Secure_Property_Placeholder': Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (2) are: PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'key' threw exception; nested exception is java.lang.RuntimeException: Property MULEENC could not be found PropertyAccessException 2: org.springframework.beans.MethodInvocationException: Property 'location' threw exception; nested exception is java.lang.RuntimeException: Property mule.env could not be found at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1512) ..... ... 15 more Caused by: org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (2) are: PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'key' threw exception; nested exception is java.lang.RuntimeException: Property MULEENC could not be found PropertyAccessException 2: org.springframework.beans.MethodInvocationException: Property 'location' threw exception; nested exception is java.lang.RuntimeException: Property mule.env could not be found at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:121) at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:75) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1508) ... 27 more INFO 2018-02-15 11:40:45,899 [main] org.mule.munit.runner.MuleContextManager: Loading mule-app.properties ... INFO 2018-02-15 11:40:45,899 [main] org.mule.munit.runner.domain.MunitDomainContextBuilder: Loading mule-deploy.properties ... INFO 2018-02-15 11:40:45,909 [main] org.mule.lifecycle.AbstractLifecycleManager: Initialising RegistryBroker INFO 2018-02-15 11:40:45,924 [main] org.mule.config.spring.MuleDomainContext: Refreshing org.mule.config.spring.MuleDomainContext#3b95a6db: startup date [Thu Feb 15 11:40:45 CST 2018]; root of context hierarchy INFO 2018-02-15 11:40:46,094 [main] org.mule.config.spring.processors.ContextExclusiveInjectorProcessor: JSR-330 'javax.inject.Inject' annotation found and supported for autowiring INFO 2018-02-15 11:40:46,194 [main] org.mule.util.journal.TransactionJournal: Using files for tx logs C:\Users\user\AnypointStudio\BPMtoMulesoft\inventoryService\.\.mule\queue-tx-log\tx1.log and C:\Users\user\AnypointStudio\BPMtoMulesoft\inventoryService\.\.mule\queue-tx-log\tx2.log INFO 2018-02-15 11:40:46,199 [main] org.mule.util.journal.TransactionJournal: Using files for tx logs C:\Users\user\AnypointStudio\BPMtoMulesoft\inventoryService\.\.mule\queue-xa-tx-log\tx1.log and C:\Users\user\AnypointStudio\BPMtoMulesoft\inventoryService\.\.mule\queue-xa-tx-log\tx2.log INFO 2018-02-15 11:40:46,209 [main] org.mule.config.spring.SpringXmlDomainConfigurationBuilder: Configured Mule using "org.mule.config.spring.SpringXmlDomainConfigurationBuilder" with configuration resource(s): "[ConfigResource{resourceName='jar:file:/C:/Users/user/.m2/repository/com/mercury/mulesoft/muledomain/1.0.0-SNAPSHOT/muledomain-1.0.0-SNAPSHOT.zip!/mule-domain-config.xml'}]" INFO 2018-02-15 11:40:46,209 [main] org.mule.util.queue.QueueXaResourceManager: Starting ResourceManager INFO 2018-02-15 11:40:46,209 [main] org.mule.util.queue.QueueXaResourceManager: Started ResourceManager [org.mule.munit.remote.CoverageManager]Calculating application coverage for resources: BCStd-httpListenerConfig.xml,global.xml,interfaces.xml,inventoryService.xml java.lang.RuntimeException: org.mule.api.lifecycle.LifecycleException: Failed to invoke lifecycle phase "start" on object: org.mule.module.http.internal.listener.DefaultHttpListenerConfig#73613ae5 at org.mule.munit.runner.mule.SuiteRunner.<init>(SuiteRunner.java:59) at org.mule.munit.runner.mule.SuiteRunner.<init>(SuiteRunner.java:45) at org.mule.munit.remote.RemoteRunner.runTestSuite(RemoteRunner.java:75) at org.mule.munit.remote.RemoteRunner.run(RemoteRunner.java:55) at org.mule.munit.remote.RemoteRunner.main(RemoteRunner.java:39) Caused by: org.mule.api.lifecycle.LifecycleException: Failed to invoke lifecycle phase "start" on object: org.mule.module.http.internal.listener.DefaultHttpListenerConfig#73613ae5 at org.mule.lifecycle.phases.DefaultLifecyclePhase.applyLifecycle(DefaultLifecyclePhase.java:249) at org.mule.lifecycle.RegistryLifecycleCallback.doApplyLifecycle(RegistryLifecycleCallback.java:99) at org.mule.lifecycle.RegistryLifecycleCallback.onTransition(RegistryLifecycleCallback.java:71) ..... ... 4 more Caused by: java.net.BindException: Address already in use: bind at sun.nio.ch.Net.bind0(Native Method) at sun.nio.ch.Net.bind(Net.java:433) at sun.nio.ch.Net.bind(Net.java:425) ..... ... 20 more INFO 2018-02-15 11:40:46,234 [main] org.mule.munit.runner.MuleContextManager: Loading mule-app.properties ... INFO 2018-02-15 11:40:46,239 [main] org.mule.munit.runner.domain.MunitDomainContextBuilder: Loading mule-deploy.properties ... INFO 2018-02-15 11:40:46,244 [main] org.mule.lifecycle.AbstractLifecycleManager: Initialising RegistryBroker INFO 2018-02-15 11:40:46,254 [main] org.mule.config.spring.MuleDomainContext: Refreshing org.mule.config.spring.MuleDomainContext#29fe4840: startup date [Thu Feb 15 11:40:46 CST 2018]; root of context hierarchy INFO 2018-02-15 11:40:46,439 [main] org.mule.config.spring.processors.ContextExclusiveInjectorProcessor: JSR-330 'javax.inject.Inject' annotation found and supported for autowiring INFO 2018-02-15 11:40:46,529 [main] org.mule.util.journal.TransactionJournal: Using files for tx logs C:\Users\user\AnypointStudio\BPMtoMulesoft\inventoryService\.\.mule\queue-tx-log\tx1.log and C:\Users\user\AnypointStudio\BPMtoMulesoft\inventoryService\.\.mule\queue-tx-log\tx2.log INFO 2018-02-15 11:40:46,529 [main] org.mule.util.journal.TransactionJournal: Using files for tx logs C:\Users\user\AnypointStudio\BPMtoMulesoft\inventoryService\.\.mule\queue-xa-tx-log\tx1.log and C:\Users\user\AnypointStudio\BPMtoMulesoft\inventoryService\.\.mule\queue-xa-tx-log\tx2.log INFO 2018-02-15 11:40:46,559 [main] org.mule.config.spring.SpringXmlDomainConfigurationBuilder: Configured Mule using "org.mule.config.spring.SpringXmlDomainConfigurationBuilder" with configuration resource(s): "[ConfigResource{resourceName='jar:file:/C:/Users/user/.m2/repository/com/mercury/mulesoft/muledomain/1.0.0-SNAPSHOT/muledomain-1.0.0-SNAPSHOT.zip!/mule-domain-config.xml'}]" INFO 2018-02-15 11:40:46,559 [main] org.mule.util.queue.QueueXaResourceManager: Starting ResourceManager INFO 2018-02-15 11:40:46,559 [main] org.mule.util.queue.QueueXaResourceManager: Started ResourceManager [org.mule.munit.remote.CoverageManager]Coverage report calculation failed - java.lang.RuntimeException: org.mule.api.lifecycle.LifecycleException: Failed to invoke lifecycle phase "start" on object: org.mule.module.http.internal.listener.DefaultHttpListenerConfig#68b7d0ef at org.mule.munit.runner.simple.MunitSimpleRunner.run(MunitSimpleRunner.java:54) at org.mule.munit.remote.path.ApplicationPathBuilder.buildApplicationPaths(ApplicationPathBuilder.java:80) at org.mule.munit.remote.path.ApplicationPathBuilder.getFlowPaths(ApplicationPathBuilder.java:41) ..... Caused by: org.mule.api.lifecycle.LifecycleException: Failed to invoke lifecycle phase "start" on object: org.mule.module.http.internal.listener.DefaultHttpListenerConfig#68b7d0ef at org.mule.lifecycle.phases.DefaultLifecyclePhase.applyLifecycle(DefaultLifecyclePhase.java:249) at org.mule.lifecycle.RegistryLifecycleCallback.doApplyLifecycle(RegistryLifecycleCallback.java:99) at org.mule.lifecycle.RegistryLifecycleCallback.onTransition(RegistryLifecycleCallback.java:71) ..... ... 6 more Caused by: java.net.BindException: Address already in use: bind at sun.nio.ch.Net.bind0(Native Method) at sun.nio.ch.Net.bind(Net.java:433) at sun.nio.ch.Net.bind(Net.java:425) ..... ... 22 more [org.mule.munit.remote.RemoteRunner]Done [INFO] Printing Coverage Report... [INFO] [INFO] MUnit Coverage Summary [INFO] [INFO] * Resources: 0 - Flows: 0 - Message Processors: 0 [INFO] * Application Coverage: N/A [INFO] [INFO] MUnit Run Summary [INFO] [INFO] >> inventoryService-apikit-test.xml test result: Tests: 0, Errors: 0, Failures:0, Skipped: 0 <<< ERROR [INFO] >> inventoryService-apikit-exception-test.xml test result: Tests: 0, Errors: 0, Failures:0, Skipped: 0 <<< ERROR [INFO] [INFO] > Tests: 0 [INFO] > Errors: 0 [INFO] > Failures: 0 [INFO] > Skipped: 0 [INFO] [INFO] BUILD FAILURE [INFO] Total time: 11.421 s [INFO] Finished at: 2018-02-15T11:40:47-06:00 [INFO] Final Memory: 27M/266M [INFO] [ERROR] Failed to execute goal com.mulesoft.munit.tools:munit-maven-plugin:1.3.4:test (test) on project inventoryService: Build Fail: MUnit Tests Failed -> [Help 1] [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] 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] Scanning for projects... [INFO] [INFO] Building Domain muledomain Project 1.0.0-SNAPSHOT [INFO] [INFO] --- mule-domain-maven-plugin:1.2:attach-test-resources (default-attach-test-resources) # muledomain --- [INFO] attaching test resource C:\Users\user\AnypointStudio\BPMtoMulesoft\muledomain\src\main\app [INFO] --- maven-resources-plugin:3.0.2:resources (default-resources) # muledomain --- [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 0 resource [INFO] --- mule-domain-maven-plugin:1.2:filter-resources (default-filter-resources) # muledomain --- [INFO] --- maven-compiler-plugin:3.6.1:compile (default-compile) # muledomain [INFO] No sources to compile [INFO] --- maven-resources-plugin:3.0.2:testResources (default-testResources) # muledomain --- [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory C:\Users\user\AnypointStudio\BPMtoMulesoft\muledomain\src\test\resources [INFO] skip non existing resourceDirectory C:\Users\user\AnypointStudio\BPMtoMulesoft\muledomain\src\main\app [INFO] --- maven-compiler-plugin:3.6.1:testCompile (default-testCompile) # muledomain --- [INFO] No sources to compile [INFO] --- maven-surefire-plugin:2.20:test (default-test) # muledomain --- [INFO] No tests to run. [INFO] [INFO] BUILD SUCCESS [INFO] [INFO] Total time: 1.770 s [INFO] Finished at: 2018-02-15T11:40:50-06:00 [INFO] Final Memory: 12M/145M [INFO] ... I have spent a good amount of time researching the errors, but much of what I've found that others had was missing dependencies, which I seem to already have in my pom file. What could be the issue? Any suggestions appreciated.
Based on the log you provided, I observed 2 main errors: #1 nested exception is java.lang.RuntimeException: Property mule.env could not be found Solution: cross check whether you have configured mule.env=dev based on your environment(dev/test/prod). #2 Caused by: java.net.BindException: Address already in use: bind Solution: If you are using multiple HTTP connectors with the same port number, or if you are using a port which is occupied by some other s/w in your system then you will get this BindException. Try a different port number, e.g. 2018.
<munit:config name="munit" doc:name="MUnit configuration" mock-connectors="false" mock-inbounds="false" /> please update you Munit XML with above line, it should work!!