Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7981701
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T10:27:17+00:00 2026-06-04T10:27:17+00:00

I have been debugging for many, many hours but I can’t understand why the

  • 0

I have been debugging for many, many hours but I can’t understand why the code is not working.
Two service classes, annotated in the same way, show a different interceptor behaviour.

Stack trace #1:

Daemon Thread [http-thread-pool-8080(1)] (Suspended (breakpoint at line 120 in UserService))    
    UserService.saveUserOnLogin(UserBE) line: 120   
    NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]  
    NativeMethodAccessorImpl.invoke(Object, Object[]) line: 57  
    DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43  
    Method.invoke(Object, Object...) line: 601  
    EJBSecurityManager.runMethod(Method, Object, Object[]) line: 1052   
    EJBSecurityManager.invoke(Method, boolean, Object, Object[]) line: 1124 
    StatelessSessionContainer(BaseContainer).invokeBeanMethod(EjbInvocation) line: 5388 
    EjbInvocation.invokeBeanMethod() line: 619  
    AroundInvokeChainImpl.invokeNext(int, InterceptorManager$AroundInvokeContext) line: 800 
    EjbInvocation.proceed() line: 571   
    _GuiceInterceptor_Serializable(GuiceInterceptor).injectByGuice(InvocationContext) line: 24  
    NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]  
    NativeMethodAccessorImpl.invoke(Object, Object[]) line: 57  
    DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43  
    Method.invoke(Object, Object...) line: 601  
    AroundInvokeInterceptor.intercept(InterceptorManager$AroundInvokeContext) line: 861 
    AroundInvokeChainImpl.invokeNext(int, InterceptorManager$AroundInvokeContext) line: 800 
    EjbInvocation.proceed() line: 571   
    _SystemInterceptorProxy_Serializable(SystemInterceptorProxy).doAround(InvocationContext, Method) line: 162  
    _SystemInterceptorProxy_Serializable(SystemInterceptorProxy).aroundInvoke(InvocationContext) line: 144  
    NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]  
    NativeMethodAccessorImpl.invoke(Object, Object[]) line: 57  
    DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43  
    Method.invoke(Object, Object...) line: 601  
    AroundInvokeInterceptor.intercept(InterceptorManager$AroundInvokeContext) line: 861 
    AroundInvokeChainImpl.invokeNext(int, InterceptorManager$AroundInvokeContext) line: 800 
    InterceptorManager.intercept(InterceptorManager$InterceptorChain, InterceptorManager$AroundInvokeContext) line: 370 
    StatelessSessionContainer(BaseContainer).__intercept(EjbInvocation) line: 5360  
    StatelessSessionContainer(BaseContainer).intercept(EjbInvocation) line: 5348    
    EJBLocalObjectInvocationHandler.invoke(Class, Method, Object[]) line: 214   
    EJBLocalObjectInvocationHandlerDelegate.invoke(Object, Method, Object[]) line: 88   
    $Proxy209.saveUserOnLogin(UserBE) line: not available   
    __EJB31_Generated__UserService__Intf____Bean__.saveUserOnLogin(UserBE) line: not available  
    LoginUserHandler.saveUser(UserDTO) line: 165    
    LoginUserHandler.loginUser(UserDTO) line: 123   
    LoginUserHandler.loginWithOAuth(String, String, String, String) line: 158   
    LoginUserHandler.execute(LoginUser, ExecutionContext) line: 103 
    LoginUserHandler.execute(Action, ExecutionContext) line: 1  
    GuiceDispatch(AbstractDispatch).doExecute(A, ExecutionContext) line: 81 
    GuiceDispatch(AbstractDispatch).execute(A) line: 68 
    HupaDispatchServlet(AbstractSecureDispatchServlet).execute(String, Action<?>) line: 29  
    HupaDispatchServlet.execute(String, Action<?>) line: 56 
    NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]  
    NativeMethodAccessorImpl.invoke(Object, Object[]) line: 57  
    DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43  
    Method.invoke(Object, Object...) line: 601  
    RPC.invokeAndEncodeResponse(Object, Method, Object[], SerializationPolicy, int) line: 569   
    HupaDispatchServlet(RemoteServiceServlet).processCall(String) line: 208 
    HupaDispatchServlet(RemoteServiceServlet).processPost(HttpServletRequest, HttpServletResponse) line: 248    
    HupaDispatchServlet(AbstractRemoteServiceServlet).doPost(HttpServletRequest, HttpServletResponse) line: 62  
    HupaDispatchServlet(HttpServlet).service(HttpServletRequest, HttpServletResponse) line: 688 
    HupaDispatchServlet(HttpServlet).service(ServletRequest, ServletResponse) line: 770 
    ServletDefinition.doService(ServletRequest, ServletResponse) line: 263  
    ServletDefinition.service(ServletRequest, ServletResponse) line: 178    
    ManagedServletPipeline.service(ServletRequest, ServletResponse) line: 91    
    FilterChainInvocation.doFilter(ServletRequest, ServletResponse) line: 62    
    ManagedFilterPipeline.dispatch(ServletRequest, ServletResponse, FilterChain) line: 118  
    GuiceFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line: 113    
    ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 256  
    ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 217  
    StandardWrapperValve.invoke(Request, Response) line: 279    
    StandardContextValve.invoke(Request, Response) line: 175    
    StandardPipeline.doInvoke(Request, Response, boolean) line: 655 
    StandardPipeline.invoke(Request, Response) line: 595    
    StandardHostValve.invoke(Request, Response) line: 161   
    CoyoteAdapter.doService(Request, Request, Response, Response) line: 331 
    CoyoteAdapter.service(Request, Response) line: 231  
    ContainerMapper$AdapterCallable.call() line: 317    
    ContainerMapper.service(Request, Response) line: 195    
    ProcessorTask.invokeAdapter() line: 849 
    ProcessorTask.doProcess() line: 746 
    ProcessorTask.process(InputStream, OutputStream) line: 1045 
    DefaultProtocolFilter.execute(Context) line: 228    
    HttpProtocolChain(DefaultProtocolChain).executeProtocolFilter(Context, int) line: 137   
    HttpProtocolChain(DefaultProtocolChain).execute(Context, int) line: 104 
    HttpProtocolChain(DefaultProtocolChain).execute(Context) line: 90   
    HttpProtocolChain.execute(Context) line: 79 
    ProtocolChainContextTask.doCall() line: 54  
    ProtocolChainContextTask(SelectionKeyContextTask).call() line: 59   
    ProtocolChainContextTask(ContextTask).run() line: 71    
    FixedThreadPool$BasicWorker(AbstractThreadPool$Worker).doWork() line: 532   
    FixedThreadPool$BasicWorker(AbstractThreadPool$Worker).run() line: 513  
    HttpWorkerThread(Thread).run() line: 722    

