Closed fabiovas closed 6 years ago
I was not able to reproduce your exception. I used your pom configuration to create an empty project, but it starts up without any exceptions.
Can you provide any additional info about your project? Which version of Java are you using.
I attached the project, that is very simple. First I started using the JSP sample and now I am trying to add JAX-RS and JPA libs. jsf.zip
Your project works OK in my environment. Maybe it is the problem with your Eclipse build. Try building the project with Maven
mvn clean package
and then execute the JAR:
java -jar .\target\jsf-1.0.0.jar
Yes, when I build using the linux console it works. This is my eclipse version: Version: Oxygen.2 Release (4.7.2) Build id: 20171218-0600 Eclipse was using the maven 3.5.3 that I had installed.
THANKS A LOT!!!!!
Hi. Every time I try to start an uber jar with JAX-RS it fails. Exception org.eclipse.jetty.server.AbstractConnector -- Started ServerConnector@41641c84{HTTP/1.1,[http/1.1]}{0.0.0.0:8080} Exception in thread "main" java.lang.NoClassDefFoundError: org/glassfish/jersey/internal/ServiceFinder at org.glassfish.jersey.servlet.internal.ServletContainerProviderFactory.getAllServletContainerProviders(ServletContainerProviderFactory.java:66) at org.glassfish.jersey.servlet.init.JerseyServletContainerInitializer.onStartup(JerseyServletContainerInitializer.java:134) at org.eclipse.jetty.plus.annotation.ContainerInitializer.callStartup(ContainerInitializer.java:140) at org.eclipse.jetty.annotations.ServletContainerInitializersStarter.doStart(ServletContainerInitializersStarter.java:63) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:329) at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1515) at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1477) at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:785) at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:261) 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:133) at org.eclipse.jetty.server.Server.start(Server.java:418) at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:107) at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113) at org.eclipse.jetty.server.Server.doStart(Server.java:385) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) at com.kumuluz.ee.jetty.JettyServletServer.startServer(JettyServletServer.java:80) at com.kumuluz.ee.EeApplication.initialize(EeApplication.java:360) 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:455)
at com.kumuluz.ee.loader.EeBootLoader.launch(EeBootLoader.java:54)
at com.kumuluz.ee.loader.EeBootLoader.main(EeBootLoader.java:41)
Caused by: java.lang.ClassNotFoundException: Failure to load: org.glassfish.jersey.internal.ServiceFinder
at com.kumuluz.ee.loader.EeClassLoader.loadClass(EeClassLoader.java:509)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
This is my Pom: <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">