[jboss-user] [JBoss AOP] - Re: [i]Introduction[/i] not working in my project but workin

elysch do-not-reply at jboss.com
Mon Dec 10 10:07:01 EST 2007


Hi, thank's for responding to my message

"stale.pedersen at jboss.org" wrote : hi, from what i can see in the errorlog it can find the class org.andromda.samples.aop.sades.domain.SolicitudProfesorGrupoDaoImpl.
  | can you think of any reason why it says that it doesnt find the class?

It's strange. I can't figure out why it can't be found. If I comment the jboss-aop.xml contents, without changing any thing else, the error disappears. I taught maybe is a classpath thing, so I changed the manifest.mf file inside the aop file to include the SolicitudProfesorGrupoDaoImpl containing jar, but nothing changed. (Is that the Class-Path manifest information for?).

What I added to my aop module pom.xml file is:
      <plugin>
  |         <groupId>org.apache.maven.plugins</groupId>
  |         <artifactId>maven-jar-plugin</artifactId>
  |         <configuration>
  |           <archive>
  |             <index>true</index>
  |             <manifest>
  |               <addClasspath>true</addClasspath>
  |             </manifest>
  |             <!-- manifestEntries>
  |               <mode>development</mode>
  |               <url>${pom.url}</url>
  |               <key>value</key>
  |             </manifestEntries -->
  |           </archive>
  |         </configuration>
  |       </plugin>

Without any luck.

If I understand it correctly, my introduction, should only add some messages in the create. So, I think it shouldn't work also without the introduction, but it does work without it.

"stale.pedersen at jboss.org" wrote : i cant see any jboss aop related messages in your log; do you precompile the introduction, or is it done at loadtime?

I first tried to do it pre-compiling, but it didn't work either. (Or maybe I was doing some thing wrong). Now I'm trying to do it at loadtime. That way, I think, I reduce some of the risk of configuration errors (I'm very, very, new to maven2), and I have the injboss example to base on.

"stale.pedersen at jboss.org" wrote : hm, if you deployed the injboss example in the same appserver and it worked its possibly only a packaging issue thats causing it, but im not sure. - im rambling a bit here, but if youre still stuck try to provide some more info and ill look into it.

Well yes, I am deploying both projects to the same appserver, and I'm also still stuck with it. Some thing is getting broken with the introduction. I can't find why/what

I really appreciate your help.

I'm not sure what else to say/post. I could send the source code (about 3M), or the ear file (about 10M)... what ever you ask me to. That way you could comment and uncomment the jboss-aop.xml contents (sades-1.0-SNAPSHOT.ear\sades-aop-1.0-SNAPSHOT.aop\META-INF\jboss-aop.xml) and see with your own eyes the error messages.

(I'm using JBoss 4.2.1GA, JBoss-AOP 1.5.6, Maven-2.0.5, Windows XP Pro. I have installed jdk1.5.0_13 and jdk1.6.0_03, I'm pretty sure the 1.6 jdk is the active one).

I don't know if it helps, but here I put the beginning of the related source files. These files work perfectly with the jboss-aop.xml commented contents.  The last one is the one that doesn't get found with jboss-aop.xml uncommented contents.


// license-header java merge-point
  | //
  | // Attention: Generated code! Do not modify by hand!
  | // Generated by: SpringDao.vsl in andromda-spring-cartridge.
  | //
  | package org.andromda.samples.aop.sades.domain;
  | 
  | /**
  |  * @see org.andromda.samples.aop.sades.domain.SolicitudProfesorGrupo
  |  */
  | public interface SolicitudProfesorGrupoDao
  | {
  | ...

// license-header java merge-point
  | //
  | // Attention: Generated code! Do not modify by hand!
  | // Generated by: SpringHibernateDaoBase.vsl in andromda-spring-cartridge.
  | //
  | package org.andromda.samples.aop.sades.domain;
  | 
  | /**
  |  * <p>
  |  * Base Spring DAO Class: is able to create, update, remove, load, and find
  |  * objects of type <code>org.andromda.samples.aop.sades.domain.SolicitudProfesorGrupo</code>.
  |  * </p>
  |  *
  |  * @see org.andromda.samples.aop.sades.domain.SolicitudProfesorGrupo
  |  */
  | public abstract class SolicitudProfesorGrupoDaoBase
  |     extends org.springframework.orm.hibernate3.support.HibernateDaoSupport
  |     implements org.andromda.samples.aop.sades.domain.SolicitudProfesorGrupoDao
  | {
  | ...

// license-header java merge-point
  | /**
  |  * This is only generated once! It will never be overwritten.
  |  * You can (and have to!) safely modify it by hand.
  |  */
  | package org.andromda.samples.aop.sades.domain;
  | 
  | import org.hibernate.Criteria;
  | import org.hibernate.FetchMode;
  | import org.hibernate.criterion.Restrictions;
  | 
  | /**
  |  * @see org.andromda.samples.aop.sades.domain.SolicitudProfesorGrupo
  |  */
  | public class SolicitudProfesorGrupoDaoImpl
  |     extends org.andromda.samples.aop.sades.domain.SolicitudProfesorGrupoDaoBase
  | {
  | 
  |    public String stuff;  // agregado para probar AOP
  | 
  |     public SolicitudProfesorGrupoDaoImpl()
  |     {
  |       super();
  |       System.out.println("------ADENTRO----- CREATE ORIGINAL");
  |       System.out.println("------ADENTRO----- CREATE ORIGINAL");
  |     }
  | ...

(Note that the "------ADENTRO----- CREATE ORIGINAL" messages always appear in the JBoss console)

Thank you very much in advance.

(By the way, Before I decided to go to "loadtime" waving, I posted this message: http://www.jboss.com/index.html?module=bb&op=viewtopic&t=125000
I discovered later on, that some of the error messages I was thinking to be responsible for the problem also appeared in the JBoss console without the aspects, but didn't updated the info on the message thread. I'm don't remember now exactly which ones.) 

Ely

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

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



More information about the jboss-user mailing list