我试过 modelmapper 它抛出错误,即使我已经将它添加到类路径
javax.servlet.ServletException: org.glassfish.jersey.server.ContainerException: java.lang.NoClassDefFoundError: org/modelmapper/ModelMapper
org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:410)
org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:346)
org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:358)
org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:311)
org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:205)
</pre>
<p><b>Root Cause</b></p>
<pre>org.glassfish.jersey.server.ContainerException: java.lang.NoClassDefFoundError: org/modelmapper/ModelMapper
org.glassfish.jersey.servlet.internal.ResponseWriter.rethrow(ResponseWriter.java:255)
org.glassfish.jersey.servlet.internal.ResponseWriter.failure(ResponseWriter.java:237)
org.glassfish.jersey.server.ServerRuntime$Responder.process(ServerRuntime.java:445)
org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:264)
org.glassfish.jersey.internal.Errors$1.call(Errors.java:248)
org.glassfish.jersey.internal.Errors$1.call(Errors.java:244)
org.glassfish.jersey.internal.Errors.process(Errors.java:292)
org.glassfish.jersey.internal.Errors.process(Errors.java:274)
org.glassfish.jersey.internal.Errors.process(Errors.java:244)
org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:265)
org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:235)
org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:684)
org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:394)
org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:346)
org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:358)
org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:311)
org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:205)