我正在将一个 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();
}
}