10 Replies Latest reply on Jan 13, 2014 3:09 AM by Anthony Patricio

    Switchyard and refactoring

    Anthony Patricio Master

      Hi guys,

      still trying to do very simple things.

      Simple interface, simple implementation.

      Promote service as esb impl.

      Create transformer.

      Then try to delete the service,

      Starting from here, the design tab doesn't complain BUT, the source tab always complains with weird unrelated errors like

      DescriptionResourcePathLocationType
      Referenced file contains errors (file:/home/apatrici/jbdevstudio/studio/plugins/org.switchyard.tools.xsd_1.1.1.v20131205-1627-H426-Final/schema/sca-binding-jca-1.1-cd04-rev2.xsd).  For more information, right click on the message in the Problems View and select "Show Details..."switchyard.xml/item-importer/src/main/resources/META-INFline 1XML Problem

       

       

      Regards,

      Anthony

        • 1. Re: Switchyard and refactoring
          Anthony Patricio Master

          seems to be due to "honour all schemas validations".

          • 2. Re: Switchyard and refactoring
            Anthony Patricio Master

            Still some annoying issues.

            Simple example:

            - start a component with no impl, just define its java interface as its contract.

            -> the designer doesn't complain, however the source code does.

             

            Since the source code is read only, we tend to forget it and drive all the development using the visual editor, this is error prone since all the problem are not reported there.

             

            Btw, I'm just providing feeback, no rant.

            • 3. Re: Switchyard and refactoring
              Keith Babo Master

              Anthony Patricio wrote:

              seems to be due to "honour all schemas validations".

               

              Yep, that's what it is.  We used to have a big note on the tooling install page which advised to disable that, but it looks like it's been removed.  At one point a fix was made to address this (automatically disabled that setting in the background), but I think there might have been a path where that fix didn't work.  In any case, I've restored the text for now to the install instructions and Rob can chime in on where things stand with that fix.

               

              Installing Eclipse Tooling - SwitchYard - Project Documentation Editor

              • 4. Re: Switchyard and refactoring
                Keith Babo Master

                Still some annoying issues.

                Simple example:

                - start a component with no impl, just define its java interface as its contract.

                -> the designer doesn't complain, however the source code does.

                 

                Since the source code is read only, we tend to forget it and drive all the development using the visual editor, this is error prone since all the problem are not reported there.

                 

                If you want to edit the source, you can open switchyard.xml in the XML editor.  In future versions, we will likely disable the source view in the graphical editor by default to avoid confusion. 

                 

                In terms of creating a partial content model which fails validation, this is deliberate to allow composites to be built in stages.  You may well want to spec out everything at an abstract level and then implement later or even give it to another person/team to implement.  The SY editor provides the ability to go top-down or bottom-up for development.

                • 5. Re: Switchyard and refactoring
                  Rob Cernich Master

                  That "honour all schema locations" flag should have been disabled when you created the project.  However, there is a case where it won't if the project was created, but Maven couldn't resolve the SY dependencies (e.g. no access to nexus, invalid version, etc.).  In that case, a simple right-click on the project, Maven->Update project... should fix the issue.

                  • 6. Re: Switchyard and refactoring
                    Anthony Patricio Master

                    Keith Babo wrote:

                     

                    If you want to edit the source, you can open switchyard.xml in the XML editor.  In future versions, we will likely disable the source view in the graphical editor by default to avoid confusion.

                    Not sure if that will help finding the errors.

                    Personalty I'd rather prefer to be able to edit the XML within the tab.

                    Having to switch from SY editor to XML editor then back to SY editor in not productive.

                    • 7. Re: Switchyard and refactoring
                      Rob Cernich Master

                      Hey Anthony,

                       

                      What deficiencies do you see with the SY editor?  What is driving you toward using the XML editor?

                       

                      Our goal is to make the SY editor as useful as possible, so developers can be productive without having to mess with raw XML.  Any feedback would be greatly appreciated.

                       

                      Thanks in advance,

                      Rob

                      • 8. Re: Switchyard and refactoring
                        Anthony Patricio Master

                        Rob Cernich wrote:

                         

                        That "honour all schema locations" flag should have been disabled when you created the project.  However, there is a case where it won't if the project was created, but Maven couldn't resolve the SY dependencies (e.g. no access to nexus, invalid version, etc.).  In that case, a simple right-click on the project, Maven->Update project... should fix the issue.

                        There is a contrast between

                        1- how fast you can design the SY app using the designer

                        2- and the nasty side effects like this XML trap.

                        I found another very irritating issue, I haven't been able to find what causes it.

                        *sometimes* while importing/creating/reopening a SY project, the project capabilities falls back to 1.0.0 where it was previously set to 1.1.0.

                        That is really annoying when you don't know what the problem is because your project is then full of errors. Thinking twice about it, that could even be a mix of the version capabilities and XML schema validations.

                        • 9. Re: Switchyard and refactoring
                          Rob Cernich Master

                          Hey Anthony,

                           

                          This is good to know.  I'm not sure why it would be falling back to 1.0, unless your switchyard.xml is referencing 1.0 namespaces (e.g. urn:switchyard-config:switchyard:1.0).  The tooling configures the capabilities based on this version.  Furthermore, changing the capabilities version should also update the namespaces used in the switchyard.xml file (e.g. to urn:switchyard-config:switchyard:1.1).  That said, if you're using 1.1 capabilities, with 1.0 dependencies, you may see errors coming from the m2e builder (maven execution failed, or something like that in the problems view, the text for the error may include xml validation errors, as the SwitchYard configure plugin validates the generated switchyard.xml file).

                           

                          If you could create a JIRA with details of the problem you are seeing, that would help a lot.

                           

                          Thanks again for the feedback,

                          Rob

                          • 10. Re: Switchyard and refactoring
                            Anthony Patricio Master

                            Hi Rob,

                            As soon as I manage to reproduce the problem, I'll open a jira.

                            Now that I have (definitely) unchecked the XML validation, it seems the projects are more stable.

                             

                            Talking about tooling, have you identified a massive resource usage while opening, let's say, 12 SY based projects? Runtime not running.