tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject RE: Issue with CDI injection: got CreationException with StackOverflowError
Date Fri, 05 May 2017 15:14:35 GMT
Tomee will log the exception. Likely not done here cause of the exception
mapper using this specific format. Said otherwise: debug swagger
serializer/mapper.


Le 5 mai 2017 16:57, "COURTAULT Francois" <Francois.Courtault@gemalto.com>
a écrit :

> Hello Romain,
>
> First, you have to know that in our application, Jackson is the JAX-RS
> provider:
> @Provider
> @Consumes(MediaType.APPLICATION_JSON)
> @Produces(MediaType.APPLICATION_JSON)
> public class MyJacksonJsonProvider extends JacksonJsonProvider {
> }
>
> But according to me the issue is not on the JAX-RS provider side bur
> rather on CDI part.
>
> 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"]}.
> So the question is : how to debug/log any CDI issue in TomEE ?
>
> Best Regards.
>
> -----Original Message-----
> From: Romain Manni-Bucau [mailto:rmannibucau@gmail.com]
> Sent: vendredi 5 mai 2017 15:06
> To: users@tomee.apache.org
> Subject: Re: Issue with CDI injection: got CreationException with
> StackOverflowError
>
> Hi
>
> Looks like a cyclic reference. Likely a cause of the exception. Johnzon 1
> fixed it i think for stacks but here the format looks specific so likely a
> model issue. Can be linked to swagger model which relies on jackson by
> default.
>
> That said the error means a cdi bean cant be created so you should be able
> to fix this root cause instead of the serialization consequence.
>
>
> Le 5 mai 2017 13:55, "COURTAULT Francois" <Francois.Courtault@gemalto.com>
> a écrit :
>
> Hello everyone,
>
> I have a POJO with several injections (@Inject) in it which runs fine when
> performing some tests using Swagger UI.
>
> Yesterday, in this POJO, I have added a new @Inject and if I test this one
> with Swagger UI, I got 500 with this payload:
> { "code": 500, "messages": [ "javax.enterprise.inject.CreationException",
> "java.lang.StackOverflowError", " - Caused by: null" ] }
>
> The issue I have is that, in TomEE log files, I don't see any stacktrace
> :( Is there any settings to help me to find out what is the real issue ?
>
> BTW, have you any idea what could cause this issue ? (I was thinking of
> circular dependency but according my source code analysis this is not the
> case)
>
> Best Regards.
> ________________________________
> This message and any attachments are intended solely for the addressees
> and may contain confidential information. Any unauthorized use or
> disclosure, either whole or partial, is prohibited.
> E-mails are susceptible to alteration. Our company shall not be liable for
> the message if altered, changed or falsified. If you are not the intended
> recipient of this message, please delete it and notify the sender.
> Although all reasonable efforts have been made to keep this transmission
> free from viruses, the sender will not be liable for damages caused by a
> transmitted virus.
> ________________________________
>  This message and any attachments are intended solely for the addressees
> and may contain confidential information. Any unauthorized use or
> disclosure, either whole or partial, is prohibited.
> E-mails are susceptible to alteration. Our company shall not be liable for
> the message if altered, changed or falsified. If you are not the intended
> recipient of this message, please delete it and notify the sender.
> Although all reasonable efforts have been made to keep this transmission
> free from viruses, the sender will not be liable for damages caused by a
> transmitted virus.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message