Error while deploying EJB project with lambda using glassfish 4

5

I have two java files in my project

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:

WhenIdeploythisprojectthiswayonglassfishserver4everythingworksoutperfectly,deployscorrectlyandworks

Thedetail/problemiswhenthejavafilethatcontainsLambda(java8)intheSecond.javacaseisinthefirstorderofthisproject

thisway:

When deploying the EJB project on the server

The following error occurs in the log

  

Failed to scan for annotations: 52264

     

Archive type of (very long dir) ... \ TestPath \ Layer \ build \ classes was not recognized.

When I use Lambda, I have this kind of problem, whether it wants to or not, it does not make sense, where the order of the classes within the project causes it to implant or not,

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

    
asked by anonymous 17.09.2015 / 13:15

1 answer

1

It seems like a bug in Glassfish: GLASSFISH-21287

It seems that the HK2 component is the culprit: HK2-136

    
06.10.2015 / 03:38