无法调用注释处理器 - 在 Weblogic 12.2.1.2.0 中部署时

Unable to invoke annotation processor - while deploying in Weblogic 12.2.1.2.0

我正在将一个 java 项目从 weblogic 8.1 迁移到 weblogic 12c。

根据 oracle 文档,我已经转换了以下内容。

 1. Servicegen converted to jwsc task
 2. deployment descriptor has been modified
 3. Below annotations added in service implementation file

  @WebService
  @SoapBinding
  @SoapMessageHandler

以上所有更改确实生成了 war 文件并部署在 weblogic 12c 服务器中,该服务器抛出如下错误

Unable to invoke annotation processor

<BEA-160228> App merge failed your application
weblogic.utils.compiler.ToolFailureException: unable to invoke annotation processor

代码:

package com.tutorialspoint.stateless;

import com.tutorialspoint.entity.Book;
import java.util.List;
import javax.ejb.Stateless;
import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

@Stateless
@WebService(serviceName="LibraryService")
public class LibraryPersistentBean implements LibraryPersistentBeanRemote {
    
   public LibraryPersistentBean() {
   }

   @PersistenceContext(unitName="EjbComponentPU")
   private EntityManager entityManager;         

   public void addBook(Book book) {
      entityManager.persist(book);
   }    
   
   @WebMethod(operationName="getBooks")
   public List <Book> getBooks() {
      return entityManager.createQuery("From Book").getResultList();
   }
}

解法:

Servlet 映射在迁移时导致 webservice.xml 出现问题。

<servlet-link></servlet-link>