9 Replies Latest reply on Apr 27, 2007 8:05 AM by Kevin Conner

    jbossesb-properties.xml filters

    Daniel Bevenius Master

      Hi,

      I just added a quickstart ( transform_CSV2XML ) and the only way I could the quickstart to deploy as an .esb archive to a jbossesb-server-4.2.MR1 server was to comment out the following in jbossesb-properties.xml:

       <properties name="filters">
       <property name="org.jboss.soa.esb.courier.filter.1" value="org.jboss.internal.soa.esb.message.metadata.MetaDataFilter"/>
       </properties>
      


      Has anyone experienced this before?

      Thanks

      /Daniel

        • 1. Re: jbossesb-properties.xml filters
          Kurt Stam Master

          WHat is the error? Can it not find the filter? Do you need to filter in your case?

          • 2. Re: jbossesb-properties.xml filters
            Daniel Bevenius Master

            Here is the error that is displayed in the server log:

            17:46:26,356 ERROR [JmsGatewayListener] Unexpected problem
            java.lang.IllegalArgumentException: null 'value' arg in method call.
             at org.jboss.internal.soa.esb.assertion.AssertArgument.isNotNull(AssertArgument.java:40)
             at org.jboss.internal.soa.esb.message.format.xml.PropertiesImpl.setProperty(PropertiesImpl.java:62)
             at org.jboss.internal.soa.esb.message.metadata.MetaDataFilter.onOutput(MetaDataFilter.java:121)
             at org.jboss.soa.esb.couriers.filter.FilterManager.doOutputWork(FilterManager.java:81)
             at org.jboss.internal.soa.esb.couriers.JmsCourier.deliver(JmsCourier.java:157)
             at org.jboss.internal.soa.esb.couriers.TwoWayCourierImpl.deliver(TwoWayCourierImpl.java:158)
             at org.jboss.soa.esb.listeners.gateway.JmsGatewayListener.doRun(JmsGatewayListener.java:165)
             at org.jboss.soa.esb.listeners.lifecycle.AbstractThreadedManagedLifecycle.run(AbstractThreadedManagedLifecycle.java:115)
             at java.lang.Thread.run(Thread.java:595)
            


            I don't need the filters ( not for this quickstart atleast ). I'm using the jbossesb-server-4.2.MR1 that is created by 'ant dist' to test the quickstart. I'll try some of the others quickstarts and see if I get the same error when running them.







            • 3. Re: jbossesb-properties.xml filters
              Kurt Stam Master

              Maybe Mark knows more about this. He just added this filtering stuff.

              • 4. Re: jbossesb-properties.xml filters
                Daniel Bevenius Master

                Ok, thanks. I'll check with Mark and see if he knows something about this.

                If you have time it would be great if you could take a look at the smooks transformation in the quickstart to make sure that this is the best way to do such a transformation.
                I'm currently doing it as a two step transformation, the first one from CSV -> "smooks intermediate xml" and the second from "smooks intermediate xml" -> target xml format.
                Is this the best way to do this to you think? This is the way we are doing it in the project I'm working so please let me know if there are better ways of doing this.

                Thanks



                • 5. Re: jbossesb-properties.xml filters
                  Tom Fennelly Master

                  Daniel, this looks fine, but I suspect you may run into problems if you have variable length CSV rows (i.e. with multiple line items as with the quickstart you added). Perhaps this isn't an issue for you in the real world.

                  This has prompted me with an idea however... The EdiSax parser is like the CSVParser in that it converts a non-xml stream (EDI stream) into a stream of SAX events, which are then used to build a DOM (intermediate XML as you've called it). However, the EdiSax parser is more powerful in that it can be configured to handle repeating segments etc (i.e. variable length segments like the line-items). It can also be configured to handle message formats with different delimiter types etc.

                  What I'm thinking is that it might be possible to use the EdiSax parser to parse CSV - just configure the field delimiter to be "," and the segment delimiter to be "& #10;" (linefeed).

                  • 6. Re: jbossesb-properties.xml filters
                    Daniel Bevenius Master

                    Our current requirements are not variable lenght but this might change , plus I might need to specifiy a different delimiter then a comma, so I'll change to the EdiSax parser and update the quickstart when I'm done.

                    Thanks!

                    • 7. Re: jbossesb-properties.xml filters
                      Mark Little Master

                      There was a bug in the filter not checking for all possible EPR types. Should be fixed.

                      • 8. Re: jbossesb-properties.xml filters
                        Kevin Conner Master

                        I have created a JIRA issue to track this.

                        • 9. Re: jbossesb-properties.xml filters
                          Kevin Conner Master

                          Daniel, I have just checked in the fix for this issue.

                          Let me know if there are any other problems.