Announcement Announcement Module
Collapse
No announcement yet.
SpringBeanAutowiringInterceptor.autowireBean must not throw a checked exception Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • SpringBeanAutowiringInterceptor.autowireBean must not throw a checked exception

    The fix below apparently introduced a new bug:

    Package org.springframework.ejb
    * SpringBeanAutowiringInterceptor calls "InvocationContext.proceed()" in order to invoke subsequent interceptors as well

    ----
    The autowireBean-method in the SpringBeanAutowiringInterceptor apparently throws an Exception. That's not allowed by the spec. An it will not execute in Websphere 7 with Java6.


  • #2
    that's real bad!

    Comment


    • #3
      I'm getting the same error with Spring 2.5.6 + WebSphere 7. Is this fixed or do you know any workaround?

      Comment


      • #4
        same issue here...please fix

        while on websphere 7 subject, anyone using @EJB annotation to inject a session bean into a Spring managed POJO? For some reason the jndi name is not found when Spring is trying to inject it..

        Can someone post their working configuration?

        Comment


        • #5
          There's a Jira issue about this and it says it's closed and will be in spring 3, but no mention of a patch for 2.5

          As an interim fix you can create your own injector implementation, copy the source code from the 2.5 one and just swallow the exceptions (or better yet throw them as run time exceptions)

          Comment


          • #6
            yeah, already did that and i'm not getting any exceptions, but the interceptor does not get called at all (my beans don't get autowired)

            this might be a websphere 7 specific issue?

            ps: @AroundInvoke does work, but the other annotations don't!!

            Anyone has a good solution for autowiring by using @AroundInvoke? Even though it's a big overhead compared to @PostConstruct

            Comment


            • #7
              Originally posted by a3ris View Post
              yeah, already did that and i'm not getting any exceptions, but the interceptor does not get called at all (my beans don't get autowired)
              What specifically is going wrong? Have you tried logging/debugging from within your autowireBean method?

              I had trouble when extending the spring implementation. Creating a completely separate class and copy and pasting the spring source code into it, then modifying worked a lot better.


              The other issue I had was working out how to use @Autowire and @Qualifier("beanName") but that's simple once you know the annotation names.

              Comment

              Working...
              X