Munit maven error - maven

I am getting an error while trying to run Munit using Maven. It's a domain project and my Munit test cases are available in mule projects. when I ran maven, it is giving me file not found exception (mule-domain-config.xml). I tried all possible ways by checking in this site but of no luck. Below is the stack trace.
INFO 2017-01-06 01:15:01,226 [main]
org.mule.munit.runner.MuleContextManager: Loading mule-app.properties
... INFO 2017-01-06 01:15:01,319 [main]
org.mule.munit.runner.domain.MunitDomainContextBuilder: Loading
mule-deploy.properties ... java.lang.RuntimeException:
org.mule.api.config.ConfigurationException: mule-domain-config.xml
(java.io.FileNotFoundException)
Thanks

Check for the pom.xml file for proper configurations.
If you are still facing the issue try cleaning anypoint and run it again.It might Work.

Related

Error deploying Spring boot application in Websphere 8.5.5

I am getting following error message in stdout while starting my application in Websphere 8.5.5:
1/9/20 11:56:48:437 UTC] 000000c0 SystemOut O 11:56:48.435 [WebContainer : 3] ERROR
org.springframework.boot.SpringApplication - Application run failed
java.lang.IllegalStateException: Failed to load property source from location 'classpath:/application.xml'
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.load(ConfigFileApplicationListener.java:545)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.loadForFileExtension(ConfigFileApplicationListener.java:494)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.load(ConfigFileApplicationListener.java:464)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.lambda$null$7(ConfigFileApplicationListener.java:443)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader$$Lambda$290.0000000000368730.accept(Unknown Source)
at java.lang.Iterable.forEach(Iterable.java:86)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.lambda$load$8(ConfigFileApplicationListener.java:443)
The version of spring boot that I am using is 2.2.2.
Why is Spring Boot trying to load the ear deployment descriptor, which is in the META-INF folder?
As M. Deinum says, the problem it is giving is because Spring Boot is trying to load the ear artifact's application.xml file to get properties and gives a parsing error as it does not have the expected format.
I have had this same error when displaying in application servers and it is solved by taking from the MANIFEST.MF file the path /META-INF
In my case, I was including the war plugin with this:
<manifestEntries>
<Class-Path>./ META-INF/</Class-Path>
</manifestEntries>
Try deleting that entry and redeploying.

Getting "Caused by: java.lang.IllegalStateException: HTTP Server cannot be loaded: No implementation of HttpServerFacade found on classpath." error

I am trying out the distributed random forest implementation of H2O using sparkling-water. But I am facing the following error when I run the spark-submit command.
Exception in thread "H2O Launcher thread" java.lang.ExceptionInInitializerError
at water.init.NetworkInit.initializeNetworkSockets(NetworkInit.java:77)
at water.H2O.startLocalNode(H2O.java:1621)
at water.H2O.main(H2O.java:2081)
at water.H2OStarter.start(H2OStarter.java:22)
at water.H2OStarter.start(H2OStarter.java:47)
at org.apache.spark.h2o.backends.internal.InternalBackendUtils$$anonfun$6$$anon$1.run(InternalBackendUtils.scala:173)
Caused by: java.lang.IllegalStateException: HTTP Server cannot be loaded: No implementation of HttpServerFacade found on classpath. Please refer to https://0xdata.atlassian.net/browse/TN-13 for details.
at water.webserver.iface.HttpServerLoader.<clinit>(HttpServerLoader.java:16)
... 6 more
I have tried out the solution mentioned at the location https://0xdata.atlassian.net/browse/TN-13
but for some reason it still isn't able to find the ai.h2o:h2o-jetty-8 on the classpath.
I resolved the issue by adding the following maven coordinates to the packages option in spark-submit
--packages ai.h2o:h2o-jetty-8:3.24.0.3

Service is not registered class='interface org.eclipse.tycho.core.shared.ProxyServiceFacade'

