Stackoverflowerror - Infinite loop when deploying Ear with ejb and Demoiselle

Asked

Viewed 136 times

4

By doing the deploy an EAR with an EJB that depends on the Demoiselle-core, an exception to Stackoverflowerror is launched.

It happens that when trying to create a Resourcebundle (Resourcebundleproducer.createNamed(Resourcebundleproducer.java:77)) the class Beans (line 159) launches a Nosuchelementexception which is treated in the block:

} catch (NoSuchElementException cause) {
    StringBuffer buffer = new StringBuffer();
    buffer.append(beanClass.getCanonicalName());

    if (qualifiers != null) {
        for (Annotation qualifier : qualifiers) {
            buffer.append(", ");
            buffer.append(qualifier.getClass().getCanonicalName());
        }
    }

    String message = getBundle().getString("bean-not-found", buffer.toString());
    throw new DemoiselleException(message, cause);
}

That is, the block catch depends on the Resourcebundle and enters the loop infinite.

For some reason the Local dependency of Resourcebundle is not satisfied and the method BeanManager.getBeans() returns a Emptyimmutableset causing the Nosuchelementexception.

The example application is in: https://bitbucket.org/juliannoms/demoiselle-ear-teste .

Note: Before version 2.4.0-BETA2 the error occurred only in the class that injected the Resourcebundle and not in the deploy of the application.

Editing:

After studying the code of Demoiselle (github.com/Demoiselle), I realized that if my project depended on one of the packages - demoiselle-se or demoiselle-servlet - the object of the class java.util.Locale could be injected thus solving the released Exception Nosuchelementexception.

The result is that every project that depends on the Demoiselle-core must also depend on one of these two dependencies to function properly.

No answers

Browser other questions tagged

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