Uncompilable source code

705 views Asked by At

When I deploy my application in payara it gives me this error could help me attach the code to give me some idea how to solve it

Caused by: java.lang.RuntimeException: Uncompilable source code - Erroneous tree type: <any>
at gt.gob.mp.siamp.rrhh.business.ejb.ws.config.RestWsConfig.addRestResourceClasses(RestWsConfig.java:30)
at gt.gob.mp.siamp.rrhh.business.ejb.ws.config.RestWsConfig.getClasses(RestWsConfig.java:23)
at org.glassfish.jersey.server.ResourceConfig$RuntimeConfig$3.run(ResourceConfig.java:1234)
at org.glassfish.jersey.internal.Errors$2.call(Errors.java:289)
at org.glassfish.jersey.internal.Errors$2.call(Errors.java:286)
@ApplicationPath("/rest")
public class RestWsConfig extends Application {

    private static final Logger log = Logger.getLogger(RestWsConfig.class);

    @Override
    public Set<Class<?>> getClasses() {

        try {
            log.debug("Loading rest config");
            Set<Class<?>> resources = new java.util.HashSet<>();
            addJsonProvider(resources);
            addRestResourceClasses(resources);
            return resources;
        } catch (Exception ex) {
            return null;
        }
    }

    private void addRestResourceClasses(Set<Class<?>> resources) {
        //resources.add(gt.gob.mp.siamp.mailer.business.ejb.ws.MailerWs.class);
        resources.add(gt.gob.mp.siamp.rrhh.ejb.cto.IContratosService.class);
        log.debug("rest resources added");
    }

    private void addJsonProvider(Set<Class<?>> resources) {
        try {
            //Class jsonProvider = Class.forName("org.glassfish.jersey.jackson.JacksonFeature");
            Class jsonProvider = Class.forName("org.glassfish.jersey.moxy.json.MoxyJsonFeature");
            // Class jsonProvider = Class.forName("org.glassfish.jersey.jettison.JettisonFeature");
            resources.add(jsonProvider);
            log.debug("JSon provider added");
        } catch (ClassNotFoundException ex) {
            log.error(ex);
        }
    }
}
0

There are 0 answers