Our Jenkins has a Maven/Tycho build using Java8 that worked perfectly in February, but stopped working now in April. (Since it was not run during this interval, I'm not sure when it stopped working exactly.)
The exception that gets thrown right after downloading the p2 repositories (or maybe right in the middle) is:
[WARNING] Error initializing: org.eclipse.tycho.p2.resolver.P2DependencyResolver#18bef28
java.lang.RuntimeException: java.lang.IllegalStateException: Service is not registered class='interface org.eclipse.tycho.core.shared.ProxyServiceFacade'
at org.eclipse.sisu.equinox.embedder.internal.DefaultEquinoxEmbedder.checkStarted (DefaultEquinoxEmbedder.java:312)
at org.eclipse.sisu.equinox.embedder.internal.DefaultEquinoxEmbedder.getService (DefaultEquinoxEmbedder.java:286)
at org.eclipse.sisu.equinox.embedder.internal.DefaultEquinoxEmbedder.getService (DefaultEquinoxEmbedder.java:281)
at org.eclipse.tycho.p2.resolver.P2DependencyResolver.initialize (P2DependencyResolver.java:429)
Caused by: java.lang.IllegalStateException: Service is not registered class='interface org.eclipse.tycho.core.shared.ProxyServiceFacade'
at org.eclipse.sisu.equinox.embedder.internal.DefaultEquinoxEmbedder.getService (DefaultEquinoxEmbedder.java:302)
at org.eclipse.sisu.equinox.embedder.internal.DefaultEquinoxEmbedder.getService (DefaultEquinoxEmbedder.java:281)
at org.eclipse.tycho.osgi.configuration.OSGiProxyConfigurator.afterFrameworkStarted (OSGiProxyConfigurator.java:41)
at org.eclipse.sisu.equinox.embedder.internal.DefaultEquinoxEmbedder.doStart (DefaultEquinoxEmbedder.java:185)
...and...
[WARNING] Error injecting: org.eclipse.tycho.p2.resolver.P2DependencyResolver
com.google.inject.ProvisionException: Unable to provision, see the following errors:
1) Error notifying InjectionListener org.eclipse.sisu.plexus.PlexusBeanBinder#1b6fe69 of org.eclipse.tycho.p2.resolver.P2DependencyResolver.
Reason: java.lang.RuntimeException: java.lang.IllegalStateException: Service is not registered class='interface org.eclipse.tycho.core.shared.ProxyServiceFacade'
while locating org.eclipse.tycho.p2.resolver.P2DependencyResolver
1 error
at com.google.inject.internal.InternalProvisionException.toProvisionException (InternalProvisionException.java:226)
at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1053)
at com.google.inject.internal.InjectorImpl.getInstance (InjectorImpl.java:1086)
at org.eclipse.sisu.space.AbstractDeferredClass.get (AbstractDeferredClass.java:48)
...and of course...
[ERROR] Internal error: java.lang.RuntimeException: Could not instantiate required component: com.google.inject.ProvisionException: Unable to provision, see the following errors:
[ERROR]
[ERROR] 1) Error notifying InjectionListener org.eclipse.sisu.plexus.PlexusBeanBinder#1b6fe69 of org.eclipse.tycho.p2.resolver.P2DependencyResolver.
[ERROR] Reason: java.lang.RuntimeException: java.lang.IllegalStateException: Service is not registered class='interface org.eclipse.tycho.core.shared.ProxyServiceFacade'
[ERROR] while locating org.eclipse.tycho.p2.resolver.P2DependencyResolver
[ERROR] at ClassRealm[extension>org.eclipse.tycho:tycho-maven-plugin:1.3.0, parent: sun.misc.Launcher$AppClassLoader#647e05] (via modules: org.eclipse.sisu.wire.WireModule -> org.eclipse.sisu.plexus.PlexusBindingModule)
[ERROR] while locating org.eclipse.tycho.core.DependencyResolver annotated with #com.google.inject.name.Named(value=p2)
[ERROR]
[ERROR] 1 error
[ERROR] role: org.eclipse.tycho.core.DependencyResolver
[ERROR] roleHint: p2
[ERROR] -> [Help 1]
My first thought was that Maven takes new releases of it's plug-ins, but there are no versions missing in the pom.xml and Maven does not warn about it either.
I tried updating from Tycho 0.22 to 0.26 to 1.3, but neither version worked.
I tried running the build with Maven 3.0 and 3.6, but neither worked.
I tried Java 8 with 32bit and 64bit, and Java 11.
Now I have no idea where to even start to search for the source of the problem. Can anyone shed some light on this?
(If you need some more information, just ask. The files are pretty long, so I'd rather not copy all of them into this question before narrowing down where the problem might be.)
It helped for me to clean local maven repository.
Normally its located in <User-home>/.m2
HTH
I think I have similar setup as yours: An Eclipse RCP project which should be build on Jenkins in a Docker container by Maven/Tycho.
The following issue gave me a hint in the right direction: https://bugs.eclipse.org/bugs/show_bug.cgi?id=552877
When I ran Maven with -X I got the following debug-output:
[DEBUG] Using local repository at ?/.m2/repository
This led me to the following question: Why does maven use "?" as my home directory
But additionally to the -s argument I also needed to set the user.home parameter explicitly. (But that is probably only needed because I have not set the local repository location in the settings.xml)
This finally results in this Maven call: mvn -B clean verify --fail-at-end -s /some/folder/settings.xml -Duser.home=/another/folder

Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.6.4:start

I'm trying to install maven with "mvn install" command and I'm getting this error message:
[WARNING] [beddedLocalContainer] org.codehaus.cargo.container.ContainerException: Server did not start after 120000 milliseconds
[ERROR] Starting container [org.codehaus.cargo.container.jetty.Jetty9xEmbeddedLocalContainer#1ce2029b] failed, now stopping container
[INFO] [beddedLocalContainer] Jetty 9.4.6.v20170531 Embedded is stopping...
2018-05-17 23:55:27.062:INFO:oejs.AbstractConnector:Thread-14: Stopped ServerConnector#3fb272f3{HTTP/1.1,[http/1.1]}{0.0.0.0:8081}
2018-05-17 23:55:27.062:INFO:oejs.session:Thread-14: Stopped scavenging
2018-05-17 23:55:27.157:INFO:oejsh.ContextHandler:Thread-14: Stopped o.e.j.w.WebAppContext#1a7468a0{/challenge-gui,null,UNAVAILABLE}{C:\Users\User1\Desktop\Chalenge\challenge-auttest\gui\target\challenge-gui-1.0-SNAPSHOT.war}
Any idea what could be the problem ?
I had the same problem as yours. I checked variety of versions of this plug-in, no one works. that error occurred because glassfish server has not started already.
I had to start glassfish server, before deploying (the command $ mvn install)
note that glassfish v4 needs JDK6 or JDK7. and glassfish v5 needs JDK7 or JDK8, not beyond.

Error configuring application listener of class org.springframework.web.context.ContextLoaderListener

I'm trying to deploy my application through IntelliJ IDEA 11.0, and it is giving me the following error:
09:35:52,997 WARN [JAXWSDeployerHookPreJSE] Cannot load servlet class: org.springframework.web.servlet.ViewRendererServlet
09:35:52,999 INFO [TomcatDeployer] deploy, ctxPath=/my-portlet-1.0, warUrl=.../tmp/deploy/tmp555932443707493677my-portlet-1.0-exp.war/
09:35:53,386 ERROR [0]] Error configuring application listener of class org.springframework.web.context.ContextLoaderListener
java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
...
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
09:35:53,391 ERROR [0]] Skipped installing application listeners due to previous error(s)
09:35:53,391 ERROR [StandardContext] Error listenerStart
09:35:53,391 ERROR [StandardContext] Context [/my-portlet-1.0] startup failed due to previous errors
09:35:53,402 WARN [ServiceController] Problem starting service jboss.web.deployment:war=my-portlet-1.0.war,id=-135869088
org.jboss.deployment.DeploymentException: URL file:/C:/JBOSS/jboss-portal-2.7.2/server/default/tmp/deploy/tmp555932443707493677my-portlet-1.0-exp.war/ deployment failed
at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:386)
at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)
...
at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
09:35:53,407 ERROR [MainDeployer] Could not start deployment: file:C:/Users/Abbas/Projects/my-app/my-portlet/target/my-portlet-1.0.war
org.jboss.deployment.DeploymentException: URL file:/C:/JBOSS/jboss-portal-2.7.2/server/default/tmp/deploy/tmp555932443707493677my-portlet-1.0-exp.war/ deployment failed
at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:386)
at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)
...
at java.lang.Thread.run(Thread.java:662)
[2012-07-25 09:35:53,431] Artifact my-portlet:war: Error during artifact deployment. See server log for details.
Does anyone know how to fix this?
Actually I was also facing the same problem and after wasting a lot of time. I realized that actually it is a very silly error. You must have changed the pom file and update the dependencies. But once we do so the jar files of maven dependencies are removed from deployment Assembly.
All you need to do is:
Right click the project folder.
click on properties.
click on Web Deployment Assembly.
check if maven dependencies are listed or not.
if not click the add button
from the list select the maven dependencies and done, apply and OK!
Hope this solve your problem. If you still have it!
ContextLoaderListener is in org.springframework.web-3.0.4.RELEASE.jar
You mentioned a file called org.springframework-3.0.4.RELEASE.jar, which is different.
Maybe you have a typo in your dependencies file?

Resources