kumuluz / kumuluzee

Lightweight open-source framework for developing microservices using standard Java EE technologies and migrating Java EE to cloud-native architecture.
https://ee.kumuluz.com
MIT License
290 stars 71 forks source link

javax.xml.stream.FactoryConfigurationError: Provider com.bea.xml.stream.MXParserFactory not found #124

Open raphaelLacerda opened 6 years ago

raphaelLacerda commented 6 years ago

I've got the follow error when i've tried to run the ubber jar with

3.0.0 jdk1.8.0_161.jdk 2018-11-03 19:40:57 INFO Bootstrap:49 - WELD-ENV-000020: Using jandex for bean discovery 2018-11-03 19:40:57.098 WARNING -- org.eclipse.jetty.webapp.WebAppContext -- Failed startup of context o.e.j.w.WebAppContext@163e4e87{/api/agenda,jar:file:/Users/lacerdaph/workspace/lider/agenda-api/target/agenda-api-0.0.1-SNAPSHOT.jar!/webapp,UNAVAILABLE} javax.xml.stream.FactoryConfigurationError: Provider com.bea.xml.stream.MXParserFactory not found at javax.xml.stream.FactoryFinder.newInstance(FactoryFinder.java:72) at javax.xml.stream.FactoryFinder.find(FactoryFinder.java:176) at javax.xml.stream.FactoryFinder.find(FactoryFinder.java:92) at javax.xml.stream.XMLInputFactory.newInstance(XMLInputFactory.java:136) at org.jboss.weld.xml.BeansXmlStreamParser.parse(BeansXmlStreamParser.java:133) at org.jboss.weld.bootstrap.WeldBootstrap.parse(WeldBootstrap.java:136) at org.jboss.weld.environment.deployment.discovery.AbstractBeanArchiveScanner.parseBeansXml(AbstractBeanArchiveScanner.java:46) at org.jboss.weld.environment.deployment.discovery.DefaultBeanArchiveScanner.scan(DefaultBeanArchiveScanner.java:76) at org.jboss.weld.environment.servlet.deployment.WebAppBeanArchiveScanner.scan(WebAppBeanArchiveScanner.java:73) at org.jboss.weld.environment.deployment.discovery.AbstractDiscoveryStrategy.performDiscovery(AbstractDiscoveryStrategy.java:93) at org.jboss.weld.environment.servlet.WeldServletLifecycle.createDeployment(WeldServletLifecycle.java:302) at org.jboss.weld.environment.servlet.WeldServletLifecycle.initialize(WeldServletLifecycle.java:156) at org.jboss.weld.environment.servlet.EnhancedListener.onStartup(EnhancedListener.java:62) at org.eclipse.jetty.plus.annotation.ContainerInitializer.callStartup(ContainerInitializer.java:140) at org.eclipse.jetty.annotations.ServletContainerInitializersStarter.doStart(ServletContainerInitializersStarter.java:64) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:355) at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1497) at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1459) at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:848) at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:287) at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:545) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:138) at org.eclipse.jetty.server.Server.start(Server.java:419) at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:108) at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113) at org.eclipse.jetty.server.Server.doStart(Server.java:386) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) at com.kumuluz.ee.jetty.JettyServletServer.startServer(JettyServletServer.java:81) at com.kumuluz.ee.EeApplication.initialize(EeApplication.java:368) at com.kumuluz.ee.EeApplication.(EeApplication.java:73) at com.kumuluz.ee.EeApplication.main(EeApplication.java:85) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.kumuluz.ee.loader.EeClassLoader.invokeMain(EeClassLoader.java:434) at com.kumuluz.ee.loader.EeBootLoader.launch(EeBootLoader.java:54) at com.kumuluz.ee.loader.EeBootLoader.main(EeBootLoader.java:41) The workaround was to add the follow dependecy stax stax 1.2.0
raphaelLacerda commented 6 years ago

workaround

<dependency>
            <groupId>stax</groupId>
            <artifactId>stax</artifactId>
            <version>1.2.0</version>
        </dependency>
urbim commented 6 years ago

Hi!

This is likely an issue with the dependencies. Can you locate the dependency that is causing this error to appear?