Uploaded image for project: 'JBoss POJO Cache'
  1. JBoss POJO Cache
  2. PCACHE-74

VerifyError exception thrown on cross-package inheritence

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Critical
    • Resolution: Done
    • Affects Version/s: 2.1.0.Beta1, 2.1.0.CR1, 2.1.0.CR2, 2.1.0.CR3, 2.1.0.CR4, 2.1.0.GA, 2.2.0.CR5, 2.2.0.CR7
    • Fix Version/s: 2.2.0.GA
    • Component/s: None
    • Labels:
      None
    • Environment:

      Solaris 10/AMD or Windows XP SP3, Java 5.15

      Description

      This provides extra information to help reproduce bug https://jira.jboss.org/jira/browse/PCACHE-64 which was closed as non reproducible.

      I can't attach an object that inherits from an object in another Java package.
      Try to do a very simple thing with the 2.1.0.GA distribution: move class Student (which inherits from Person) from package org.jboss.cache.pojo.test to org.jboss.cache.pojo.test.studentpackage.
      Clean, recompile and run ant run.demo target. In the launched GUI, execute the following commands:
      bsh % person = new Person();
      <name=null, age=0, hobbies=, address=null, skills=null, languages=null>
      bsh % person.setAge(10);
      bsh % cache.attach("/person", person);
      <null>
      bsh % student = new org.jboss.cache.pojo.test.studentpackage.Student();
      <year=null name=null, age=0, hobbies=, address=null, skills=null, languages=null>
      bsh % student.setAge(15);
      bsh % cache.attach("/student", student);

      The following exception is thrown:
      // Error: // Uncaught Exception: Method Invocation cache.attach : at Line: 1 : in file: <unknown file> : cache .attach ( "/student" , student )

      Target exception: java.lang.VerifyError: (class: org/jboss/cache/pojo/test/studentpackage/Student$StudentInstanceAdvisor, method: Person$PersonAdvisor$skills_w_$aop signature: (Ljava/lang/Object;Ljava/util/Set;)V) Bad access to protected data

      java.lang.VerifyError: (class: org/jboss/cache/pojo/test/studentpackage/Student$StudentInstanceAdvisor, method: Person$PersonAdvisor$skills_w_$aop signature: (Ljava/lang/Object;Ljava/util/Set;)V) Bad access to protected data
      at org.jboss.cache.pojo.test.studentpackage.Student$StudentAdvisor.createInstanceAdvisor(Student$StudentAdvisor.java)
      at org.jboss.cache.pojo.test.studentpackage.Student._getInstanceAdvisor(Student.java)
      at org.jboss.cache.pojo.impl.PojoCacheDelegate.isMultipleReferencedPut(PojoCacheDelegate.java:382)
      at org.jboss.cache.pojo.impl.PojoCacheDelegate.putObjectII(PojoCacheDelegate.java:154)
      at org.jboss.cache.pojo.impl.PojoCacheImpl.putObject(PojoCacheImpl.java:137)
      at org.jboss.cache.pojo.impl.PojoCacheImpl.org$jboss$cache$pojo$impl$PojoCacheImpl$attach$aop(PojoCacheImpl.java:102)
      at org.jboss.cache.pojo.impl.PojoCacheImpl$JoinPoint_attach3085019539260813833.dispatch(PojoCacheImpl$JoinPoint_attach3085019539260813833.java)
      at org.jboss.cache.pojo.impl.JoinPoint_attach3085019539260813833_1$aop.invokeNext(JoinPoint_attach3085019539260813833_1$aop.java)
      at org.jboss.cache.pojo.interceptors.PojoTxUndoSynchronizationInterceptor.invoke(PojoTxUndoSynchronizationInterceptor.java:42)
      at org.jboss.cache.pojo.impl.JoinPoint_attach3085019539260813833_1$aop.invokeNext(JoinPoint_attach3085019539260813833_1$aop.java)
      at org.jboss.cache.pojo.interceptors.PojoTxLockInterceptor.invoke(PojoTxLockInterceptor.java:38)
      at org.jboss.cache.pojo.impl.JoinPoint_attach3085019539260813833_1$aop.invokeNext(JoinPoint_attach3085019539260813833_1$aop.java)
      at org.jboss.cache.pojo.interceptors.PojoFailedTxMockupInterceptor.invoke(PojoFailedTxMockupInterceptor.java:46)
      at org.jboss.cache.pojo.impl.JoinPoint_attach3085019539260813833_1$aop.invokeNext(JoinPoint_attach3085019539260813833_1$aop.java)
      at org.jboss.cache.pojo.interceptors.PojoTxInterceptor.invoke(PojoTxInterceptor.java:77)
      at org.jboss.cache.pojo.impl.JoinPoint_attach3085019539260813833_1$aop.invokeNext(JoinPoint_attach3085019539260813833_1$aop.java)
      at org.jboss.cache.pojo.interceptors.CheckNonSerializableInterceptor.invoke(CheckNonSerializableInterceptor.java:46)
      at org.jboss.cache.pojo.impl.JoinPoint_attach3085019539260813833_1$aop.invokeNext(JoinPoint_attach3085019539260813833_1$aop.java)
      at org.jboss.cache.pojo.interceptors.CheckIdInterceptor.invoke(CheckIdInterceptor.java:33)
      at org.jboss.cache.pojo.impl.JoinPoint_attach3085019539260813833_1$aop.invokeNext(JoinPoint_attach3085019539260813833_1$aop.java)
      at org.jboss.cache.pojo.interceptors.PojoBeginInterceptor.invoke(PojoBeginInterceptor.java:36)
      at org.jboss.cache.pojo.impl.JoinPoint_attach3085019539260813833_1$aop.invokeNext(JoinPoint_attach3085019539260813833_1$aop.java)
      at org.jboss.cache.pojo.impl.JoinPoint_attach3085019539260813833_1$aop.invokeJoinpoint(JoinPoint_attach3085019539260813833_1$aop.java)
      at org.jboss.cache.pojo.impl.PojoCacheImpl$PojoCacheImplAdvisor.attach3085019539260813833(PojoCacheImpl$PojoCacheImplAdvisor.java)
      at org.jboss.cache.pojo.impl.PojoCacheImpl$PojoCacheImplInstanceAdvisor.attach3085019539260813833(PojoCacheImpl$PojoCacheImplInstanceAdvisor.java)
      at org.jboss.cache.pojo.impl.PojoCacheImpl.attach(PojoCacheImpl.java)
      at org.jboss.cache.pojo.impl.PojoCacheImpl.attach(PojoCacheImpl.javabsh % :94)
      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 bsh.Reflect.invokeMethod(Unknown Source)
      at bsh.Reflect.invokeObjectMethod(Unknown Source)
      at bsh.Name.invokeMethod(Unknown Source)
      at bsh.BSHMethodInvocation.eval(Unknown Source)
      at bsh.BSHPrimaryExpression.eval(Unknown Source)
      at bsh.BSHPrimaryExpression.eval(Unknown Source)
      at bsh.Interpreter.run(Unknown Source)
      at java.lang.Thread.run(Thread.java:619)

      Alternatively, use the following three classes and try to add ConcreteState object to the cache. This will produce the same VerifyError exception:

      ####################################################
      package com.pojotest.session;
      @org.jboss.cache.pojo.annotation.Replicable
      public class SessionState
      {
      private StateCommons commons;
      public SessionState()

      { commons = new StateCommons(); }

      }
      ####################################################
      package com.pojotest.session;
      @org.jboss.cache.pojo.annotation.Replicable
      public class StateCommons
      {
      }
      ####################################################
      package com.pojotest.session.nw;
      import com.pojotest.session.SessionState;
      @org.jboss.cache.pojo.annotation.Replicable
      public class ConcreteState extends SessionState
      {
      }
      ####################################################
      package com.pojotest;
      import com.pojotest.session.nw.ConcreteState;
      import org.jboss.cache.pojo.PojoCache;
      import org.jboss.cache.pojo.PojoCacheFactory;
      public class PcrfPojoTest
      {
      private static String confFile =
      "/JBossCache21/pojo/etc/META-INF/replSync-service.xml";
      public static void main(String[] aInArgs)

      { PojoCache cache = PojoCacheFactory.createCache(confFile); cache.start(); ConcreteState lState = new ConcreteState(); cache.attach("/AAAAAAAA", lState); //this throws VerifyError }

      }

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  jason.greene Jason Greene
                  Reporter:
                  felixk felixk
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: