On Fri, May 5, 2017 at 7:57 AM COURTAULT Francois <
[email protected]> wrote:

> I perform the same test by using curl instead of Swagger UI and I got the
> same response:
> {"code":500,"messages":["javax.enterprise.inject.CreationException","java.lang.StackOverflowError","
> - Caused by: null"]}.
>

I can't speak to TomEE here but this means almost certainly that you have
something like:

public class A {
  @Inject
  private B b;
}
public class B {
  @Inject
  private A a;
}

You can resolve these situations with:

public class A {
  @Inject
  private *Provider<B> bProvider*;
}
public class B {
  @Inject
  private A a;
}

…or:

public class A {
  @Inject
  private B b;
}
public class B {
  @Inject
  private *Provider<A> aProvider*;
}

Best,
Laird
--
http://about.me/lairdnelson

Reply via email to