1

当我尝试部署我的 Liferay 7 OSGI 组件(只是一个 REST 客户端)时,我得到了一个异常。

ERROR [http-nio-8080-exec-8][PortletServlet:109] 
  javax.portlet.PortletException: com.vaadin.server.ServiceException: 
  java.lang.RuntimeException: java.lang.ClassNotFoundException: 
  org.glassfish.jersey.client.JerseyClientBuilder cannot be found by 
  com.liferay.portal.remote.cxf.common_2.0.6
  javax.portlet.PortletException: com.vaadin.server.ServiceException: 
  java.lang.RuntimeException: java.lang.ClassNotFoundException: 
  org.glassfish.jersey.client.JerseyClientBuilder cannot be found by 
  com.liferay.portal.remote.cxf.common_2.0.6
    at com.vaadin.server.VaadinPortlet.handleRequest(VaadinPortlet.java:547)

...

Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: 
  org.glassfish.jersey.client.JerseyClientBuilder cannot be found by 
  com.liferay.portal.remote.cxf.common_2.0.6

为了获得这个 ClientBuilder,我尝试从项目中添加“jersey-min-2.22.2”:https ://mvnrepository.com/artifact/com.eclipsesource.jaxrs/jersey-all/2.22.2

所以我的问题在这里:我做错了什么?

编辑:我回答了我自己的问题。我忘记在我的项目中使用 JerseyClientBuilder。现在它对我有用。

4

0 回答 0