[jboss-user] [JBoss AOP] - Re: Method Advised class on getInterceptorChainReadWriteLock
Mike03
do-not-reply at jboss.com
Thu Feb 26 14:26:58 EST 2009
"stale.pedersen at jboss.org" wrote : hi, just to be sure that the new instrumentor might be to blame could you try to use the classic instrumentor and let us know if that works?
| you can set the instrumentor with this property -Djboss.aop.instrumentor=org.jboss.aop.instrument.ClassicInstrumentor
Hi, I'm working with Pete on this. I've got our app compile-time weaved using the Classic intrumentor but the ClassLoader can't find our aspects. We're using the same package structure that we use with GeneratedAdvisor instrumentation which doesn't have any problem finding classes.
The ear is packaged as:
was.ear
was.ear/META-INF/application.xml
was.ear/lib -> 3rd party jars
was.ear/was.aop
was.ear/was.aop/META-INF/jboss-aop.xml -> our aspect/joinpoint def file
was.ear/was.aop/com/** -> our classes including aspects
was.ear/was-web.war -> JSPs, web resources, etc
Here's our application.xml:
| <?xml version="1.0" encoding="UTF-8"?>
| <!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">
| <application>
| <display-name>WAS :: Marble</display-name>
| <module>
| <java>was.aop</java>
| </module>
| <module id="marble-web.iml">
| <web>
| <web-uri>was-web.war</web-uri>
| <context-root>server</context-root>
| </web>
| </module>
| </application>
|
>From server.log on startup:
| 2009-02-26 10:54:10,884 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice com.company.common.cache.aspect.CacheAspect with loader org.jboss.system.NoAnnotationURLClassLoader at 663e89c3
| 2009-02-26 10:54:10,886 WARN [com.company.policy.impl.BootstrapPhase] (main) Error initializing component: unknown component
| java.lang.RuntimeException: java.lang.ClassNotFoundException: com.company.common.cache.aspect.CacheAspect
| at org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory.doCreate(GenericBeanAspectFactory.java:151)
| at org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory.createPerInstance(GenericBeanAspectFactory.java:105)
| at org.jboss.aop.InstanceAdvisorDelegate.initializeAspects(InstanceAdvisorDelegate.java:109)
| at org.jboss.aop.InstanceAdvisorDelegate.initialize(InstanceAdvisorDelegate.java:71)
| at org.jboss.aop.ClassInstanceAdvisor.setAdvisorAndInitialise(ClassInstanceAdvisor.java:88)
| at org.jboss.aop.ClassInstanceAdvisor.<init>(ClassInstanceAdvisor.java:72)
| at com.company.common.item.dbcache.DbCacheItem._getInstanceAdvisor(DbCacheItem.java)
| at com.company.common.item.dbcache.DbCacheItem.dbCacheKey_w_$aop(DbCacheItem.java)
| at com.company.common.item.dbcache.DbCacheItem.setDbCacheKey(DbCacheItem.java:29)
| at com.company.common.item.dbcache.DBCacheService.getItem(DBCacheService.java:161)
| at com.company.system.executive.alias.impl.AliasExecutive.createAlias(AliasExecutive.java:280)
| at com.company.system.executive.alias.impl.AliasExecutive.createAlias(AliasExecutive.java:155)
| at com.company.policy.command.system.xml.XMLImportAcl.importNode(XMLImportAcl.java:73)
| at com.company.policy.command.system.xml.XMLImport.xmlImportList(XMLImport.java:182)
| at com.company.policy.command.system.xml.XMLImport.xmlImport(XMLImport.java:152)
| at com.company.policy.biz.system.impl.SystemPolicy.xmlImport(SystemPolicy.java:44)
| at com.company.policy.impl.Bootstrap.init(Bootstrap.java:56)
| at com.company.framework.init.impl.DefaultPhase.createComponentData(DefaultPhase.java:87)
| at com.company.policy.impl.BootstrapPhase.createComponentData(BootstrapPhase.java:99)
| at com.company.framework.impl.BaseProvider.initComponents(BaseProvider.java:450)
| at com.company.framework.impl.BaseProvider.init(BaseProvider.java:99)
| at com.company.framework.init.impl.DefaultPhase.init(DefaultPhase.java:46)
| at com.company.policy.impl.BootstrapPhase.init(BootstrapPhase.java:51)
| at com.company.framework.init.impl.DefaultPhaseProvider.initComponent(DefaultPhaseProvider.java:157)
| at com.company.framework.impl.BaseProvider.initComponents(BaseProvider.java:458)
| at com.company.framework.impl.BaseProvider.init(BaseProvider.java:99)
| at com.company.framework.init.impl.DefaultPhaseProvider.initializePhases(DefaultPhaseProvider.java:80)
| at com.company.framework.CoreSystem.init(CoreSystem.java:686)
| at com.company.framework.CoreSystem.main(CoreSystem.java:645)
| at com.company.framework.impl.CoreServlet.init(CoreServlet.java:83)
| at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1048)
| at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:950)
| at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4122)
| at org.apache.catalina.core.StandardContext.start(StandardContext.java:4421)
| at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:312)
| at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:144)
| at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
| at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
| at org.jboss.web.deployers.WebModule.start(WebModule.java:97)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
| at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
| at $Proxy36.start(Unknown Source)
| at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
| at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
| at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
| at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
| at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
| at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
| at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
| at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
| at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
| at org.jboss.system.ServiceController.start(ServiceController.java:460)
| at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)
| at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)
| at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
| at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
| at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
| at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
| at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
| at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
| at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:698)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
| at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
| at org.jboss.Main.boot(Main.java:209)
| at org.jboss.Main$1.run(Main.java:547)
| at java.lang.Thread.run(Thread.java:619)
| Caused by: java.lang.ClassNotFoundException: com.company.common.cache.aspect.CacheAspect
| at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
| at java.security.AccessController.doPrivileged(Native Method)
| at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
| at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
| at java.lang.Class.forName0(Native Method)
| at java.lang.Class.forName(Class.java:247)
| at org.jboss.reflect.plugins.introspection.IntrospectionTypeInfoFactoryImpl.resolveComplexTypeInfo(IntrospectionTypeInfoFactoryImpl.java:419)
| at org.jboss.reflect.plugins.introspection.IntrospectionTypeInfoFactoryImpl.getTypeInfo(IntrospectionTypeInfoFactoryImpl.java:388)
| at org.jboss.reflect.plugins.introspection.IntrospectionTypeInfoFactory.getTypeInfo(IntrospectionTypeInfoFactory.java:54)
| at org.jboss.classadapter.plugins.BasicClassAdapterFactory.getClassAdapter(BasicClassAdapterFactory.java:61)
| at org.jboss.config.plugins.AbstractConfiguration.getBeanInfo(AbstractConfiguration.java:86)
| at org.jboss.kernel.plugins.config.AbstractKernelConfig.getBeanInfo(AbstractKernelConfig.java:80)
| at org.jboss.kernel.plugins.config.AbstractKernelConfigurator.getBeanInfo(AbstractKernelConfigurator.java:77)
| at org.jboss.beans.metadata.plugins.factory.GenericBeanFactory.createBean(GenericBeanFactory.java:209)
| at org.jboss.aop.microcontainer.beans.ClassLoaderAwareGenericBeanFactory.createBean(ClassLoaderAwareGenericBeanFactory.java:70)
| at org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory.doCreate(GenericBeanAspectFactory.java:140)
| ... 90 more
|
Thanks for the help!
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4213502#4213502
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4213502
More information about the jboss-user
mailing list