Error when deploying lambda EJB project using glassfish 4

Asked

Viewed 201 times

5

I have in my project two java files

First.java.

package br.com.bom;

import javax.ejb.Stateless;

@Stateless
public class Primeiro
{
}

Second java.

package br.com.bom;

import javax.ejb.Stateless;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

@Stateless
public class Segundo
{
    public String getTxt()
    {
        List<String> list = new ArrayList<>(Arrays.asList(
                "alfa", "bravo", "charlie", "delta", "echo", "foxtrot"));
        list.replaceAll(s -> s.toUpperCase());
        return list.toString();
    }
}

with the following order of classes:

inserir a descrição da imagem aqui

when I deploy this project this way on the glassfish server 4 everything goes perfectly well, deploys correctly and works

the detail/problem is when the java file containing Lambda (java 8) in the case Second java. is first in order in this project

in this way:

inserir a descrição da imagem aqui

when deploying the EJB project to the server

the following error occurs in the log

Failed to scan for Annotations: 52264

Archive type of (dir very long)... Testeimplantacaolambda build classes was not recognized.

when I use Lambda, I have this kind of problem, whether I like it or not, it doesn’t make sense, where the order of the classes within the project make it implant or not, someone has already gone through it?

I have all features in the latest version of both netbeans and glassfish

  • Is your server running in windows? If so, how many characters do you have in "dir too long"?

  • both, will have moments in which will be in windows and others in linux. 61 characters in all - the full path: C: Java Development VERSAO Testeimplantacaolambda build classes

  • "too long" was an exaggeration in fact

1 answer

1

Browser other questions tagged

You are not signed in. Login or sign up in order to post.