| Hi 
Ron,   flow services compiled 
with AspectJ, but without any aspect, is exetuble without an error. If the 
aspect is added to the flow service, than it is not possible to run the flow 
service.   It is not possible to 
set a breakpoint on this exception. Flow services are grouped by packages. A 
package is a jar file. If IS is running, one can use the Administrator web 
interface to load the package. I think the classes of the package are added to 
the VM of the IS at runtime. I'm sure that all necessary files are available at 
the IS, because Eclipse is configured that way. How do I compile using 
Ant?   Wes wrote, that maybe 
file aspectjrt.jar is not available on IS. I checked it and it is 
available, so this is correct.     Sascha     
-----Ursprüngliche Nachricht----- Von: 
aspectj-dev-admin@xxxxxxxxxxx [mailto:aspectj-dev-admin@xxxxxxxxxxx]Im 
Auftrag von Ron Bodkin
 Gesendet: Montag, 9. Februar 2004 
00:11
 An: aspectj-dev@xxxxxxxxxxx
 Betreff: Re: AW: AW: 
[aspectj-dev] Weaved code is faulty
 
 
 
  Sascha,   What happens if you compile the class without compiling in your tracing 
  aspect? Does it work? Can you set a breakpoint on this exception in a Java 
  debugger?   Can you run the code the AspectJ compiler compiles? How are you deploying 
  the compiled classes? Are you sure you're copying or jarring all of the right 
  ones? Can you try compiling with ant?   Ron Bodkin Chief Technology Officer New Aspects of Software m: (415) 509-2895     
    ------------Original Message------------ From: "Sascha Benkart" <Sascha.Benkart@xxxxxx> To: <aspectj-dev@xxxxxxxxxxx> Date: Sun, Feb-8-2004 3:05 PM Subject: AW: AW: [aspectj-dev] Weaved code is faulty 
      Here is my aspect 
      I used to test within IS: public aspect 
      MethodTracing{
 pointcut tracedMethods() : execution(* 
      *.*(..));
 
 before() : tracedMethods()
 {
 System.out.println("Hello");
 }
 
 after() 
      : 
      tracedMethods()
 {
 System.out.println("bye");
 }
 
 before() 
      throwing(Exception e) : tracedMethods()
 {
 System.out.println("Error");
 }
 }
     
      
      
      Hi 
      Ron,   the error message 
      is as following: Could not run 
      'mergeDocToPipeline'.   com.wm.app.b2b.server.ServiceException: 
      [ISS.0026.9102] Service 
      'sandbox:mergeDocToPipeline' is not operational. To run this 
      service, first recompile the Java source.   ServiceException 
      is a class by webMethods. I cannot get any further information, not even 
      using Remote Debugging by Eclipse. The Exception is thrown "deep inside" 
      the IS.   I'm using AJC 
      within Eclipse 2.1.   There is no 
      problem running the flow service woven without any 
      aspect.   bye, Sascha       Mit freundlichen Grüßen Sascha Benkart Behrstr. 10, 73240 Wendlingenfon: +49 
      7024.50 14 84
 fax: +49 7024.50 14 85
 mob: +49 171.735 09 56
 mail: 
      sascha@xxxxxxxxxxx
 
        
        Hi Sascha,   What exactly happens when you weave the Flow class? What error are 
        you seeing? Are you compiling the code with ajc or with javac? Does it 
        work if you compile with ajc but don't have any aspects involved?   Ron Bodkin Chief Technology Officer New Aspects of Software m: (415) 509-2895     
          ------------Original Message------------ From: "Sascha Benkart" <Sascha.Benkart@xxxxxx> To: <aspectj-dev@xxxxxxxxxxx> Date: Sun, Feb-8-2004 10:55 AM Subject: AW: [aspectj-dev] Weaved code is faulty Ok, but can you tell me how to find the 
          problem why AspectJ woven code cannot be run within Integration 
          Server. What is modified by the Weaver? webMethods told me, that they never tested 
          their code with AspectJ and so it is not supported. But I really want 
          to use AspectJ, because it makes life easier for 
          me.   -----Ursprüngliche 
          Nachricht-----
 Von: aspectj-dev-admin@xxxxxxxxxxx 
          [mailto:aspectj-dev-admin@xxxxxxxxxxx]Im Auftrag von Jim 
          Hugunin
 Gesendet: Sonntag, 8. Februar 2004 
          18:58
 An: aspectj-dev@xxxxxxxxxxx
 Betreff: RE: 
          [aspectj-dev] Weaved code is faulty
 
 
 
            
            This is 
            almost certainly a bug in the decompiler that youre using, not in 
            the weaver.  Both of the decompiled sources that you show 
            have a lot of bad code in them (see break MISSING_BLOCK_LABEL_NN for 
            example).  To confirm that theres nothing wrong with the woven 
            code, you can use javap or another tool to inspect the bytecode 
            directly.   This 
            problem is not AspectJs, but the fault of some not very clever 
            decompilers.  Nevertheless, we do have an open enhancement 
            request to make life easier for the decompilers and if time permits 
            we will look into this.  As with all enhancement requests, a 
            working patch would increase the priority 
            immensely.   https://bugs.eclipse.org/bugs/show_bug.cgi?id=46298   -Jim     
            
            
            
 From: 
            aspectj-dev-admin@xxxxxxxxxxx [mailto:aspectj-dev-admin@xxxxxxxxxxx] 
            On Behalf Of Sascha 
            BenkartSent: 
            Sunday, February 08, 2004 4:22 AM
 To: 
            aspectj-dev@xxxxxxxxxxx
 Subject: [aspectj-dev] Weaved 
            code is faulty
   
            I'm using AspectJ 1.1.1 
            with webMethods Integration 
            Server 6.0.1 
            (IS, eEnabling 
            platform), running on Java 1.4. 
            After weaving a so 
            called flow service (a Java class), I can't run the flow service 
            within the IS. First I didn't know what's wrong with the code, 
            because outside IS there is no problem to run AspectJ weaved 
            code. 
            So I decompiled a class 
            weaved by AspectJ. First lets have a look at the source before 
            weaving: 
            // Source code before 
            using AspaectJ 
            import 
            com.wm.app.b2b.server.ServiceException;import 
            com.wm.data.*;
 
            public final class 
            sandbox{
 
             static sandbox 
            _newInstance(){
 return new 
            sandbox();
 }
 
             static sandbox 
            _cast(Object o){
 return 
            (sandbox)o;
 }
 
             public static 
            final void mergeDocToPipeline(IData pipeline)throws 
            ServiceException
 {
 IDataCursor 
            pipelineCursor = pipeline.getCursor();
 IData document 
            = IDataUtil.getIData(pipelineCursor, 
            "document");
 pipelineCursor.destroy();
 if(document 
            != null)
 IDataUtil.append(document, 
            pipeline);
 }
 
             static final 
            sandbox _instance = new sandbox(); 
            Method _newInstance and 
            _cast are standard methods of a IS class. Method 
            mergeDocToPipeline defines a flow service and is not from great 
            interest of this problem. 
            Now, lets look at the 
            decompiled class after WEAVING: 
            // Source code after 
            using AspectJ 
            import 
            com.wm.app.b2b.server.ServiceException;import 
            com.wm.data.*;
 
            public final class 
            sandbox{
 
             static sandbox 
            _newInstance(){
 MethodTracing.aspectOf().ajc$before$MethodTracing$1b3();
 new 
            sandbox();
 break 
            MISSING_BLOCK_LABEL_25;
 Throwable 
            throwable;
 throwable;
 MethodTracing.aspectOf().ajc$after$MethodTracing$1fc();
 throw 
            throwable;
 MethodTracing.aspectOf().ajc$after$MethodTracing$1fc();
 return;
 Exception 
            exception;
 exception;
 MethodTracing.aspectOf().ajc$afterThrowing$MethodTracing$241(exception);
 throw 
            exception;
 }
 
             static sandbox 
            _cast(Object 
            o){
 MethodTracing.aspectOf().ajc$before$MethodTracing$1b3();
 (sandbox)o;
 break 
            MISSING_BLOCK_LABEL_22;
 Throwable 
            throwable;
 throwable;
 MethodTracing.aspectOf().ajc$after$MethodTracing$1fc();
 throw 
            throwable;
 MethodTracing.aspectOf().ajc$after$MethodTracing$1fc();
 return;
 Exception 
            exception;
 exception;
 MethodTracing.aspectOf().ajc$afterThrowing$MethodTracing$241(exception);
 throw 
            exception;
 }
 
             public static 
            final void mergeDocToPipeline(IData pipeline)throws 
            ServiceException
 {
 try
 {
 try
 {
 MethodTracing.aspectOf().ajc$before$MethodTracing$1b3();
 IDataCursor 
            pipelineCursor = 
            pipeline.getCursor();
 IData document = 
            IDataUtil.getIData(pipelineCursor, 
            "document");
 pipelineCursor.destroy();
 if(document 
            != null)
 IDataUtil.append(document, 
            pipeline);
 }
 catch(Throwable 
            throwable)
 {
 MethodTracing.aspectOf().ajc$after$MethodTracing$1fc();
 throw 
            throwable;
 }
 MethodTracing.aspectOf().ajc$after$MethodTracing$1fc();
 return;
 }
 catch(Exception 
            exception)
 {
 MethodTracing.aspectOf().ajc$afterThrowing$MethodTracing$241(exception);
 throw 
            exception;
 }
 }
 
             static final 
            sandbox _instance = new sandbox(); 
            Looking again at methods 
            _newInstance and _cast. Both methods return nothing (See code 
            return;)! I'm not sure if this 
            is a problem of the decompiler, so I decompiled the class not 
            weaved by AspectJ and it looks like the original 
            former class. 
            Is it possible that 
            AspectJ weaves classes with methods _cast or _newInstance in a wrong 
            way? |