[jboss-user] [JBoss Cache Users] - Re: Undeterministic error:

vnmbatista do-not-reply at jboss.com
Tue Dec 1 14:02:40 EST 2009


Hi,
I have done compile time weaving configuring my pom.xml the following way:

  |             <plugin>
  |                 <groupId>org.jboss.maven.plugins</groupId>
  |                 <artifactId>maven-jbossaop-plugin</artifactId>
  |                 <version>1.0.0.GA</version>
  | 
  |                 <executions>
  |                     <execution>
  |                         <id>compile</id>
  |                         <configuration>
  |                             <!--
  |                                 if you want to include dependencies from the current module (only needed if a class
  |                                 inherits a class thats not defined in this module
  |                             -->
  |                             <includeProjectDependency>true</includeProjectDependency>
  |                             <aoppaths>
  |                                 <aoppath>src/main/resources/jboss-aop.xml</aoppath>
  |                             </aoppaths>
  |                             <!-- You can specify to only aopc a specific set of classes     -->
  |                             <includes>
  |                                 <include>com/foo/bar/entities/*.class</include>
  |                             </includes>
  | 
  |                         </configuration>
  |                         <goals>
  |                             <goal>compile</goal>
  |                         </goals>
  |                     </execution>
  |                 </executions>
  |             </plugin>
  | 

With  jboss-aop-1.5.6.GA (which comes bundled with my JBoss) it didn't work (Missing method, ... ). I upgrades JBossAOP to version 2.1.5.GA and it starts working.
Although I had problems compiling my project:
I have POJO A and POJOs B and C, both extending A. I had the @PojoCacheable annotation on the three POJOs. Compilation crashed with


  | .../src/main/java/com/foo/bar/services/imports/alert/Alerts.java:297: cannot access org.jboss.aop.Advised
  | class file for org.jboss.aop.Advised not found
  |                 productsList.add(service);
  | 

I tried having A with the annotation @InstanceOfPojoCacheable. It crashed also with the same error both if I had the @PojoCacheable annotation on B,C or if I had B and C without any annotation. It only worked when I removed the @PojoCacheable annotation from A. As a matter of fact I don't need to put A explicitly on the cache. If I needed I would have to refactor my code. Is the configuration which I get working normal?

On the production system I won't be able to run the AOP upgrade script. To upgrade I will need to replace the production files with the upgrades ones:


JBOSS_BIN:   pluggable-instrumentator.jar;
JBOSS_LIB:  javassist.jar
JBOSS_DEPLOY: jboss-aop-jdk50.deployer/


Is this correct? Am I missing any thing?


I would feel much more comfortable with Load Time Weaving, because I would have guarantees that the same binary would work on different version of JBossAOP. I finished without knowing the reason for my problem with load time weaving :(

Thank you very much for your help.

Best regards,
Victor Batista




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

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



More information about the jboss-user mailing list