Announcement Announcement Module
Collapse
No announcement yet.
Websphere v7 aspectj related errror Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Websphere v7 aspectj related errror

    Hi all:

    I have a spring application which was recently changed to use maven. This application is deployed to Websphere application server v7. Currently, the original version of this application is on our production environment and running fine.

    After converting this application to maven and deploying to the development environment I now see the following error after logging in. Initially, I tried to upgrade the aspectjrt jar,but after this error attempted to move back down to the version we currently have in production (aspectjrt-1.6.8). Unfortunately, this did not work either and I am still experiencing the below issue.

    I have read others who faced this issue created a shared folder for the application. I don't think this apply's in this case because the app currently operates fine in our other environments.

    We typically run the application in tomcat locally (I am working on getting WAS 7 for developers installed); that's how it was done when I started on this project. In Tomcat this works without a glitch!

    Any ideas and/or suggestions is appreciated.

    Code:
    3/4/13 13:11:43:283 CST] 0000002a FfdcProvider  W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on /opt/IBM/WebSphere/AppSrv/logs/ffdc/adoptions01_3efa3efa_13.03.04_13.11.43.2754578307035656130066.txt com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter 82
    [3/4/13 13:11:43:286 CST] 0000002a FfdcProvider  W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on /opt/IBM/WebSphere/AppSrv/logs/ffdc/adoptions01_3efa3efa_13.03.04_13.11.43.2838159004914020038931.txt com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter 144
    [3/4/13 13:11:43:286 CST] 0000002a webapp        E com.ibm.ws.webcontainer.webapp.WebApp logError SRVE0293E: [Servlet Error]-[org/aspectj/runtime/internal/AroundClosure.linkClosureAndJoinPoint(I)Lorg/aspectj/lang/ProceedingJoinPoint;]: java.lang.NoSuchMethodError: org/aspectj/runtime/internal/AroundClosure.linkClosureAndJoinPoint(I)Lorg/aspectj/lang/ProceedingJoinPoint;
    	at com.follett.fheg.ecommerce.onlineadoptions.web.security.listener.AuthenticationSuccessfulEventListener.onApplicationEvent_aroundBody4(AuthenticationSuccessfulEventListener.java:46)
    	at com.follett.fheg.ecommerce.onlineadoptions.web.security.listener.AuthenticationSuccessfulEventListener.onApplicationEvent_aroundBody5$advice(AuthenticationSuccessfulEventListener.java:56)
    	at com.follett.fheg.ecommerce.onlineadoptions.web.security.listener.AuthenticationSuccessfulEventListener.onApplicationEvent(AuthenticationSuccessfulEventListener.java:1)
    	at com.follett.fheg.ecommerce.onlineadoptions.web.security.listener.AuthenticationSuccessfulEventListener.onApplicationEvent(AuthenticationSuccessfulEventListener.java:1)
    	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
    	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:303)
    	at org.springframework.security.authentication.DefaultAuthenticationEventPublisher.publishAuthenticationSuccess(DefaultAuthenticationEventPublisher.java:72)
    	at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:189)
    	at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:174)
    	at org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter.attemptAuthentication(UsernamePasswordAuthenticationFilter.java:94)
    	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:195)
    	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
    	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
    	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    	at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
    	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
    	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
    	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
    	at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
    	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
    	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:83)
    	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
    	at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
    	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
    	at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
    	at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908)
    	at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:997)
    	at com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.invokeFilters(DefaultExtensionProcessor.java:1062)
    	at com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:982)
    	at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3944)
    	at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276)
    	at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:931)
    	at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1592)
    	at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
    	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452)
    	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511)
    	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)
    	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:276)
    	at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
    	at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
    	at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
    	at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
    	at com.ibm.io.async.AsyncChannelFuture$1.run(AsyncChannelFuture.java:205)
    	at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1646)
    
    
    [3/4/13 13:12:17:350 CST] 00000029 TimerImpl     E   ASYN0012E: Alarm/Timer threw exception commonj.work.WorkCompletedException: java.lang.NoSuchMethodError: org/aspectj/runtime/internal/AroundClosure.linkClosureAndJoinPoint(I)Lorg/aspectj/lang/ProceedingJoinPoint;
    	at com.ibm.ws.asynchbeans.J2EEContext.run(J2EEContext.java:1156)
    	at com.ibm.ws.asynchbeans.timer.TimerImpl.runListenerAsCJWork(TimerImpl.java:425)
    	at com.ibm.ws.asynchbeans.am._Alarm.fireAlarm(_Alarm.java:333)
    	at com.ibm.ws.asynchbeans.am._Alarm.run(_Alarm.java:230)
    	at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1646)
    Caused by: java.lang.NoSuchMethodError: org/aspectj/runtime/internal/AroundClosure.linkClosureAndJoinPoint(I)Lorg/aspectj/lang/ProceedingJoinPoint;
    	at com.follett.fheg.ecommerce.onlineadoptions.integration.IntegrationProcessingLogCleanupTrigger.run_aroundBody4(IntegrationProcessingLogCleanupTrigger.java:41)
    	at com.follett.fheg.ecommerce.onlineadoptions.integration.IntegrationProcessingLogCleanupTrigger.run_aroundBody5$advice(IntegrationProcessingLogCleanupTrigger.java:56)
    	at com.follett.fheg.ecommerce.onlineadoptions.integration.IntegrationProcessingLogCleanupTrigger.run(IntegrationProcessingLogCleanupTrigger.java:1)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    	at java.lang.reflect.Method.invoke(Method.java:611)

  • #2
    Check your classpath, the REAL classpath. Use mvn dependency:tree to check which dependencies get pulled in and which are used, also beware of mixing of different jar versions. Check the classloading settings in WebSphere and make sure you aren't getting classloading/classcastexceptions due to duplicate jars being available in different classloaders.

    Comment


    • #3
      Originally posted by Marten Deinum View Post
      Check your classpath, the REAL classpath. Use mvn dependency:tree to check which dependencies get pulled in and which are used, also beware of mixing of different jar versions. Check the classloading settings in WebSphere and make sure you aren't getting classloading/classcastexceptions due to duplicate jars being available in different classloaders.

      I just checked the source code for aspectjrt 1.6.8 and 1.5.0 (1.5.0 is the version on our WAS 7 environments).
      It looks like 1.6.8 has two linkClosureAndJoinPoint methods whereas 1.5.0 only has one.

      One thing I do not understand is the last part of the exception with the (I)....
      Does the part after the (I) tell me that the linkClosureAndJoinPoint method expects a parameter?

      If so, the that seems to be the problem. The 1.6.8 version has a linkClosureAndJoinPoint that expects a parameter where the 1.5.0 method only has a linkClosureAndJoinPoint with no arguments.

      Code:
      java.lang.NoSuchMethodError: org/aspectj/runtime/internal/AroundClosure.linkClosureAndJoinPoint(I)Lorg/aspectj/lang/ProceedingJoinPoint;
      Thanks for your help!

      Comment


      • #4
        I think this indeed may be the issue. I wasn't sure because I didn't understand the second part of the exception, but this seems to answer my question.

        Comment


        • #5
          You are compiling with a newer version whereas WebSphere (?) has an older version and you probably have classloading set to parent-first instead of parent-last and/or aren't including your AspectJ jars in your applications war (which would require parent-last classloading).

          Comment


          • #6
            Originally posted by Marten Deinum View Post
            You are compiling with a newer version whereas WebSphere (?) has an older version and you probably have classloading set to parent-first instead of parent-last and/or aren't including your AspectJ jars in your applications war (which would require parent-last classloading).
            Actually, I received an email back from our admin's who said that the class loader is sent to "Classes loaded with local class loader first (parent last)" for this application. We are compiling with 1.6.8 as that is what we are using to build the .ear.

            It is my understanding from other people's issue similar to mine that just changing class loading doesn't work.
            As noted here and here. This doesn't make much sense to me though. Since this application currently works fine in our QA and PROD environments with these settings.

            Comment


            • #7
              I was able to get this resolved and wanted to post the solution that worked for us in case anyone else goes searching for it.

              As mentioned above Websphere application server v7 provides its own aspectjrt which sometimes conflicts with versions packaged in a deployed application. By updating the war package manifest with the classpath to the aspectjrt we were providing everything started working. We are packaging the aspectjrt in the ear lib directory and missed adding this classpath to the war manifest.


              Marten, thank you for all the help and guidance on this issue

              Comment

              Working...
              X