The attribute value is undefined for the annotation type Produces for "MediaType.APPLICATION_JSON"

I am getting a weird warning (while hovering the red line in eclipse) for this very simple restful service code:
(Eclipse draws a red line under “MediaType.APPLICATION_JSON”)

import java.util.List;
import java.util.logging.Logger;

import javax.enterprise.inject.Produces;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;


import com.myCompany.annotation.RestfulServiceAddress;
import com.myCompany.myProject.middleware.api.myService;

public class myServiceImpl implements myService {

private EntityManagerFactory entityManagerFactory;

public List<Object> getStuff() {
    EntityManager entityManager = entityManagerFactory
    try {
        return entityManager.createQuery(
                "Select S from Stuff S", Object.class)
    } catch (Exception ex) {
        return null;
    } finally {

public EntityManagerFactory getEntityManagerFactory() {
    return entityManagerFactory;

public void setEntityManagerFactory(
        EntityManagerFactory entityManagerFactory) {
    this.entityManagerFactory = entityManagerFactory;

Also maven builds the jar file without problems. But I get an error from the OSGI container, telling me the jar is failed.

Source: eclipse

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.