[jboss-user] [JBoss AOP] - Failure to aspectize class already on the classpath

kringdahl do-not-reply at jboss.com
Tue Sep 2 11:18:36 EDT 2008


I'm using the maven AOP plugin to launch aopc to precompile my aspects and I'm seeing a problem where aopc does not find one of my classes that is on the classpath.  I have gone so far as to add the class file itself to the classpath.  Here is the aopc command that is being run:

  | [INFO] [jbossaop:compile {execution: aopc}]                                                                                                                              [DEBUG] Executing aopc: /bin/sh -c "java -cp /home/kringdahl/.m2/repository/org/jboss/aop/jboss-aop/2.0.0.CR14/jboss-aop-2.0.0.CR14.jar:/home/kringdahl/.m2/repository/or
  | g/apache/ant/ant/1.7.0/ant-1.7.0.jar:/home/kringdahl/.m2/repository/org/apache/ant/ant-launcher/1.7.0/ant-launcher-1.7.0.jar:/home/kringdahl/.m2/repository/javassist/jav
  | assist/3.8.0.GA/javassist-3.8.0.GA.jar:/home/kringdahl/.m2/repository/org/jboss/jboss-reflect/2.0.0.Beta12/jboss-reflect-2.0.0.Beta12.jar:/home/kringdahl/.m2/repository/
  | org/jboss/jboss-common-core/2.2.7.GA/jboss-common-core-2.2.7.GA.jar:/home/kringdahl/.m2/repository/org/jboss/jboss-mdr/2.0.0.Beta15/jboss-mdr-2.0.0.Beta15.jar:/home/krin
  | gdahl/.m2/repository/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA.jar:/home/kringdahl/.m2/repository/qdox/qdox/1.6/qdox-1.6.jar:/home/kringdah
  | l/.m2/repository/trove/trove/2.1.1/trove-2.1.1.jar:/home/kringdahl/.m2/repository/org/codehaus/plexus/plexus-utils/1.4.9/plexus-utils-1.4.9.jar:/home/kringdahl/.m2/repository/org/apache/maven/plugins/maven-surefire-plugin/2.4/maven-surefire-plugin-2.4.jar:/home/kringdahl/.m2/repository/org/apache/maven/surefire/surefire-booter/2.4/suref
  | ire-booter-2.4.jar:/home/kringdahl/.m2/repository/org/apache/maven/surefire/surefire-api/2.4/surefire-api-2.4.jar:/home/kringdahl/.m2/repository/org/jboss/aop/jboss-aop/
  | 2.0.0.CR3/jboss-aop-2.0.0.CR3.jar:/home/kringdahl/dev/apache/apache-maven-2.0.8/lib/maven-2.0.8-uber.jar:/home/kringdahl/dev/apache/apache-maven-2.0.8/lib/maven-2.0.8-ub
  | er.jar:/home/kringdahl/.m2/repository/com/desktone/dt-active-directory-refresh-delegate/1.S4-SNAPSHOT/dt-active-directory-refresh-delegate-1.S4-SNAPSHOT.jar:/home/kringd
  | ahl/.m2/repository/com/desktone/dt-active-directory-access/1.S4-SNAPSHOT/dt-active-directory-access-1.S4-SNAPSHOT.jar:/home/kringdahl/.m2/repository/commons-math/commons
  | -math/1.2/commons-math-1.2.jar:/home/kringdahl/.m2/repository/com/desktone/dt-fabric-delegate/1.S4-SNAPSHOT/dt-fabric-delegate-1.S4-SNAPSHOT.jar:/home/kringdahl/.m2/repository/com/desktone/dt-logger/1.S4-SNAPSHOT/dt-logger-1.S4-SNAPSHOT.jar:/home/kringdahl/.m2/repository/com/desktone/dt-util/1.S4-SNAPSHOT/dt-util-1.S4-SNAPSHOT.jar:/home
  | /kringdahl/.m2/repository/com/desktone/dt-fabric-node/1.S4-SNAPSHOT/dt-fabric-node-1.S4-SNAPSHOT.jar:/home/kringdahl/.m2/repository/log4j/log4j/1.2.14/log4j-1.2.14.jar:/
  | home/kringdahl/.m2/repository/com/desktone/dt-data-model/1.S4-SNAPSHOT/dt-data-model-1.S4-SNAPSHOT.jar:/home/kringdahl/.m2/repository/com/desktone/dt-fabric-access/1.S4-
  | SNAPSHOT/dt-fabric-access-1.S4-SNAPSHOT.jar:/home/kringdahl/.m2/repository/com/desktone/dt-elementmgr-api/1.S4-SNAPSHOT/dt-elementmgr-api-1.S4-SNAPSHOT.jar:/home/kringda
  | hl/workspaces/logan_release/logan_release/dt-fabric/dt-fabric-delegate-impl/target/classes org.jboss.aop.standalone.Compiler -verbose -suppress -aoppath /home/kringdahl/
  | workspaces/logan_release/logan_release/dt-fabric/dt-fabric-delegate-impl/src/main/resources/META-INF/dt-fabric-delegate-impl-aop.xml /home/kringdahl/workspaces/logan_release/logan_release/dt-fabric/dt-fabric-delegate-impl/target/classes/com/desktone/server/accessFabric/FabricDelegateImpl.class"
  | 


