3 Replies Latest reply on Apr 25, 2009 2:41 AM by Ales Justin

    Aspectwerkz Class Load time weaving fails on JBoss AS 5.0.0.

    Srikarthik Venkataraman Newbie

      Hi,
      I am trying to deploy Aspectwerkz 2.0 based aspects targetting JEE application running on jboss-5.0.0.GA.

      I have deployed aspect jar file in the system classpath (JBOSS_HOME/server/default/lib)

      In this environment the class load time weaving is not happening and throws the following error:

      2009-04-25 11:39:23,481 DEBUG [org.jboss.classloading.spi.vfs.policy.VFSClassLoaderPolicy] (http-127.0.0.1-8080-1) Error getting resources for MemoryContextHandler@17674604[path= context=vfsmemory://a3z51w-zbluss-ftxwssm0-1-ftxwtzaq-1z real=vfsmemory://a3z51w-zbluss-ftxwssm0-1-ftxwtzaq-1z]
      java.io.IOException: Using reverse path on top file handler: MemoryContextHandler@17674604[path= context=vfsmemory://a3z51w-zbluss-ftxwssm0-1-ftxwtzaq-1z real=vfsmemory://a3z51w-zbluss-ftxwssm0-1-ftxwtzaq-1z], ../aop.xml
      at org.jboss.virtual.plugins.context.AbstractVirtualFileHandler.structuredFindChild(AbstractVirtualFileHandler.java:528)
      at org.jboss.virtual.plugins.context.memory.MemoryContextHandler.getChild(MemoryContextHandler.java:105)
      at org.jboss.virtual.VirtualFile.getChild(VirtualFile.java:451)
      at org.jboss.classloading.spi.vfs.policy.VFSClassLoaderPolicy.getResources(VFSClassLoaderPolicy.java:524)
      at org.jboss.classloader.spi.base.BaseClassLoader$4.run(BaseClassLoader.java:628)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.jboss.classloader.spi.base.BaseClassLoader.getResourcesLocally(BaseClassLoader.java:624)
      at org.jboss.classloader.spi.base.BaseClassLoader.getResourcesLocally(BaseClassLoader.java:605)
      at org.jboss.classloader.spi.base.BaseClassLoaderDomain.getResources(BaseClassLoaderDomain.java:487)
      at org.jboss.classloader.spi.base.BaseClassLoaderDomain.getResources(BaseClassLoaderDomain.java:1134)
      at org.jboss.classloader.spi.base.BaseClassLoader.loadResources(BaseClassLoader.java:432)
      at org.jboss.classloader.spi.base.BaseClassLoader.findResources(BaseClassLoader.java:418)
      at java.lang.ClassLoader.getResources(ClassLoader.java:1015)
      at org.jboss.classloader.plugins.loader.ClassLoaderToLoaderAdapter.getResources(ClassLoaderToLoaderAdapter.java:163)
      at org.jboss.classloader.spi.ClassLoaderDomain.getResourcesFromParent(ClassLoaderDomain.java:540)
      at org.jboss.classloader.spi.ClassLoaderDomain.afterGetResources(ClassLoaderDomain.java:512)
      at org.jboss.classloader.spi.base.BaseClassLoaderDomain.getResources(BaseClassLoaderDomain.java:491)
      at org.jboss.classloader.spi.base.BaseClassLoaderDomain.getResources(BaseClassLoaderDomain.java:1134)
      at org.jboss.classloader.spi.base.BaseClassLoader.loadResources(BaseClassLoader.java:432)
      at org.jboss.classloader.spi.base.BaseClassLoader.findResources(BaseClassLoader.java:418)
      at java.lang.ClassLoader.getResources(ClassLoader.java:1015)
      at org.codehaus.aspectwerkz.definition.SystemDefinitionContainer.registerClassLoader(SystemDefinitionContainer.java:122)
      at org.codehaus.aspectwerkz.definition.SystemDefinitionContainer.registerClassLoader(SystemDefinitionContainer.java:104)
      at org.codehaus.aspectwerkz.definition.SystemDefinitionContainer.getHierarchicalDefinitionsFor(SystemDefinitionContainer.java:317)
      at org.codehaus.aspectwerkz.definition.SystemDefinitionContainer.getDefinitionsFor(SystemDefinitionContainer.java:225)
      at org.codehaus.aspectwerkz.transform.inlining.ContextImpl.(ContextImpl.java:99)
      at org.codehaus.aspectwerkz.transform.inlining.InliningWeavingStrategy.newContext(InliningWeavingStrategy.java:259)
      at org.codehaus.aspectwerkz.transform.AspectWerkzPreProcessor._preProcess(AspectWerkzPreProcessor.java:166)
      at org.codehaus.aspectwerkz.transform.AspectWerkzPreProcessor.preProcess(AspectWerkzPreProcessor.java:148)
      at org.codehaus.aspectwerkz.hook.PreProcessorAdapter.transform(PreProcessorAdapter.java:50)
      at sun.instrument.TransformerManager.transform(TransformerManager.java:169)
      at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:365)
      at java.lang.reflect.Proxy.defineClass0(Native Method)
      at java.lang.reflect.Proxy.getProxyClass(Proxy.java:504)
      at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:581)
      at org.jboss.ejb3.proxy.objectfactory.ProxyObjectFactory.redefineProxyInTcl(ProxyObjectFactory.java:349)
      at org.jboss.ejb3.proxy.objectfactory.session.SessionProxyObjectFactory.createProxy(SessionProxyObjectFactory.java:134)
      at org.jboss.ejb3.proxy.objectfactory.session.stateless.StatelessSessionProxyObjectFactory.getProxy(StatelessSessionProxyObjectFactory.java:79)
      at org.jboss.ejb3.proxy.objectfactory.ProxyObjectFactory.getObjectInstance(ProxyObjectFactory.java:156)
      at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
      at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1438)
      at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1455)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:809)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:673)
      at javax.naming.InitialContext.lookup(InitialContext.java:392)
      at com.wipro.testweb.servlets.HelloWorldServlet.doGet(HelloWorldServlet.java:63)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at com.wipro.testweb.filters.MyFilter.doFilter(MyFilter.java:42)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
      at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
      at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      at java.lang.Thread.run(Thread.java:619)
      2009-04-25 11:39:23,544 INFO [STDOUT] (http-127.0.0.1-8080-1) ******************************************************************
      * ClassLoader = BaseClassLoader@54a40c{vfszip:/D:/jboss-5.0.0.GA/server/default/deploy/PoCAMS.ear/PoCAMSWeb.war}@5547020
      * SystemID = system, 2 aspects.
      * SystemID = virtual_5547020, 1 aspects.
      * vfszip:/D:/jboss-5.0.0.GA/server/default/lib/MyAspects.jar/META-INF/aop.xml
      ******************************************************************
      2009-04-25 11:39:23,559 DEBUG [org.jboss.classloading.spi.vfs.policy.VFSClassLoaderPolicy] (http-127.0.0.1-8080-1) Error getting resources for MemoryContextHandler@17674604[path= context=vfsmemory://a3z51w-zbluss-ftxwssm0-1-ftxwtzaq-1z real=vfsmemory://a3z51w-zbluss-ftxwssm0-1-ftxwtzaq-1z]
      java.io.IOException: Using reverse path on top file handler: MemoryContextHandler@17674604[path= context=vfsmemory://a3z51w-zbluss-ftxwssm0-1-ftxwtzaq-1z real=vfsmemory://a3z51w-zbluss-ftxwssm0-1-ftxwtzaq-1z], ../aop.xml
      at org.jboss.virtual.plugins.context.AbstractVirtualFileHandler.structuredFindChild(AbstractVirtualFileHandler.java:528)
      at org.jboss.virtual.plugins.context.memory.MemoryContextHandler.getChild(MemoryContextHandler.java:105)
      at org.jboss.virtual.VirtualFile.getChild(VirtualFile.java:451)
      at org.jboss.classloading.spi.vfs.policy.VFSClassLoaderPolicy.getResources(VFSClassLoaderPolicy.java:524)
      at org.jboss.classloader.spi.base.BaseClassLoader$4.run(BaseClassLoader.java:628)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.jboss.classloader.spi.base.BaseClassLoader.getResourcesLocally(BaseClassLoader.java:624)
      at org.jboss.classloader.spi.base.BaseClassLoader.getResourcesLocally(BaseClassLoader.java:605)
      at org.jboss.classloader.spi.base.BaseClassLoaderDomain.getResources(BaseClassLoaderDomain.java:487)
      at org.jboss.classloader.spi.base.BaseClassLoaderDomain.getResources(BaseClassLoaderDomain.java:1134)
      at org.jboss.classloader.spi.base.BaseClassLoader.loadResources(BaseClassLoader.java:432)
      at org.jboss.classloader.spi.base.BaseClassLoader.findResources(BaseClassLoader.java:418)
      at java.lang.ClassLoader.getResources(ClassLoader.java:1015)
      at org.jboss.classloader.plugins.loader.ClassLoaderToLoaderAdapter.getResources(ClassLoaderToLoaderAdapter.java:163)
      at org.jboss.classloader.spi.ClassLoaderDomain.getResourcesFromParent(ClassLoaderDomain.java:540)
      at org.jboss.classloader.spi.ClassLoaderDomain.afterGetResources(ClassLoaderDomain.java:512)
      at org.jboss.classloader.spi.base.BaseClassLoaderDomain.getResources(BaseClassLoaderDomain.java:491)
      at org.jboss.classloader.spi.base.BaseClassLoaderDomain.getResources(BaseClassLoaderDomain.java:1134)
      at org.jboss.classloader.spi.base.BaseClassLoader.loadResources(BaseClassLoader.java:432)
      at org.jboss.classloader.spi.base.BaseClassLoader.findResources(BaseClassLoader.java:418)
      at java.lang.ClassLoader.getResources(ClassLoader.java:1015)
      at java.lang.ClassLoader.getResources(ClassLoader.java:1011)
      at org.codehaus.aspectwerkz.definition.SystemDefinitionContainer.registerClassLoader(SystemDefinitionContainer.java:122)
      at org.codehaus.aspectwerkz.definition.SystemDefinitionContainer.getHierarchicalDefinitionsFor(SystemDefinitionContainer.java:317)
      at org.codehaus.aspectwerkz.definition.SystemDefinitionContainer.getDefinitionsFor(SystemDefinitionContainer.java:225)
      at org.codehaus.aspectwerkz.transform.inlining.ContextImpl.(ContextImpl.java:99)
      at org.codehaus.aspectwerkz.transform.inlining.InliningWeavingStrategy.newContext(InliningWeavingStrategy.java:259)
      at org.codehaus.aspectwerkz.transform.AspectWerkzPreProcessor._preProcess(AspectWerkzPreProcessor.java:166)
      at org.codehaus.aspectwerkz.transform.AspectWerkzPreProcessor.preProcess(AspectWerkzPreProcessor.java:148)
      at org.codehaus.aspectwerkz.hook.PreProcessorAdapter.transform(PreProcessorAdapter.java:50)
      at sun.instrument.TransformerManager.transform(TransformerManager.java:169)
      at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:365)
      at java.lang.reflect.Proxy.defineClass0(Native Method)
      at java.lang.reflect.Proxy.getProxyClass(Proxy.java:504)
      at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:581)
      at org.jboss.ejb3.proxy.objectfactory.ProxyObjectFactory.redefineProxyInTcl(ProxyObjectFactory.java:349)
      at org.jboss.ejb3.proxy.objectfactory.session.SessionProxyObjectFactory.createProxy(SessionProxyObjectFactory.java:134)
      at org.jboss.ejb3.proxy.objectfactory.session.stateless.StatelessSessionProxyObjectFactory.getProxy(StatelessSessionProxyObjectFactory.java:79)
      at org.jboss.ejb3.proxy.objectfactory.ProxyObjectFactory.getObjectInstance(ProxyObjectFactory.java:156)
      at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
      at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1438)
      at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1455)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:809)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:673)
      at javax.naming.InitialContext.lookup(InitialContext.java:392)
      at com.wipro.testweb.servlets.HelloWorldServlet.doGet(HelloWorldServlet.java:63)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at com.wipro.testweb.filters.MyFilter.doFilter(MyFilter.java:42)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
      at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
      at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      at java.lang.Thread.run(Thread.java:619)


      Please note weaving happens successfully for this exact same setup using Aspectwerkz 2.0 on jboss-4.2.2.GA in java 1.5.0 environment.

      Please let me know if there are any changes or workaround required in jboss-5.0.0 environment for running Aspectwerkz 2.0 based aspects.

      Regards,
      Srikarthik