Stack trace #2

Daemon Thread [http-thread-pool-8080(2)] (Suspended (entry into method synchronizeHeaders in MessageService))   
__EJB31_Generated__MessageService__Intf____Bean__(MessageService).synchronizeHeaders(String) line: 93   
FetchMessagesHandler.executeInternal(FetchMessages, ExecutionContext) line: 80  
FetchMessagesHandler.executeInternal(Action, ExecutionContext) line: 1  
FetchMessagesHandler(AbstractSessionHandler<A,R>).executeWithRetries(A, ExecutionContext, int) line: 127    
FetchMessagesHandler(AbstractSessionHandler<A,R>).execute(A, ExecutionContext) line: 97 
GuiceDispatch(AbstractDispatch).doExecute(A, ExecutionContext) line: 81 
GuiceDispatch(AbstractDispatch).execute(A) line: 68 
HupaDispatchServlet(AbstractSecureDispatchServlet).execute(String, Action<?>) line: 29  
HupaDispatchServlet.execute(String, Action<?>) line: 56 
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]  
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 57  
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43  
Method.invoke(Object, Object...) line: 601  
RPC.invokeAndEncodeResponse(Object, Method, Object[], SerializationPolicy, int) line: 569   
HupaDispatchServlet(RemoteServiceServlet).processCall(String) line: 208 
HupaDispatchServlet(RemoteServiceServlet).processPost(HttpServletRequest, HttpServletResponse) line: 248    
HupaDispatchServlet(AbstractRemoteServiceServlet).doPost(HttpServletRequest, HttpServletResponse) line: 62  
HupaDispatchServlet(HttpServlet).service(HttpServletRequest, HttpServletResponse) line: 688 
HupaDispatchServlet(HttpServlet).service(ServletRequest, ServletResponse) line: 770 
ServletDefinition.doService(ServletRequest, ServletResponse) line: 263  
ServletDefinition.service(ServletRequest, ServletResponse) line: 178    
ManagedServletPipeline.service(ServletRequest, ServletResponse) line: 91    
FilterChainInvocation.doFilter(ServletRequest, ServletResponse) line: 62    
ManagedFilterPipeline.dispatch(ServletRequest, ServletResponse, FilterChain) line: 118  
GuiceFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line: 113    
ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 256  
ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 217  
StandardWrapperValve.invoke(Request, Response) line: 279    
StandardContextValve.invoke(Request, Response) line: 175    
StandardPipeline.doInvoke(Request, Response, boolean) line: 655 
StandardPipeline.invoke(Request, Response) line: 595    
StandardHostValve.invoke(Request, Response) line: 161   
CoyoteAdapter.doService(Request, Request, Response, Response) line: 331 
CoyoteAdapter.service(Request, Response) line: 231  
ContainerMapper$AdapterCallable.call() line: 317    
ContainerMapper.service(Request, Response) line: 195    
ProcessorTask.invokeAdapter() line: 849 
ProcessorTask.doProcess() line: 746 
ProcessorTask.process(InputStream, OutputStream) line: 1045 
DefaultProtocolFilter.execute(Context) line: 228    
HttpProtocolChain(DefaultProtocolChain).executeProtocolFilter(Context, int) line: 137   
HttpProtocolChain(DefaultProtocolChain).execute(Context, int) line: 104 
HttpProtocolChain(DefaultProtocolChain).execute(Context) line: 90   
HttpProtocolChain.execute(Context) line: 79 
ProtocolChainContextTask.doCall() line: 54  
ProtocolChainContextTask(SelectionKeyContextTask).call() line: 59   
ProtocolChainContextTask(ContextTask).run() line: 71    
FixedThreadPool$BasicWorker(AbstractThreadPool$Worker).doWork() line: 532   
FixedThreadPool$BasicWorker(AbstractThreadPool$Worker).run() line: 513  
HttpWorkerThread(Thread).run() line: 722    