Here is the output:

[ERROR] org.jboss.aop.instrument.TransformationException: Failed to aspectize class com.desktone.server.accessFabric.FabricDelegateImpl.  Could not find class it referen
  | ces com.desktone.server.accessFabric.elementService.ws.ElementServiceImplServiceLocator  It may not be in your classpath and you may not be getting field and constructor
  |  weaving for this class.
  | [ERROR]         at org.jboss.aop.instrument.Instrumentor.convertReferences(Instrumentor.java:703)
  | [ERROR]         at org.jboss.aop.instrument.Instrumentor.transform(Instrumentor.java:756)                                                                                [ERROR]         at org.jboss.aop.instrument.GeneratedAdvisorInstrumentor.transform(GeneratedAdvisorInstrumentor.java:117)
  | [ERROR]         at org.jboss.aop.ClassicWeavingStrategy.translate(ClassicWeavingStrategy.java:111)
  | [ERROR]         at org.jboss.aop.AspectManager.translate(AspectManager.java:1013)
  | [ERROR]         at org.jboss.aop.AspectManager.transform(AspectManager.java:959)
  | [ERROR]         at org.jboss.aop.standalone.Compiler.compileFile(Compiler.java:367)
  | [ERROR]         at org.jboss.aop.standalone.Compiler.compile(Compiler.java:232)                                                                                          [ERROR]         at org.jboss.aop.standalone.Compiler.main(Compiler.java:88)
  | [ERROR] Exception in thread "main" java.lang.RuntimeException: org.jboss.aop.instrument.TransformationException: Failed to aspectize class com.desktone.server.accessFabric.FabricDelegateImpl.  Could not find class it references com.desktone.server.accessFabric.elementService.ws.ElementServiceImplServiceLocator  It may not be in your classpath and you may not be getting field and constructor weaving for this class.
  | [ERROR]         at org.jboss.aop.AspectManager.translate(AspectManager.java:1018)
  | [ERROR]         at org.jboss.aop.AspectManager.transform(AspectManager.java:959)
  | [ERROR]         at org.jboss.aop.standalone.Compiler.compileFile(Compiler.java:367)
  | [ERROR]         at org.jboss.aop.standalone.Compiler.compile(Compiler.java:232)
  | [ERROR]         at org.jboss.aop.standalone.Compiler.main(Compiler.java:88)
  | [ERROR] Caused by: org.jboss.aop.instrument.TransformationException: Failed to aspectize class com.desktone.server.accessFabric.FabricDelegateImpl.  Could not find class it references com.desktone.server.accessFabric.elementService.ws.ElementServiceImplServiceLocator  It may not be in your classpath and you may not be getting field and constructor weaving for this class.
  | [ERROR]         at org.jboss.aop.instrument.Instrumentor.convertReferences(Instrumentor.java:703)
  | [ERROR]         at org.jboss.aop.instrument.Instrumentor.transform(Instrumentor.java:756)
  | [ERROR]         at org.jboss.aop.instrument.GeneratedAdvisorInstrumentor.transform(GeneratedAdvisorInstrumentor.java:117)
  | [ERROR]         at org.jboss.aop.ClassicWeavingStrategy.translate(ClassicWeavingStrategy.java:111)
  | [ERROR]         at org.jboss.aop.AspectManager.translate(AspectManager.java:1013)
  | [ERROR]         ... 4 more
  | [INFO] [aop-debug] org.jboss.aop.instrument.InstrumentorFactory Passed in instrumentor: null
  | [INFO] [aop-debug] org.jboss.aop.instrument.InstrumentorFactory Defaulting instrumentor to: org.jboss.aop.instrument.GeneratedAdvisorInstrumentor
  | [INFO] [aop-debug] org.jboss.aop.AdvisorFactory Passed in advisor: null
  | [INFO] [aop-debug] org.jboss.aop.AdvisorFactory [debug] Defaulting advisor to: org.jboss.aop.ClassAdvisor
  | 

The class in question is in that dt-fabric-node jar file already on the classpath.  I've also added the physical class file to the classpath and it still does not see it.  I know the compiler is picking up the jar because if I remove it, it is complaining about other classes that are no longer on the cp.  I have gone through other posts to the forum and it seems those other issues have all been solved by incorrect classpaths but that wouldn't appear to be the problem here.  Any insight as to what might be wrong?

Thanks,
Ken


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4173759#4173759

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4173759



More information about the jboss-user mailing list