Announcement Announcement Module
Collapse
No announcement yet.
"build path incomplete" error Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • "build path incomplete" error

    I am getting this error for /every/ bean in my config file. I can ctrl-cliick the classes and open the file. I can run the program correctly. The classes are indeed in the build path.

    Once I get these errors the only way I have found to get rid of them is to physically move the config file out the project, refresh, then bring the file back in. However, this only works for a bit. As soon as spring-ide has any issues (eg, I use a tag that spring-ide does not know) I get the errors again.

    I am using eclipse 3.3 the very latest spring-ide 2.0.

    I do get a lot of plugin errors, below are two. I'm wondering if there is some type of compatibly issues with ecipse 3.3?

    Code:
    org.eclipse.wst.sse.core.internal.util.Assert$AssertionFailedException
    	at org.eclipse.wst.sse.core.internal.util.Assert.isNotNull(Assert.java:124)
    	at org.eclipse.wst.sse.core.internal.model.ModelManagerImpl._getModelFor(ModelManagerImpl.java:385)
    	at org.eclipse.wst.sse.core.internal.model.ModelManagerImpl.getModelForRead(ModelManagerImpl.java:1082)
    	at org.springframework.ide.eclipse.aop.ui.navigator.AopReferenceModelNavigatorContentProvider.getResource(AopReferenceModelNavigatorContentProvider.java:450)
    	at org.springframework.ide.eclipse.aop.ui.navigator.AopReferenceModelNavigatorContentProvider.getChildren(AopReferenceModelNavigatorContentProvider.java:276)
    	at org.springframework.ide.eclipse.aop.ui.navigator.AopReferenceModelNavigatorContentProvider.getElements(AopReferenceModelNavigatorContentProvider.java:117)
    	at org.eclipse.ui.internal.navigator.extensions.SafeDelegateTreeContentProvider.getElements(SafeDelegateTreeContentProvider.java:97)
    	at org.eclipse.ui.internal.navigator.NavigatorContentServiceContentProvider.getElements(NavigatorContentServiceContentProvider.java:162)
    	at org.eclipse.jface.viewers.StructuredViewer.getRawChildren(StructuredViewer.java:937)
    	at org.eclipse.jface.viewers.ColumnViewer.getRawChildren(ColumnViewer.java:660)
    	at org.eclipse.jface.viewers.AbstractTreeViewer.getRawChildren(AbstractTreeViewer.java:1295)
    	at org.eclipse.jface.viewers.TreeViewer.getRawChildren(TreeViewer.java:366)
    	at org.eclipse.jface.viewers.AbstractTreeViewer.getFilteredChildren(AbstractTreeViewer.java:615)
    	at org.eclipse.jface.viewers.AbstractTreeViewer.getSortedChildren(AbstractTreeViewer.java:581)
    	at org.eclipse.jface.viewers.AbstractTreeViewer$1.run(AbstractTreeViewer.java:778)
    	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
    	at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:755)
    	at org.eclipse.jface.viewers.TreeViewer.createChildren(TreeViewer.java:615)
    	at org.eclipse.jface.viewers.AbstractTreeViewer.internalExpandToLevel(AbstractTreeViewer.java:1672)
    	at org.eclipse.jface.viewers.AbstractTreeViewer.expandToLevel(AbstractTreeViewer.java:1030)
    	at org.eclipse.jface.viewers.AbstractTreeViewer.expandToLevel(AbstractTreeViewer.java:1011)
    	at org.springframework.ide.eclipse.aop.ui.navigator.AopReferenceModelNavigator.refreshViewer(AopReferenceModelNavigator.java:119)
    	at org.springframework.ide.eclipse.aop.ui.navigator.AopReferenceModelNavigatorContentProvider$1.run(AopReferenceModelNavigatorContentProvider.java:547)
    	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
    	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123)
    	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3659)
    	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3296)
    Code:
    java.lang.IllegalArgumentException: can not calculate a model ID without a document reference
    	at org.eclipse.wst.sse.core.internal.FileBufferModelManager.calculateId(FileBufferModelManager.java:396)
    	at org.eclipse.wst.sse.core.internal.model.ModelManagerImpl._getModelFor(ModelManagerImpl.java:384)
    	at org.eclipse.wst.sse.core.internal.model.ModelManagerImpl.getModelForRead(ModelManagerImpl.java:1082)
    	at org.springframework.ide.eclipse.aop.ui.navigator.AopReferenceModelNavigatorContentProvider.getResource(AopReferenceModelNavigatorContentProvider.java:450)
    	at org.springframework.ide.eclipse.aop.ui.navigator.AopReferenceModelNavigatorContentProvider.getChildren(AopReferenceModelNavigatorContentProvider.java:276)
    	at org.springframework.ide.eclipse.aop.ui.navigator.AopReferenceModelNavigatorContentProvider.getElements(AopReferenceModelNavigatorContentProvider.java:117)
    	at org.eclipse.ui.internal.navigator.extensions.SafeDelegateTreeContentProvider.getElements(SafeDelegateTreeContentProvider.java:97)
    	at org.eclipse.ui.internal.navigator.NavigatorContentServiceContentProvider.getElements(NavigatorContentServiceContentProvider.java:162)
    	at org.eclipse.jface.viewers.StructuredViewer.getRawChildren(StructuredViewer.java:937)
    	at org.eclipse.jface.viewers.ColumnViewer.getRawChildren(ColumnViewer.java:660)
    	at org.eclipse.jface.viewers.AbstractTreeViewer.getRawChildren(AbstractTreeViewer.java:1295)
    	at org.eclipse.jface.viewers.TreeViewer.getRawChildren(TreeViewer.java:366)
    	at org.eclipse.jface.viewers.AbstractTreeViewer.getFilteredChildren(AbstractTreeViewer.java:615)
    	at org.eclipse.jface.viewers.AbstractTreeViewer.getSortedChildren(AbstractTreeViewer.java:581)
    	at org.eclipse.jface.viewers.AbstractTreeViewer$1.run(AbstractTreeViewer.java:778)
    	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
    	at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:755)
    	at org.eclipse.jface.viewers.TreeViewer.createChildren(TreeViewer.java:615)
    	at org.eclipse.jface.viewers.AbstractTreeViewer.internalExpandToLevel(AbstractTreeViewer.java:1672)
    	at org.eclipse.jface.viewers.AbstractTreeViewer.expandToLevel(AbstractTreeViewer.java:1030)
    	at org.eclipse.jface.viewers.AbstractTreeViewer.expandToLevel(AbstractTreeViewer.java:1011)
    	at org.springframework.ide.eclipse.aop.ui.navigator.AopReferenceModelNavigator.refreshViewer(AopReferenceModelNavigator.java:119)
    	at org.springframework.ide.eclipse.aop.ui.navigator.AopReferenceModelNavigatorContentProvider$1.run(AopReferenceModelNavigatorContentProvider.java:547)
    	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
    	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123)
    	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3659)
    	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3296)
    	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
    	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
    	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
    	at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
    	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
    	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
    	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
    	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153)
    	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
    	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
    	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
    	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    	at java.lang.reflect.Method.invoke(Method.java:597)
    	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504)
    	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
    	at org.eclipse.equinox.launcher.Main.run(Main.java:1169)

  • #2
    Wait, I think I found the trigger. Adding/removing "aop:aspectj-autoproxy" adds/removes the build path errors.
    Last edited by memelet; Jul 9th, 2007, 07:32 PM.

    Comment


    • #3
      Hi,

      the stacktraces you posted have are not linked with the build path incomplete problem. What version of Spring IDE are you using? This is quite interesting as this error has been addressed pre 2.0 final.

      What is exactly the error message you get as incomplete build path? You should a get a name of a missing class.

      Code:
      Build path is incomplete. Cannot find class file for {0}
      Please note that Spring IDE or the nested AspectJ rt needs all classes to which your class has a binary dependency on the Eclipse Project classpath. Quite helpful could be the output of the Spring AOP Event Trace View.

      Christian

      Comment


      • #4
        Good morning (from here) Christian,

        I'll gather up the AOP trace info shortly.

        As for the build path message, it is indeed of the format you showed. But the messages for are /every/ bean class="..", without exception. So I think the problem is more general. And if I remove the aop:aspect-autoproxy and save the config file all the error messages are cleared. It seems as if something is getting confused, not that there is really any missing classes or build path problem.

        Having said the above, as I was typing this, I used my running eclipse from when I posted last night, added the aop:aspectj-autoproxy to get the trace info, and, uhm, no errors. I am stymied.

        I am using the very latest spring-ide, which I updated yesterday. Let me track a bit more before I bother you anymore. Maybe it had something to do with eclipse not fully updating/refreshing the plugin cache or some such.

        thanks!!

        Comment


        • #5
          Hi Barry,

          looking forward to get some more info about the problem. I want to make sure that we tackle this issue down.

          Christian

          Comment


          • #6
            Ok, the reason I no longer get the error is because I had remove the spring nature.

            Below is the event trace (truncated due to forum limits). The missing classes are for /every/ bean class="..".

            The spring-ide version is 2.0.0.v200706271108

            Code:
            8:47:31 AM Spring IDE version 2.0.0.v200706271108
            8:47:36 AM Start building Spring AOP reference model from 2 file(s)
            8:47:36 AM Building Spring AOP reference model [/wsapi/src/prod/conf/xml-marshaller.ctx.xml]
            8:47:36 AM Deleted Spring AOP markers
            8:47:36 AM AOP reference model builder classpath: 
            
            ... (had to truncate, but all the required jars were included)
            
            8:47:36 AM Construted AOP reference model
            8:47:36 AM Created Spring AOP markers from reference model
            8:47:36 AM Done building Spring AOP reference model [/wsapi/src/prod/conf/xml-marshaller.ctx.xml]
            8:47:36 AM Building Spring AOP reference model [/wsapi/src/prod/web/WEB-INF/webservice-servlet.xml]
            8:47:36 AM Deleted Spring AOP markers
            8:47:37 AM AOP reference model builder classpath: 
            
            ... (had to truncate, but all the required jars were included)
            
            8:47:37 AM Aspect definition [\wsapi\src\prod\web\WEB-INF\webservice-servlet.xml:142] advise type [after] advise [com.foliofn.infra.ws.FaultExceptionMessageResolverAspect.resolveFaultMessageFromException(org.aspectj.lang.ProceedingJoinPoint, java.lang.Object, java.lang.Exception)]
            8:50:21 AM Processing bean definition [memberEndpoint (18) [com.foliofn.ws.endpoint.MemberEndpoint]] from resource [/wsapi/src/prod/web/WEB-INF/webservice-servlet.xml]
            8:50:21 AM Class dependency error [org/springframework/ws/soap/server/endpoint/SoapFaultDefinition] occured on aspect definition [Aspect definition [\wsapi\src\prod\web\WEB-INF\webservice-servlet.xml:142] advise type [after] advise [com.foliofn.infra.ws.FaultExceptionMessageResolverAspect.resolveFaultMessageFromException(org.aspectj.lang.ProceedingJoinPoint, java.lang.Object, java.lang.Exception)]] while processing bean [memberEndpoint (18) [com.foliofn.ws.endpoint.MemberEndpoint]]. Check if builder classpath is complete
            8:50:21 AM Processing bean definition [accountEndpoint (19) [com.foliofn.ws.endpoint.AccountEndpoint]] from resource [/wsapi/src/prod/web/WEB-INF/webservice-servlet.xml]
            8:50:21 AM Class dependency error [org/springframework/ws/soap/server/endpoint/SoapFaultDefinition] occured on aspect definition [Aspect definition [\wsapi\src\prod\web\WEB-INF\webservice-servlet.xml:142] advise type [after] advise [com.foliofn.infra.ws.FaultExceptionMessageResolverAspect.resolveFaultMessageFromException(org.aspectj.lang.ProceedingJoinPoint, java.lang.Object, java.lang.Exception)]] while processing bean [accountEndpoint (19) [com.foliofn.ws.endpoint.AccountEndpoint]]. Check if builder classpath is complete
            8:50:21 AM Processing bean definition [folioEndpoint (20) [com.foliofn.ws.endpoint.FolioEndpoint]] from resource [/wsapi/src/prod/web/WEB-INF/webservice-servlet.xml]
            8:50:21 AM Class dependency error [org/springframework/ws/soap/server/endpoint/SoapFaultDefinition] occured on aspect definition [Aspect definition [\wsapi\src\prod\web\WEB-INF\webservice-servlet.xml:142] advise type [after] advise [com.foliofn.infra.ws.FaultExceptionMessageResolverAspect.resolveFaultMessageFromException(org.aspectj.lang.ProceedingJoinPoint, java.lang.Object, java.lang.Exception)]] while processing bean [folioEndpoint (20) [com.foliofn.ws.endpoint.FolioEndpoint]]. Check if builder classpath is complete
            8:50:21 AM Processing bean definition [modelDetailsEndpoint (22) [com.foliofn.ws.endpoint.ModelDetailsEndpoint]] from resource [/wsapi/src/prod/web/WEB-INF/webservice-servlet.xml]
            8:50:21 AM Class dependency error [org/springframework/ws/soap/server/endpoint/SoapFaultDefinition] occured on aspect definition [Aspect definition [\wsapi\src\prod\web\WEB-INF\webservice-servlet.xml:142] advise type [after] advise [com.foliofn.infra.ws.FaultExceptionMessageResolverAspect.resolveFaultMessageFromException(org.aspectj.lang.ProceedingJoinPoint, java.lang.Object, java.lang.Exception)]] while processing bean [modelDetailsEndpoint (22) [com.foliofn.ws.endpoint.ModelDetailsEndpoint]]. Check if builder classpath is complete
            8:50:21 AM Processing bean definition [folio1.facade (27) [com.foliofn.ws.folio1.BusinessFacade]] from resource [/wsapi/src/prod/web/WEB-INF/webservice-servlet.xml]
            8:50:21 AM Class dependency error [org/springframework/ws/soap/server/endpoint/SoapFaultDefinition] occured on aspect definition [Aspect definition [\wsapi\src\prod\web\WEB-INF\webservice-servlet.xml:142] advise type [after] advise [com.foliofn.infra.ws.FaultExceptionMessageResolverAspect.resolveFaultMessageFromException(org.aspectj.lang.ProceedingJoinPoint, java.lang.Object, java.lang.Exception)]] while processing bean [folio1.facade (27) [com.foliofn.ws.folio1.BusinessFacade]]. Check if builder classpath is complete
            8:50:21 AM Processing bean definition [folio1.securityService (30) [com.foliofn.ws.folio1.spi.SecurityService]] from resource [/wsapi/src/prod/web/WEB-INF/webservice-servlet.xml]
            8:50:21 AM Class dependency error [org/springframework/ws/soap/server/endpoint/SoapFaultDefinition] occured on aspect definition [Aspect definition [\wsapi\src\prod\web\WEB-INF\webservice-servlet.xml:142] advise type [after] advise [com.foliofn.infra.ws.FaultExceptionMessageResolverAspect.resolveFaultMessageFromException(org.aspectj.lang.ProceedingJoinPoint, java.lang.Object, java.lang.Exception)]] while processing bean [folio1.securityService (30) [com.foliofn.ws.folio1.spi.SecurityService]]. Check if builder classpath is complete
            8:50:21 AM Processing bean definition [folio1.memberService (31) [com.foliofn.ws.folio1.spi.MemberService]] from resource [/wsapi/src/prod/web/WEB-INF/webservice-servlet.xml]
            8:50:21 AM Class dependency error [org/springframework/ws/soap/server/endpoint/SoapFaultDefinition] occured on aspect definition [Aspect definition [\wsapi\src\prod\web\WEB-INF\webservice-servlet.xml:142] advise type [after] advise [com.foliofn.infra.ws.FaultExceptionMessageResolverAspect.resolveFaultMessageFromException(org.aspectj.lang.ProceedingJoinPoint, java.lang.Object, java.lang.Exception)]] while processing bean [folio1.memberService (31) [com.foliofn.ws.folio1.spi.MemberService]]. Check if builder classpath is complete
            8:50:21 AM Processing bean definition [folio1.accountService (32) [com.foliofn.ws.folio1.spi.AccountService]] from resource [/wsapi/src/prod/web/WEB-INF/webservice-servlet.xml]
            8:50:21 AM Class dependency error [org/springframework/ws/soap/server/endpoint/SoapFaultDefinition] occured on aspect definition [Aspect definition [\wsapi\src\prod\web\WEB-INF\webservice-servlet.xml:142] advise type [after] advise [com.foliofn.infra.ws.FaultExceptionMessageResolverAspect.resolveFaultMessageFromException(org.aspectj.lang.ProceedingJoinPoint, java.lang.Object, java.lang.Exception)]] while processing bean [folio1.accountService (32) [com.foliofn.ws.folio1.spi.AccountService]]. Check if builder classpath is complete
            8:50:21 AM Processing bean definition [folio1.folioService (33) [com.foliofn.ws.folio1.spi.FolioService]] from resource [/wsapi/src/prod/web/WEB-INF/webservice-servlet.xml]
            8:50:21 AM Class dependency error [org/springframework/ws/soap/server/endpoint/SoapFaultDefinition] occured on aspect definition [Aspect definition [\wsapi\src\prod\web\WEB-INF\webservice-servlet.xml:142] advise type [after] advise [com.foliofn.infra.ws.FaultExceptionMessageResolverAspect.resolveFaultMessageFromException(org.aspectj.lang.ProceedingJoinPoint, java.lang.Object, java.lang.Exception)]] while processing bean [folio1.folioService (33) [com.foliofn.ws.folio1.spi.FolioService]]. Check if builder classpath is complete
            8:50:21 AM Processing bean definition [folio1.folioModelService (35) [com.foliofn.ws.folio1.spi.FolioModelService]] from resource [/wsapi/src/prod/web/WEB-INF/webservice-servlet.xml]
            
            ... (truncated)
            
            8:50:21 AM Processing bean definition [com.foliofn.ws.message.ObjectFactory#1950bac (25) [com.foliofn.ws.message.ObjectFactory]] from resource [/wsapi/src/prod/conf/xml-marshaller.ctx.xml]
            8:50:21 AM Class dependency error [org/springframework/ws/soap/server/endpoint/SoapFaultDefinition] occured on aspect definition [Aspect definition [\wsapi\src\prod\web\WEB-INF\webservice-servlet.xml:142] advise type [after] advise [com.foliofn.infra.ws.FaultExceptionMessageResolverAspect.resolveFaultMessageFromException(org.aspectj.lang.ProceedingJoinPoint, java.lang.Object, java.lang.Exception)]] while processing bean [com.foliofn.ws.message.ObjectFactory#1950bac (25) [com.foliofn.ws.message.ObjectFactory]]. Check if builder classpath is complete
            8:50:21 AM Construted AOP reference model
            8:50:21 AM Created Spring AOP markers from reference model
            8:50:21 AM Done building Spring AOP reference model [/wsapi/src/prod/web/WEB-INF/webservice-servlet.xml]
            8:50:21 AM Timer event: 1253ms: Processing took

            Comment


            • #7
              Hmm, that seems to be related to the class:
              Code:
              org/springframework/ws/soap/server/endpoint/SoapFaultDefinition
              Where is this referenced in your code? Can you show me the FaultExceptionMessageResolverAspect (only signatures and @Aspect annotations are enough).

              Thanks

              Christian

              Comment


              • #8
                Below is the aspect.

                At runtime I am getting this error, surely this must have something do with the problem

                Code:
                [#|2007-07-10T09:43:39.198-0400|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=19;_ThreadName=httpSSLWorkerThread-8080-0;|July 10, 2007 09:43:39 AM EDT:2510:DEBUG :httpSSLWorkerThread-8080-0 :AspectJExpressionPointcut.matches:221: PointcutExpression matching rejected target class
                org.aspectj.weaver.BCException: Do not call nameToSignature with something that looks like a signature (descriptor): '[Ljava.lang.Class;'ased
                |#]
                Code:
                @Aspect
                public class FaultExceptionMessageResolverAspect {
                
                    public static final String EX_MESSAGE_KEY = "{ex.message}";
                
                    private final Logger log = Logger.getLogger(this.getClass());
                
                    @Pointcut("execution(org.springframework.ws.soap.server.endpoint.SoapFaultDefinition org.springframework.ws.soap.server.endpoint.AbstractSoapFaultDefinitionExceptionResolver+.getFaultDefinition(Object,Exception))"
                            + "&& args(endpoint, ex)")
                    @SuppressWarnings("unused")
                    public void getFaultDefinition(Object endpoint, Exception ex) {}
                
                    @Around("getFaultDefinition(endpoint, ex)")
                    public SoapFaultDefinition resolveFaultMessageFromException(ProceedingJoinPoint pjp, Object endpoint, Exception ex) throws Throwable {
                        log.error("Endpoint exception: endpoint= " + endpoint.toString(), ex);
                        SoapFaultDefinition faultDefinition = (SoapFaultDefinition)pjp.proceed();
                        replaceFaultStringWithExceptionMessage(faultDefinition, ex);
                        return faultDefinition;
                    }
                
                    public static void replaceFaultStringWithExceptionMessage(SoapFaultDefinition faultDefinition, Exception ex) {
                        if (faultDefinition != null) {
                            if (faultDefinition.getFaultStringOrReason().equals(EX_MESSAGE_KEY)) {
                                faultDefinition.setFaultStringOrReason(ex.getMessage());
                            }
                        }
                    }
                }

                Comment


                • #9
                  Well I removed all references to SoapFaultDefinition from the aspect (changed the around advice to return Object). That got rid of those errors, but now I get the same for other classes.

                  So it seams that the problem is not with a specific class, but that the classpath spring-ide is using somehow gets corrupted.

                  Comment


                  • #10
                    I'll look into this. I think I have some really good information now to reproduce it (hopefully).

                    Just for curiosity: Is the project your are working an Aspect enabled one (having the AJDT nature)?

                    Christian

                    Comment


                    • #11
                      I run both with and without the aspectj nature. Same issue with spring-ide.

                      thanks!!

                      Comment


                      • #12
                        That is strange. I just copied your Aspect definition and included it in one of my sample project. It works without any error; though it certainly doesn't match any bean, because the getFaultDefinition method is protected, so it can't match in Spring AOP.

                        Can you show me your .classpath file?

                        Christian

                        Comment


                        • #13
                          I replaced the aspect with...

                          Code:
                          @Aspect
                          public class TestAspect {
                          
                              @Pointcut("execution(* *.getFaultDefinition(..))")
                              public void getFaultDefinition() {}
                          
                              @Around("getFaultDefinition()")
                              public Object resolveFaultMessageFromException() throws Throwable {
                                  return null;
                              }
                          }
                          And still get the errors. The project that contains this aspect and config depends on a chain of other projects:

                          wsapi
                          - depends on
                          -- infra.ws
                          --- build path exports all the spring-ws jars
                          -- infra
                          --- build path exports all the spring jars
                          -- thirdparty
                          --- contains the physical jars which are included the above build paths

                          Instead I have created a hello-aspect project. Here are the steps I took
                          1. Basic project with config file that contained aop:aspectj-autoproxy, a simple aspect, and a simple class.
                          - There were no errors (however my trivial pointcut did not show up in the xref, but it seemed from trace that it got weaved, but I'm not sure)
                          2. Added all the spring jars to the project
                          - Still no errors

                          Here is the code at this point:

                          Code:
                          public class TestClass {
                              public void doit() {
                                  // noop
                              }
                          }
                          ----
                          @Aspect
                          public class TestAspect {
                          
                              @Pointcut("execution(* *.doit(..))")
                              public void pc() {}
                          
                              @Around("pc()")
                              public Object behavior() throws Throwable {
                                  return null;
                              }
                          }
                          ----
                          <aop:aspectj-autoproxy/>
                          <bean class="test.TestAspect"/>
                          <bean class="test.TestClass"/>
                          3. Now I simply add an argument to TestClass.doit from the spring-ws :

                          Code:
                          import org.springframework.ws.context.MessageContext;
                          
                          public class TestClass {
                          
                              public void doit(MessageContext messageContext) {
                                  // noop
                              }
                          }
                          Bang. I have the build path errors.

                          4. So I change doit to depend on something more basic:

                          Code:
                          import org.springframework.core.io.Resource;
                          
                          public class TestClass {
                          
                              public void doit(Resource resource) {
                                  // noop
                              }
                          }
                          Errors are gone! Ok, we're on to something...

                          5. Now I will try something really simple from spring-ws.

                          Code:
                          import org.springframework.ws.WebServiceMessage;
                          
                          public class TestClass {
                          
                              public void doit(WebServiceMessage a) {
                                  // noop
                              }
                          }
                          Errors are back. WebServiceMessage is:

                          Code:
                          import java.io.IOException;
                          import java.io.OutputStream;
                          import javax.xml.transform.Result;
                          import javax.xml.transform.Source;
                          
                          public interface WebServiceMessage {
                              Source getPayloadSource();
                              Result getPayloadResult();
                              void writeTo(OutputStream outputStream) throws IOException;
                              boolean hasFault();
                              String getFaultReason();
                          }
                          All WebServiceMessage dependencies are on the JDK.

                          6. Now I will try something from spring-ws that depends on even less: TransportException, which is:

                          Code:
                          import java.io.IOException;
                          
                          public abstract class TransportException extends IOException {
                              protected TransportException(String msg) {
                                  super(msg);
                              }
                          }
                          Errors remain.

                          At this point I don't what else to do. What could it be about the spring-ws jars that triggers this behavior (if indeed that is the real root cause). Any advice? I'll attach my project...

                          cheers

                          -barry

                          Comment


                          • #14
                            Thanks Barry for these very comprehensive instructions: You found a bug in Spring IDE's class path handling.

                            The problem with your setup is that Spring IDE does not create correct file urls for libraries that are linked from another project. In your case all libs are linked in from the 'thirdparty' project. See the classpath debug output in the Spring AOP Event Trace View to verfiy that the classpath shows all the jars, but some with a wrong file path.

                            Good message here: I've tried to fix this. Please install a svn head snapshot from http://springide.org/bamboo/download...tesite_nightly (this url can be used as eclipse update site) and verify if this fixed the issue.

                            Thanks again.

                            Christian

                            Comment


                            • #15
                              Cool, thanks!

                              The update site seems a bit incomplete however:

                              org.eclipse.update.internal.core.FatalIOException: Server returned HTTP response code: "404 Not Found" for URL: http://springide.org/bamboo/download...0706291131.jar.

                              Comment

                              Working...
                              X