[jboss-user] [JBossCache] - Re: PojoCache: java.lang.NoSuchMethodException: addObserver
chencao0524
do-not-reply at jboss.com
Tue Jan 9 21:56:04 EST 2007
Thanks for your reply.
My POJO are Person.class, Student.class, Address.class
| Person.java
| @org.jboss.cache.aop.annotation.InstanceOfPojoCacheable
| public class Person implements Serializable {
| ...
| }
|
| Student.java
| public class Student extends Person {
| ...
| }
|
| Address.java
| @org.jboss.cache.aop.annotation.PojoCacheable
| public class Address implements Serializable {
| ...
| }
|
snippets in my build.xml
| <path id="build.classpath">
| <pathelement location="${basedir}"/>
| <fileset dir="${jboss.home}/lib">
| <include name="**/*.jar"/>
| </fileset>
| <fileset dir="${jboss.home}/server/${jboss.server.config}/lib">
| <include name="**/*.jar"/>
| </fileset>
| <fileset dir="${jboss.home}/server/${jboss.server.config}/deploy/ejb3.deployer">
| <include name="*.jar"/>
| </fileset>
| <fileset dir="${jboss.home}/server/${jboss.server.config}/deploy/jboss-aop-jdk50.deployer">
| <include name="*.jar"/>
| </fileset>
| <fileset dir="${lib.dir}">
| <include name="**/*.jar"/>
| </fileset>
| <fileset dir="${cache.lib.50.dir}">
| <include name="**/*.jar"/>
| </fileset>
| <pathelement location="${classes.dao.dir}"/>
| <pathelement location="${classes.web.dir}"/>
| <pathelement location="${classes.test.dir}"/>
| <pathelement location="${conf.hivemind.dir}"/>
| </path>
|
| <!-- set local properties for this build -->
| <path id="pojocache.lib.classpath">
| <fileset dir="${cache.lib.50.dir}">
| <include name="jboss-common.jar"/>
| <include name="concurrent.jar"/>
| <include name="javassist.jar"/>
| <include name="trove.jar"/>
| <include name="jboss-cache-jdk50.jar"/>
| <include name="jboss-aop-jdk50.jar"/>
| </fileset>
| </path>
|
| <!-- pre-compile directory with aopc -->
| <target name="aopc" depends="compile" description="Precompile aop test classes">
| <taskdef name="aopc" classname="org.jboss.aop.ant.AopC" classpathref="pojocache.lib.classpath"/>
| <aopc compilerclasspathref="pojocache.lib.classpath" verbose="true">
| <src path="${classes.dao.dir}"/>
| <aoppath path="${cache.resources.dir}/jboss-aop.xml"/>
| <classpath refid="build.classpath"/>
| </aopc>
| </target>
|
jboss-app.xml
| <prepare expr="field(* @org.jboss.cache.aop.AopMarker->*)" />
|
|
| <prepare expr="field(* $instanceof{@org.jboss.cache.aop.InstanceOfAopMarker}->*)" />
|
|
|
| <prepare expr="field(* @org.jboss.cache.aop.annotation.PojoCacheable->*)" />
|
| <prepare expr="field(* $instanceof{@org.jboss.cache.aop.annotation.InstanceOfPojoCacheable}->*)" />
|
the versions of the jboss-aop-jdk50.jar and jboss-cache-jdk50.jar are the same above.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3999736#3999736
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3999736
More information about the jboss-user
mailing list