Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to invoke annotation processor - while deploying in Weblogic 12.2.1.2.0

I am in process of migrating a java project from weblogic 8.1 to weblogic 12c.

As per oracle document i have converted below things.

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

  @WebService
  @SoapBinding
  @SoapMessageHandler

After all above changes did generate war file and deployed in weblogic 12c server which throws error like below

Unable to invoke annotation processor

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

Code :

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();
   }
}
like image 533
learner Avatar asked Nov 07 '22 07:11

learner


1 Answers

Solution:

Servlet mapping caused an issue in webservice.xml while migration.

<servlet-link></servlet-link>
like image 120
learner Avatar answered Nov 12 '22 19:11

learner