Hello Kabir.
Thank you for your response. I really appreciate your help.
Well... what I posted is all I have that talks about VacanteVO in my AOP coding. I made
sure of it. (unless I made a mistake while checking it... a lot of times, hahaha)
I'm adding a separate mixin for each class that need to get new methods and/or
attributes. There are two classes (VacanteVO and CriteriosBusquedaConsultarVacantesVO)
that have almost the same attributes, but I don't think that should matter.
Following is the process I do to deploy my project. In case you find something wrong, or
have a comment.
I enabled the verbose flag in the file:
C:\jboss-4.2.1.GA\server\default\deploy\jboss-aop-jdk50.deployer\META-INF\jboss-service.xml
Every time I test it, I do the following:
a) Stop the jboss server
b) Delete the the following directories or files, just to make sure there is nothing left
form a previous test:
C:\jboss-4.2.1.GA\server\default\data\
| C:\jboss-4.2.1.GA\server\default\log\
| C:\jboss-4.2.1.GA\server\default\tmp\
| C:\jboss-4.2.1.GA\server\default\work\
| C:\jboss-4.2.1.GA\server\default\deploy\bolsaDeTrabajo-1.0-SNAPSHOT.ear
| C:\jboss-4.2.1.GA\server\default\deploy\bolsaDeTrabajo-ds.xml
c) I start the server and when it's finished starting, I make a copy of
C:\jboss-4.2.1.GA\server\default\log\server.log
d) I copy the ear file to:
C:\jboss-4.2.1.GA\server\default\deploy\bolsaDeTrabajo-1.0-SNAPSHOT.ear
e) When it finishes the deploy, I make another copy of the log file
Analizing the log file
In the log file copied after deploy, I can't find any message saying something like:
anonymous wrote : [debug] was
com.mitalteli.bolsaDeTrabajo.service.ejb.ServicioConsultarVacantesBean converted: true
but talking about VacanteVO
Here are the lines containing VacanteVO (with the linenumber at the beginning)
anonymous wrote : 33400 2008-05-13 19:16:51,578 INFO [STDOUT] [debug] Looking for aspects
in:
com.mitalteli.bolsaDeTrabajo.useCaseSlices.specific.consultarVacantes.AspectoVacanteVO
| ...
| 33406 2008-05-13 19:16:51,578 INFO [STDOUT] [debug] Looking for aspects in:
com.mitalteli.bolsaDeTrabajo.useCaseSlices.specific.consultarVacantes.IAspectoVacanteVO
| ...
| 33412 2008-05-13 19:16:51,593 INFO [STDOUT] [debug] Looking for aspects in:
com.mitalteli.bolsaDeTrabajo.useCaseSlices.specific.consultarVacantes.MixinAspectoVacanteVO
| ...
| 33469 2008-05-13 19:16:51,968 INFO [STDOUT] [trying to transform]
com.mitalteli.bolsaDeTrabajo.service.ejb.ServicioConsultarVacantesBean
|
| 33470 2008-05-13 19:16:51,968 INFO [STDOUT] [debug] There are no caller pointcuts!
|
| 33471 2008-05-13 19:16:51,984 INFO [STDOUT] [debug]
javassist.CtMethod@64a49749[public getAllVacantes
()[Lcom/mitalteli/bolsaDeTrabajo/vo/VacanteVO;] matches no pointcuts
| ...
| 33485 2008-05-13 19:16:52,093 INFO [STDOUT] [debug]
javassist.CtConstructor@c01846[public VacanteVO ()V] matches pointcut:
execution(com.mitalteli.bolsaDeTrabajo.vo.VacanteVO->new())
| ...
| 33559 2008-05-13 19:16:52,453 INFO [STDOUT] [trying to transform]
com.mitalteli.bolsaDeTrabajo.vo.VacanteVO
| 33560 2008-05-13 19:16:52,453 INFO [STDOUT] [debug] There are no caller pointcuts!
|
| 33561 2008-05-13 19:16:52,453 INFO [STDOUT] [debug]
javassist.CtMethod@c2ae0ad8[public copy (Lcom/mitalteli/bolsaDeTrabajo/vo/VacanteVO;)V]
matches no pointcuts
|
| 33562 2008-05-13 19:16:52,453 INFO [STDOUT] [debug]
javassist.CtMethod@fb809fd2[public getId ()Ljava/lang/Long;] matches no pointcuts
|
| 33563 2008-05-13 19:16:52,453 INFO [STDOUT] [debug]
javassist.CtMethod@a0e31abf[public setId (Ljava/lang/Long;)V] matches no pointcuts
|
| 33564 2008-05-13 19:16:52,453 INFO [STDOUT] [debug]
javassist.CtMethod@ce09c400[public getNombre ()Ljava/lang/String;] matches no pointcuts
|
| 33565 2008-05-13 19:16:52,453 INFO [STDOUT] [debug]
javassist.CtMethod@25574882[public setNombre (Ljava/lang/String;)V] matches no pointcuts
|
| 33566 2008-05-13 19:16:52,453 INFO [STDOUT] [debug]
javassist.CtMethod@3c861647[public getRequisitos ()Ljava/lang/String;] matches no
pointcuts
|
| 33567 2008-05-13 19:16:52,453 INFO [STDOUT] [debug] javassist.CtMethod@c25109[public
setRequisitos (Ljava/lang/String;)V] matches no pointcuts
|
| 33568 2008-05-13 19:16:52,453 INFO [STDOUT] [debug]
javassist.CtMethod@c241d3b8[public getDescripcion ()Ljava/lang/String;] matches no
pointcuts
|
| 33569 2008-05-13 19:16:52,453 INFO [STDOUT] [debug]
javassist.CtMethod@377e55a2[public setDescripcion (Ljava/lang/String;)V] matches no
pointcuts
|
| 33570 2008-05-13 19:16:52,453 INFO [STDOUT] [debug]
javassist.CtMethod@80614dad[public getHorario
()Lcom/mitalteli/bolsaDeTrabajo/domain/VacanteHorario;] matches no pointcuts
|
| 33571 2008-05-13 19:16:52,453 INFO [STDOUT] [debug]
javassist.CtMethod@77a5a35f[public setHorario
(Lcom/mitalteli/bolsaDeTrabajo/domain/VacanteHorario;)V] matches no pointcuts
|
| 33572 2008-05-13 19:16:52,453 INFO [STDOUT] [debug] javassist.CtMethod@5b4f64b[public
getSueldo ()Lcom/mitalteli/bolsaDeTrabajo/domain/RangoSueldo;] matches no pointcuts
|
| 33573 2008-05-13 19:16:52,468 INFO [STDOUT] [debug]
javassist.CtMethod@b5601aae[public setSueldo
(Lcom/mitalteli/bolsaDeTrabajo/domain/RangoSueldo;)V] matches no pointcuts
|
| 33574 2008-05-13 19:16:52,468 INFO [STDOUT] [debug]
javassist.CtMethod@f6974586[public getContacto ()Ljava/lang/String;] matches no pointcuts
|
| 33575 2008-05-13 19:16:52,468 INFO [STDOUT] [debug]
javassist.CtMethod@b2406188[public setContacto (Ljava/lang/String;)V] matches no
pointcuts
|
| 33576 2008-05-13 19:16:52,468 INFO [STDOUT] [debug]
javassist.CtMethod@ca73dde9[public getStatus
()Lcom/mitalteli/bolsaDeTrabajo/domain/VacanteStatus;] matches no pointcuts
|
| 33577 2008-05-13 19:16:52,468 INFO [STDOUT] [debug]
javassist.CtMethod@ddcfb2dd[public setStatus
(Lcom/mitalteli/bolsaDeTrabajo/domain/VacanteStatus;)V] matches no pointcuts
|
| 33578 2008-05-13 19:16:52,468 INFO [STDOUT] [debug]
javassist.CtMethod@a654b894[public getEmpresa ()Ljava/lang/Long;] matches no pointcuts
|
| 33579 2008-05-13 19:16:52,468 INFO [STDOUT] [debug] javassist.CtMethod@ba98e9[public
setEmpresa (Ljava/lang/Long;)V] matches no pointcuts
|
| 33580 2008-05-13 19:16:52,468 INFO [STDOUT] [debug]
javassist.CtConstructor@19f5491[public VacanteVO ()V] matches pointcut:
execution(com.mitalteli.bolsaDeTrabajo.vo.VacanteVO->new())
|
| 33581 2008-05-13 19:16:52,750 INFO [STDOUT] [debug]
javassist.CtConstructor@1b853a5[public VacanteVO
(Lcom/mitalteli/bolsaDeTrabajo/vo/VacanteVO;)V] matches no pointcuts
|
| 33582 2008-05-13 19:16:52,750 INFO [STDOUT] [debug]
javassist.CtConstructor@7b954b[public VacanteVO
(Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/mitalteli/bolsaDeTrabajo/domain/VacanteHorario;Lcom/mitalteli/bolsaDeTrabajo/domain/RangoSueldo;Ljava/lang/String;Lcom/mitalteli/bolsaDeTrabajo/domain/VacanteStatus;Ljava/lang/Long;)V]
matches no pointcuts
|
| 33583 2008-05-13 19:16:52,781 ERROR [STDERR] [warn] AOP Instrumentor failed to
transform com.mitalteli.bolsaDeTrabajo.vo.VacanteVO
|
| 33584 2008-05-13 19:16:52,781 ERROR [STDERR] java.lang.RuntimeException: Mixin
com.mitalteli.bolsaDeTrabajo.useCaseSlices.specific.consultarVacantes.MixinAspectoVacanteVO
of pointcut
jar:file:/C:/jboss-4.2.1.GA/server/default/tmp/deploy/tmp4165bolsaDeTrabajo-1.0-SNAPSHOT.ear-contents/bolsaDeTrabajo-aop-1.0-SNAPSHOT.aop!/META-INF/jboss-aop.xml7
is trying to apply an already existing methodgetRequisitos for class
com.mitalteli.bolsaDeTrabajo.vo.VacanteVO
|
| 33585 2008-05-13 19:16:52,781 ERROR [STDERR] at
org.jboss.aop.instrument.Instrumentor.addMixin(Instrumentor.java:310)
|
| 33586 2008-05-13 19:16:52,781 ERROR [STDERR] at
org.jboss.aop.instrument.Instrumentor.instrumentIntroductions(Instrumentor.java:375)
|
| 33587 2008-05-13 19:16:52,781 ERROR [STDERR] at
org.jboss.aop.instrument.Instrumentor.transform(Instrumentor.java:717)
| ...
So, apparently it's being waved before line 33559, because line 33566 is reporting
"getRequisitos ()Ljava/lang/String;] matches no pointcuts". That means it
already has a getRequisitos method, Right?
I don't understand enough the log messages, maybe.
I'm completely clueless about what could cause this problem.
----------------
If you have some free time, want and can give me a hand, please download the source code,
.ear file and log file from:
http://www.mitalteli.com/thesis-2008/
And take a look. I hope it's a simple rookie mistake. (I really hope)
Note that I deleted all the ".class" files and the uncompressed ear from the
sources zip (bolsaDeTrabajo-200805150947.zip) .
You can find the jboss-aop.xml at:
<path to the uncompressed zip>\bolsaDeTrabajo\aop\src\main\resources\META-INF
You can find the aop sources at:
<path to the uncompressed
zip>\bolsaDeTrabajo\aop\src\main\java\com\mitalteli\bolsaDeTrabajo\useCaseSlices\specific\consultarVacantes
The sources that are being modified with the AOP coding are spread in the directories:
[common|core|web]\src
and
[common|core|web]\target
If you need to compile, I have some tweeks to do every time. So, once you are in the
unziped source in a cmd black window, execute:
mvn clean
mvn install
copiarCapaPresentacion.bat
mvn -f web/pom.xml
mvn -f app/pom.xml
and to deploy it:
mvn -o -f app/pom.xml -Ddeploy
The .ear file gets created at:
<path to the uncompressed zip>\bolsaDeTrabajo\app\target
Thank you very much in advance.
Ely
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4151159#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...