Hi,

first, thank you for your fast reply. I've solved my problem. I'm very sorry because the problem was a very classpath error problem. Writing the ANT script I've omitted one jar lib ( I need to sleep more :)

Matthew Webster ha scritto:
Are the J2EE classes need to compiler your application e.g. javax.servlet.http.HttpServletRequest on the classpath in the weave step?
this was the problem.


best regards and thank you

Matthew Webster
AOSD Project
Java Technology Centre, MP146
IBM Hursley Park, Winchester,  SO21 2JN, England
Telephone: +44 196 2816139 (external) 246139 (internal)
Email: Matthew Webster/UK/IBM @ IBMGB, [EMAIL PROTECTED]
http://w3.hursley.ibm.com/~websterm/


*Stalsy <[EMAIL PROTECTED]>*
Sent by: [EMAIL PROTECTED]

08/01/2007 08:43
Please respond to
[email protected]


        
To
        [email protected]
cc
        
Subject
        [aspectj-users] Bytecode weaving problems



        





Hi All,

I try to weave binary aspects with some java bytecode classes using an
ANT task. I just have source code of the aspects. So I first compile
separately my aspects and than I weave them with my java ( pre-compiled
.class ) code. My ANT script is:

......
   <taskdef
resource="org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties">
       <classpath>
             <pathelement location="${lib.dir}/aspectjtools.jar"/>
       </classpath>
   </taskdef>
......
<!-- Aspect compilation -->
   <target name="compile" depends="prepare">
       <ajc destdir="${repos.J2EE.aspect.dir}">
<classpath refid="classpathAJ" /> <src location="${repos.J2EE.aspect.dir}" />
       </ajc>
   </target>
......
<!-- Bytecode weaving. Classpath includes tomcat, aspectj, and target application necessary libs -->
<target name="weave" depends="compile">
       <iajc destdir="${deploy.J2EE.out.webinf.classes.dir}"
inpathDirCopyFilter="**/CVS/*,**/*.java">
           <!-- Java classes-->
           <inpath>
               <pathelement location="${target.J2EE.classes.dir}"/>
               <pathelement location="${target.J2EE.all.dir}"/>
           </inpath>
           <!-- Binary aspect -->
           <aspectpath location="${repos.J2EE.aspect.dir}" />
           <classpath refid="classpath" />
       </iajc>
   </target>


So the compilation is ok, but when "weave task" is executed I receive
many errors like the following:

[iajc] C:\....profile\AddFeedAction.class [error] can't determine
superclass of missing type javax.servlet.http.HttpServletRequest
    [iajc] when weaving classes
    [iajc] when weaving
    [iajc] when batch building BuildConfig[null] #Files=0
    [iajc] [Xlint:cantFindType]
    [iajc] (no source information available)
    [iajc] C:\....profile\AddFeedAction.class [error] can't determine
superclass of missing type javax.servlet.http.HttpSession
    [iajc] when weaving classes
    [iajc] when weaving
    [iajc] when batch building BuildConfig[null] #Files=0
    [iajc] [Xlint:cantFindType]
    [iajc] (no source information available)
    [iajc] C:\....profile\AddFeedAction.class [error] can't determine
superclass of missing type javax.servlet.http.HttpServletRequest
    [iajc] when weaving classes
    [iajc] when weaving
    [iajc] when batch building BuildConfig[null] #Files=0
    [iajc] [Xlint:cantFindType]
    [iajc] (no source information available)
    .........

It seems to be a classpath error, but I have included all necessary libs.

Can you help me please? Where I am wrong?

best regards

--
Stalsy

 HomePage   --:. http://www.stalsy.it
 Blog       --:. http://blog.stalsy.com
 Public Key --:. http://www.stalsy.it/key.php
E-Mail --:. [EMAIL PROTECTED] MSN --:. [EMAIL PROTECTED]
 Skype      --:. www.stalsy.it




_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users

------------------------------------------------------------------------

_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users


--
Stalsy

 HomePage   --:. http://www.stalsy.it
 Blog       --:. http://blog.stalsy.com
 Public Key --:. http://www.stalsy.it/key.php
E-Mail --:. [EMAIL PROTECTED] MSN --:. [EMAIL PROTECTED]
 Skype      --:. www.stalsy.it




_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to