It seems as if the interceptor is not invoked for the message service class. However, it does work for the user service class. Why could this be?

The message service class:

@Stateless
@Interceptors(GuiceInterceptor.class)
public class MessageService {

    /**
     * The gmail folder default.
     */
    private static final String GMAIL_ALL_MAIL = "[Gmail]/All Mail";

    /**
     * The IMAP store cache.
     */
    @Inject
    private IMAPStoreCache imapStoreCache;

    /**
     * The EJB resolver.
     */
    @Inject
    private EJBResolver ejbResolver;

The user service class:

@Stateless
@Interceptors(GuiceInterceptor.class)
public class UserService {

    /**
     * The entity manager.
     */
    @PersistenceContext(unitName = "hupa")
    private EntityManager em;

    /**
     * The session provider.
     */
    @Inject
    private Provider<HttpSession> sessionProvider;

And finally the interceptor:

public class GuiceInterceptor {

    @EJB
    private GuiceInjectorHolder injectorHolder;

    @AroundInvoke
    @AroundTimeout
    public Object injectByGuice(InvocationContext invocationContext) throws Exception {
        Injector injector = injectorHolder.getInjector();
        injector.injectMembers(invocationContext.getTarget());
        return invocationContext.proceed();
    }
}

Hope there are experts on this, I am frustrated 😉

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T10:27:19+00:00Added an answer on June 4, 2026 at 10:27 am

    The problem was that I could not use the final modifier anywhere in the class or it would not work with Guice. Not even on auxiliary helper methods.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Have been working on this question for a couple hours and have come close
I have been working on this issue for a few days now and can't
I have been debugging this program to find the error but couldn't succeed in
I have been debugging this the entire day. I have two models in my
After many hours of debugging and analysis, I have finally managed to isolate the
I have been debugging on an HTC Desire for which I had the ADB
I have been trying to set up debugging using XDebug in Eclipse for the
I've been debugging the following issue for quite awhile now and have hit a
Have been hearing all around ArrayList getting obsolete these days. But I do have
Have been looking on some tutorials for drawing canvas using SurfaceView, but the only

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.