5 Replies Latest reply on Dec 6, 2009 12:26 PM by vnmbatista

    Undeterministic error:

      Hello,
      I am using JBoss 4.2.2 with JBossCache 1.4.1.SP5 (Bundled with JBoss 4.2.2). I am using the PojoCache with LoadTime Weaving. All my cacheable POJOs have the _@PojoCacheable_ annotation.
      From time to time I am getting one exception stating that one of my objects is not aspectized (see details below). Most of the times (more than 50%) everything works fine, although I have lots of errors like the one below. Any one have any clue for this?

      I have upgraded JBossAOP to version 2.1.5 and JBossCache to version 1.4.1.SP13, although I have exactly the same problem.

      From the details below I would like to highlight the fact that having AOP with debug enabled I get a message saying that my POJO was correctly aspectized:

      2009-11-27 23:51:45,546 INFO [STDOUT] [debug] was com.foo.bar.entities.Game converted: true



      and the error saying that the same class is not aspectized:
      javax.ejb.EJBTransactionRolledbackException: PojoCache.putObject(): Object type is neither aspectized nor Serializable nor an array of primitives. Object class name is com.foo.bar.soccer.entities.Game
       at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:87)
      
      


      This is really tricky. This is happening undeterministic and not always on the samo POJO. Any one has any hint for this issue? Any help would really be appreciated.

      This problem is also happening in production and is becoming a problem. Any help would really be appreciated.

      Thanks in advance.
      Best regards,
      Victor Batista


      2009-11-27 23:51:43,849 INFO [STDOUT] [trying to transform] com.foo.bar.entities.Game
      2009-11-27 23:51:43,849 INFO [STDOUT] [debug] There are no caller pointcuts!
      2009-11-27 23:51:43,850 INFO [STDOUT] [debug] javassist.CtMethod@fb809fd2[public getId ()Ljava/lang/Integer;] matches no pointcuts
      2009-11-27 23:51:43,850 INFO [STDOUT] [debug] javassist.CtMethod@b43bb4f7[public setId (Ljava/lang/Integer;)V] matches no pointcuts
      2009-11-27 23:51:43,850 INFO [STDOUT] [debug] javassist.CtMethod@248c59d3[public getHomeTeam ()Ljava/lang/String;] matches no pointcuts
      2009-11-27 23:51:43,851 INFO [STDOUT] [debug] javassist.CtMethod@58d7dc95[public setHomeTeam (Ljava/lang/String;)V] matches no pointcuts
      2009-11-27 23:51:43,851 INFO [STDOUT] [debug] javassist.CtMethod@66fafaab[public getVisitingTeam ()Ljava/lang/String;] matches no pointcuts
      2009-11-27 23:51:43,851 INFO [STDOUT] [debug] javassist.CtMethod@f7e0916d[public setVisitingTeam (Ljava/lang/String;)V] matches no pointcuts
      2009-11-27 23:51:43,852 INFO [STDOUT] [debug] javassist.CtMethod@1548e425[public getDate ()Ljava/lang/String;] matches no pointcuts
      2009-11-27 23:51:43,852 INFO [STDOUT] [debug] javassist.CtMethod@80bc9c67[public setDate (Ljava/lang/String;)V] matches no pointcuts
      2009-11-27 23:51:43,852 INFO [STDOUT] [debug] javassist.CtMethod@ce5ef9ac[public getHomeGoals ()Ljava/lang/Integer;] matches no pointcuts
      2009-11-27 23:51:43,853 INFO [STDOUT] [debug] javassist.CtMethod@dbe23375[public setHomeGoals (Ljava/lang/Integer;)V] matches no pointcuts
      2009-11-27 23:51:43,853 INFO [STDOUT] [debug] javassist.CtMethod@d9c473d4[public getVisitingGoals ()Ljava/lang/Integer;] matches no pointcuts
      2009-11-27 23:51:43,854 INFO [STDOUT] [debug] javassist.CtMethod@db91124d[public setVisitingGoals (Ljava/lang/Integer;)V] matches no pointcuts
      2009-11-27 23:51:43,854 INFO [STDOUT] [debug] javassist.CtMethod@2057f412[public getPlace ()Ljava/lang/String;] matches no pointcuts
      2009-11-27 23:51:43,854 INFO [STDOUT] [debug] javassist.CtMethod@8281fa7c[public setPlace (Ljava/lang/String;)V] matches no pointcuts
      2009-11-27 23:51:43,855 INFO [STDOUT] [debug] javassist.CtMethod@68132708[public getStadium ()Ljava/lang/String;] matches no pointcuts
      2009-11-27 23:51:43,855 INFO [STDOUT] [debug] javassist.CtMethod@189a4ef2[public setStadium (Ljava/lang/String;)V] matches no pointcuts
      2009-11-27 23:51:43,855 INFO [STDOUT] [debug] javassist.CtMethod@568dbe8e[public getChannel ()Ljava/lang/String;] matches no pointcuts
      2009-11-27 23:51:43,856 INFO [STDOUT] [debug] javassist.CtMethod@436c50f8[public setChannel (Ljava/lang/String;)V] matches no pointcuts
      2009-11-27 23:51:43,856 INFO [STDOUT] [debug] javassist.CtMethod@63e054cb[public getScorerGoals ()Ljava/lang/String;] matches no pointcuts
      2009-11-27 23:51:43,857 INFO [STDOUT] [debug] javassist.CtMethod@c83d7f5[public setScorerGoals (Ljava/lang/String;)V] matches no pointcuts
      2009-11-27 23:51:43,857 INFO [STDOUT] [debug] javassist.CtMethod@53db54e2[public getGuess ()Lcom/foo/bar/soccer/entities/Guess;] matches no pointcuts
      2009-11-27 23:51:43,857 INFO [STDOUT] [debug] javassist.CtMethod@fa6b711c[public setGuess (Lcom/foo/bar/soccer/entities/Guess;)V] matches no pointcuts
      2009-11-27 23:51:43,858 INFO [STDOUT] [debug] javassist.CtMethod@c13165c[public hashCode ()I] matches no pointcuts
      2009-11-27 23:51:43,858 INFO [STDOUT] [debug] javassist.CtMethod@87a44f24[public equals (Ljava/lang/Object;)Z] matches no pointcuts
      2009-11-27 23:51:43,859 INFO [STDOUT] [debug] javassist.CtConstructor@140eacd[public Game ()V] matches no pointcuts
      2009-11-27 23:51:43,860 INFO [STDOUT] [debug] com.foo.bar.entities.Game.channel:Ljava/lang/String; matches pointcut: field(* @org.jboss.cache.aop.annotation.PojoCacheable->*)
      2009-11-27 23:51:43,860 INFO [STDOUT] [debug] com.foo.bar.entities.Game.channel:Ljava/lang/String; matches pointcut: field(* @org.jboss.cache.aop.annotation.PojoCacheable->*)
      2009-11-27 23:51:44,008 INFO [STDOUT] [debug] com.foo.bar.entities.Game.date:Ljava/lang/String; matches pointcut: field(* @org.jboss.cache.aop.annotation.PojoCacheable->*)
      2009-11-27 23:51:44,008 INFO [STDOUT] [debug] com.foo.bar.entities.Game.date:Ljava/lang/String; matches pointcut: field(* @org.jboss.cache.aop.annotation.PojoCacheable->*)
      2009-11-27 23:51:44,177 INFO [STDOUT] [debug] com.foo.bar.entities.Game.guess:Lcom/foo/bar/soccer/entities/Guess; matches pointcut: field(* @org.jboss.cache.
      aop.annotation.PojoCacheable->*)
      2009-11-27 23:51:44,177 INFO [STDOUT] [debug] com.foo.bar.entities.Game.guess:Lcom/foo/bar/soccer/entities/Guess; matches pointcut: field(* @org.jboss.cache.
      aop.annotation.PojoCacheable->*)
      2009-11-27 23:51:44,453 INFO [STDOUT] [debug] com.foo.bar.entities.Game.homeGoals:Ljava/lang/Integer; matches pointcut: field(* @org.jboss.cache.aop.annotation.PojoCacheable->*)
      2009-11-27 23:51:44,453 INFO [STDOUT] [debug] com.foo.bar.entities.Game.homeGoals:Ljava/lang/Integer; matches pointcut: field(* @org.jboss.cache.aop.annotation.PojoCacheable->*)
      2009-11-27 23:51:44,604 INFO [STDOUT] [debug] com.foo.bar.entities.Game.homeTeam:Ljava/lang/String; matches pointcut: field(* @org.jboss.cache.aop.annotation.PojoCacheable->*)
      2009-11-27 23:51:44,606 ERROR [com.foo.bar.services.WSIntegrationService] Error getting current stage.
      2009-11-27 23:51:44,670 INFO [STDOUT] [debug] com.foo.bar.entities.Game.homeTeam:Ljava/lang/String; matches pointcut: field(* @org.jboss.cache.aop.annotation.PojoCacheable->*)
      2009-11-27 23:51:44,981 INFO [STDOUT] [debug] com.foo.bar.entities.Game.id:Ljava/lang/Integer; matches pointcut: field(* @org.jboss.cache.aop.annotation.PojoCacheable->*)
      2009-11-27 23:51:44,981 INFO [STDOUT] [debug] com.foo.bar.entities.Game.id:Ljava/lang/Integer; matches pointcut: field(* @org.jboss.cache.aop.annotation.PojoCacheable->*)
      2009-11-27 23:51:45,173 INFO [STDOUT] [debug] com.foo.bar.entities.Game.place:Ljava/lang/String; matches pointcut: field(* @org.jboss.cache.aop.annotation.PojoCacheable->*)
      2009-11-27 23:51:45,174 INFO [STDOUT] [debug] com.foo.bar.entities.Game.place:Ljava/lang/String; matches pointcut: field(* @org.jboss.cache.aop.annotation.PojoCacheable->*)
      2009-11-27 23:51:45,245 INFO [STDOUT] [debug] com.foo.bar.entities.Game.scorerGoals:Ljava/lang/String; matches pointcut: field(* @org.jboss.cache.aop.annotation.PojoCacheable->*)
      2009-11-27 23:51:45,245 INFO [STDOUT] [debug] com.foo.bar.entities.Game.scorerGoals:Ljava/lang/String; matches pointcut: field(* @org.jboss.cache.aop.annotation.PojoCacheable->*)
      2009-11-27 23:51:45,322 INFO [STDOUT] [debug] com.foo.bar.entities.Game.stadium:Ljava/lang/String; matches pointcut: field(* @org.jboss.cache.aop.annotation.PojoCacheable->*)
      2009-11-27 23:51:45,323 INFO [STDOUT] [debug] com.foo.bar.entities.Game.stadium:Ljava/lang/String; matches pointcut: field(* @org.jboss.cache.aop.annotation.PojoCacheable->*)
      2009-11-27 23:51:45,394 INFO [STDOUT] [debug] com.foo.bar.entities.Game.visitingGoals:Ljava/lang/Integer; matches pointcut: field(* @org.jboss.cache.aop.annotation.PojoCacheable-
      >*)
      2009-11-27 23:51:45,395 INFO [STDOUT] [debug] com.foo.bar.entities.Game.visitingGoals:Ljava/lang/Integer; matches pointcut: field(* @org.jboss.cache.aop.annotation.PojoCacheable-
      >*)
      2009-11-27 23:51:45,467 INFO [STDOUT] [debug] com.foo.bar.entities.Game.visitingTeam:Ljava/lang/String; matches pointcut: field(* @org.jboss.cache.aop.annotation.PojoCacheable->*
      )
      2009-11-27 23:51:45,468 INFO [STDOUT] [debug] com.foo.bar.entities.Game.visitingTeam:Ljava/lang/String; matches pointcut: field(* @org.jboss.cache.aop.annotation.PojoCacheable->*
      )
      2009-11-27 23:51:45,546 INFO [STDOUT] [debug] was com.foo.bar.entities.Game converted: true
      2009-11-27 23:51:45,572 INFO [STDOUT] iterate binding file:/home/cerberus/jboss-4.2.2.GA/server/default/deploy/jboss-aop-jdk50.deployer/base-aop.xml0
      2009-11-27 23:51:45,574 INFO [STDOUT] iterate binding file:/home/cerberus/jboss-4.2.2.GA/server/default/deploy/jboss-aop-jdk50.deployer/base-aop.xml2
      2009-11-27 23:51:45,575 INFO [STDOUT] iterate binding file:/home/cerberus/jboss-4.2.2.GA/server/default/deploy/jboss-aop-jdk50.deployer/base-aop.xml4
      2009-11-27 23:51:45,577 INFO [STDOUT] iterate binding file:/home/cerberus/jboss-4.2.2.GA/server/default/deploy/jboss-aop-jdk50.deployer/base-aop.xml6
      2009-11-27 23:51:45,579 INFO [STDOUT] iterate binding file:/home/cerberus/jboss-4.2.2.GA/server/default/deploy/jboss-aop-jdk50.deployer/base-aop.xml9
      2009-11-27 23:51:45,580 INFO [STDOUT] iterate binding file:/home/cerberus/jboss-4.2.2.GA/server/default/deploy/jboss-aop-jdk50.deployer/base-aop.xml12
      2009-11-27 23:51:45,583 INFO [STDOUT] iterate binding file:/home/cerberus/jboss-4.2.2.GA/server/default/deploy/jboss-aop-jdk50.deployer/base-aop.xml15
      2009-11-27 23:51:45,584 INFO [STDOUT] iterate binding file:/home/cerberus/jboss-4.2.2.GA/server/default/deploy/jboss-aop-jdk50.deployer/base-aop.xml17
      2009-11-27 23:51:45,586 INFO [STDOUT] iterate binding file:/home/cerberus/jboss-4.2.2.GA/server/default/deploy/jboss-aop-jdk50.deployer/base-aop.xml19
      2009-11-27 23:51:45,587 INFO [STDOUT] iterate binding file:/home/cerberus/jboss-4.2.2.GA/server/default/deploy/jboss-aop-jdk50.deployer/base-aop.xml21
      2009-11-27 23:51:45,589 INFO [STDOUT] iterate binding file:/home/cerberus/jboss-4.2.2.GA/server/default/deploy/jboss-aop-jdk50.deployer/base-aop.xml23
      2009-11-27 23:51:45,591 INFO [STDOUT] iterate binding file:/home/cerberus/jboss-4.2.2.GA/server/default/deploy/jboss-aop-jdk50.deployer/base-aop.xml25
      2009-11-27 23:51:45,592 INFO [STDOUT] iterate binding file:/home/cerberus/jboss-4.2.2.GA/server/default/deploy/jboss-aop-jdk50.deployer/base-aop.xml27
      2009-11-27 23:51:45,592 INFO [STDOUT] iterate binding file:/home/cerberus/jboss-4.2.2.GA/server/default/deploy/jboss-aop-jdk50.deployer/base-aop.xml29
      2009-11-27 23:51:45,593 INFO [STDOUT] iterate binding file:/home/cerberus/jboss-4.2.2.GA/server/default/deploy/jboss-aop-jdk50.deployer/base-aop.xml31
      2009-11-27 23:51:45,593 INFO [STDOUT] iterate binding file:/home/cerberus/jboss-4.2.2.GA/server/default/deploy/jboss-aop-jdk50.deployer/base-aop.xml33
      2009-11-27 23:51:45,594 INFO [STDOUT] iterate binding file:/home/cerberus/jboss-4.2.2.GA/server/default/deploy/jboss-aop-jdk50.deployer/base-aop.xml35
      
      
      
      ....
      
      
      javax.ejb.EJBTransactionRolledbackException: PojoCache.putObject(): Object type is neither aspectized nor Serializable nor an array of primitives. Object class name is com.foo.bar.soccer.entities.Game
       at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:87)
       at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)
       at org.jboss.aspects.tx.TxInterceptor$Supports.invoke(TxInterceptor.java:148)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
       at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:240)
       at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:210)
       at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:84)
       at $Proxy224.insertGames(Unknown Source)
       at com.foo.bar.business.OfficialLeagueServiceBean.insertGames(OfficialLeagueServiceBean.java:195)
       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.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
       at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
       at com.foo.bar.business.OfficialLeagueServiceBean.setWSIntegrationService(OfficialLeagueServiceBean.java:125)
       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.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:146)
       at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
       at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
       at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:240)
       at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:210)
       at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:84)
       at $Proxy302.insertGames(Unknown Source)
       at com.foo.bar.services.RSSIntegrationService.importFeeds(RSSIntegrationService.java:446)
       at com.foo.bar.services.RSSIntegrationService.access$300(RSSIntegrationService.java:54)
       at com.foo.bar.services.RSSIntegrationService$RSSIntegrationTimerTask.run(RSSIntegrationService.java:368)
       at java.util.TimerThread.mainLoop(Timer.java:512)
       at java.util.TimerThread.run(Timer.java:462)
      Caused by: java.lang.IllegalArgumentException: PojoCache.putObject(): Object type is neither aspectized nor Serializable nor an array of primitives. Object class name is com.foo.bar.soccer.entities.Game
       at org.jboss.cache.aop.util.AopUtil.checkObjectType(AopUtil.java:112)
       at org.jboss.cache.aop.TreeCacheAopDelegate._putObject(TreeCacheAopDelegate.java:169)
       at org.jboss.cache.aop.PojoCache._putObject(PojoCache.java:739)
       at org.jboss.cache.aop.PojoCache.putObject(PojoCache.java:449)
       at org.jboss.cache.aop.collection.CachedListImpl.add(CachedListImpl.java:106)
       at org.jboss.cache.aop.collection.CachedListAbstract.add(CachedListAbstract.java:58)
       at sun.reflect.GeneratedMethodAccessor175.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.cache.aop.collection.CollectionInterceptorUtil.invoke(CollectionInterceptorUtil.java:126)
       at org.jboss.cache.aop.collection.CachedListInterceptor.invoke(CachedListInterceptor.java:132)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at AOPClassProxy$0.add(AOPClassProxy$0.java)
       at org.jboss.cache.aop.CollectionClassHandler.collectionObjectPut(CollectionClassHandler.java:166)
       at org.jboss.cache.aop.TreeCacheAopDelegate._putObject(TreeCacheAopDelegate.java:213)
       at org.jboss.cache.aop.TreeCacheAopDelegate._regularPutObject(TreeCacheAopDelegate.java:468)
       at org.jboss.cache.aop.TreeCacheAopDelegate._putObject(TreeCacheAopDelegate.java:206)
       at org.jboss.cache.aop.PojoCache._putObject(PojoCache.java:739)
       at org.jboss.cache.aop.PojoCache.putObject(PojoCache.java:449)
       at org.jboss.cache.aop.collection.CachedMapImpl.put(CachedMapImpl.java:82)
       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.cache.aop.collection.CollectionInterceptorUtil.invoke(CollectionInterceptorUtil.java:126)
       at org.jboss.cache.aop.collection.CachedMapInterceptor.invoke(CachedMapInterceptor.java:117)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at AOPClassProxy$1.put(AOPClassProxy$1.java)
       at org.jboss.cache.aop.CollectionClassHandler.collectionObjectPut(CollectionClassHandler.java:141)
       at org.jboss.cache.aop.TreeCacheAopDelegate._putObject(TreeCacheAopDelegate.java:213)
       at org.jboss.cache.aop.PojoCache._putObject(PojoCache.java:739)
       at org.jboss.cache.aop.PojoCache.putObject(PojoCache.java:449)
       at org.jboss.cache.aop.PojoCache.putObject(PojoCache.java:426)
       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:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy319.putObject(Unknown Source)
       at com.foo.bar.persistence.GameDAOBean.insertGames(GameDAOBean.java:60)
       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.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
       at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
       at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
       ... 59 more
      


        • 1. Re: Undeterministic error:
          manik

          Have you tried compile-time weaving, just to compare and help isolate the problem?

          • 2. Re: Undeterministic error:
            kabirkhan

            Are you sure you only have one occurrence of the Game class in your deployments?

            • 3. Re: Undeterministic error:

              Hi Manik and Kabir,
              Thank you very much for your reply.
              I have only one occurrence of the Game class on JBoss
              I will try compile time weaving. Although this is not an option for us in production, because once you compile with a specific version of JBossAOP, you need that version in runtime (according to other tests I have made some months ago on a different project).

              Meanwhile, do you have any other hint for this issue?

              Thanks in advance.
              Best regards,
              Victor Batista

              • 4. Re: Undeterministic error:

                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




                • 5. Re: Undeterministic error:

                  Hi,
                  Unfortunately with compile time weaving I endup without PermGen. Our application replaces objects on the cache from time to time. I have done some stress tests with high load of cache insertions (replacemente: insert on an exiting node) and I endup with OurOfMemory on the permanent generation (no matter the max limit of PermGen). I took a look at the tmp dir, and I have a class object for each instantiation of my aspectized objects:

                  -rw-rw-r-- 1 cerberus cerberus 9952 Dez 6 17:13 AOPClassProxy$14571.class
                  -rw-rw-r-- 1 cerberus cerberus 9952 Dez 6 17:13 AOPClassProxy$14572.class
                  -rw-rw-r-- 1 cerberus cerberus 9952 Dez 6 17:13 AOPClassProxy$14573.class
                  -rw-rw-r-- 1 cerberus cerberus 9952 Dez 6 17:13 AOPClassProxy$14563.class
                  -rw-rw-r-- 1 cerberus cerberus 9952 Dez 6 17:13 AOPClassProxy$14564.class
                  -rw-rw-r-- 1 cerberus cerberus 6680 Dez 6 17:13 AOPClassProxy$14565.class
                  -rw-rw-r-- 1 cerberus cerberus 9952 Dez 6 17:13 AOPClassProxy$14566.class
                  -rw-rw-r-- 1 cerberus cerberus 9952 Dez 6 17:13 AOPClassProxy$14567.class
                  -rw-rw-r-- 1 cerberus cerberus 9952 Dez 6 17:13 AOPClassProxy$14568.class
                  -rw-rw-r-- 1 cerberus cerberus 9952 Dez 6 17:13 AOPClassProxy$14569.class
                  -rw-rw-r-- 1 cerberus cerberus 9952 Dez 6 17:13 AOPClassProxy$14570.class
                  -rw-rw-r-- 1 cerberus cerberus 9952 Dez 6 17:13 AOPClassProxy$14562.class
                  -rw-rw-r-- 1 cerberus cerberus 9952 Dez 6 17:12 AOPClassProxy$14557.class
                  -rw-rw-r-- 1 cerberus cerberus 9952 Dez 6 17:12 AOPClassProxy$14558.class
                  -rw-rw-r-- 1 cerberus cerberus 9952 Dez 6 17:12 AOPClassProxy$14559.class
                  -rw-rw-r-- 1 cerberus cerberus 9952 Dez 6 17:12 AOPClassProxy$14560.class
                  -rw-rw-r-- 1 cerberus cerberus 9952 Dez 6 17:12 AOPClassProxy$14561.class
                  -rw-rw-r-- 1 cerberus cerberus 9952 Dez 6 17:12 AOPClassProxy$14551.class
                  -rw-rw-r-- 1 cerberus cerberus 9952 Dez 6 17:12 AOPClassProxy$14552.class
                  -rw-rw-r-- 1 cerberus cerberus 9952 Dez 6 17:12 AOPClassProxy$14553.class
                  -rw-rw-r-- 1 cerberus cerberus 9952 Dez 6 17:12 AOPClassProxy$14554.class
                  -rw-rw-r-- 1 cerberus cerberus 9952 Dez 6 17:12 AOPClassProxy$14555.class
                  


                  I have done a memory dump (1 GB) and I'm going to analyze it. Although I think there is a bug somewhere, because objects replaced on the cache don't seem to be garbage collected. This makes my old generation increase, and the same for the permanent generation. Are Cache replaced objects correctly garbage collected?

                  Why do I have a new Class object created for each instantiation of my aspectized objects? Is this the expected behavior?

                  At the moment I have having serious problems, no matter I use compile time weaving or load time weaving. Although, load time weaving is the option I would go for, if I wouldn't have the strange startup error (object not aspectized).

                  I am really getting "crazy" with this problems.

                  Any hint to solve my problem?

                  Thanks in advance.
                  Best regards,
                  Victor Batista

                  PS: I upgraded JBossCache to 1.4.1.SP14
                  PS2: I will to replace the PojoCache by a TreeCache.