2 Replies Latest reply on Jun 15, 2011 8:13 AM by nzlinus

    Smooks 1.4 on ESB 4.9 SmooksConfigurationException (UNEDIFACT)

    nzlinus

      Hello, I know that running Smooks 1.4 on ESB 4.9 is not a supported configuration, but any ideas on this issue are appreciated. I've upgraded Smooks according to the Upgrading Smooks thread (http://community.jboss.org/message/584760?tstart=0) and everything is running smoothly, except when I try parsing UN/EDIFACT D96A messages, which results in the following error when trying to deploy:

       

      {quote}

      18:55:54,682 WARN  [HDScanner] Failed to process changes org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):  DEPLOYMENTS IN ERROR:   Deployment "jboss.esb.vfsfile:/home/linus/opt/jboss-5.1.0.GA/server/default-with-hornetq/deploy/transformer.esb/" is in error due to the following reason(s): org.milyn.cdr.SmooksConfigurationException: ContentHandler class member 'org.milyn.cdr.extension.NewResourceConfig#resource' must define a decoder through it's @ConfigParam annotation.  Unable to automatically determine DataDecoder from member type.

      {quote}

       

      smooks-d96a.xml:

       

      {code:xml}

      <?xml version="1.0"?>

      <smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"

                             xmlns:unedifact="http://www.milyn.org/xsd/smooks/unedifact-1.4.xsd">

       

          <unedifact:reader mappingModel="urn:org.milyn.edi.unedifact:d96a-mapping:1.4" />

       

      </smooks-resource-list>

      {code:xml}

      jboss-esb.xml:

       

       

      {code:xml}

      <?xml version="1.0"?>

      <jbossesb parameterReloadSecs="5"

                     xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.3.0.xsd"

                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                     xsi:schemaLocation="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.3.0.xsd http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.3.0.xsd">

                     <providers>

                                    <jms-provider connection-factory="XAConnectionFactory"

                                                   name="MonitorProvider">

                                                   <jms-bus busid="monitor_channel">

                                                                  <jms-message-filter dest-name="topic/esb_topic"

                                                                                 dest-type="TOPIC" />

                                                   </jms-bus>

                                    </jms-provider>

                     </providers>

                     <services>

                                    <service category="Transformers" description="Central point for broadcast messages"

                                                   name="TransformationService">

                                                   <listeners>

                                                                  <jms-listener busidref="monitor_channel" is-gateway="false"

                                                                                 name="MonitorListener" />

                                                   </listeners>

                                                   <actions>

                                                                  <action class="org.jboss.soa.esb.actions.SystemPrintln" name="pl1">

                                                                                 <property name="message"

                                                                                                value="************ Transformer Full Println 1 ************" />

                                                                                 <property name="printfull" value="true" />

                                                                  </action>

                                                                  <action class="org.jboss.soa.esb.smooks.SmooksAction" name="edi">

                                                                                 <property name="smooksConfig" value="/META-INF/smooks-d96a.xml" />

                                                                                 <property name="resultType" value="STRING" />

                                                                                 <property name="javaResultBeanId" value="transaction" />

                                                                                 <property name="reportPath" value="edi-report.html" />

                                                                  </action>

                                                   </actions>

                                    </service>

                     </services>

      </jbossesb>

       

       

      {code:xml}

       

      pom.xml:

       

      {code:xml}

      <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

                <modelVersion>4.0.0</modelVersion>

                <groupId>id.group</groupId>

                <artifactId>transformer</artifactId>

                <version>0.0.1-SNAPSHOT</version>

                <packaging>jar</packaging>

                <build>

                          <finalName>transformer</finalName>

                          <plugins>

                                    <plugin>

                                              <groupId>org.codehaus.mojo</groupId>

                                              <artifactId>jboss-packaging-maven-plugin</artifactId>

                                              <version>2.2</version>

                                              <extensions>true</extensions>

                                              <configuration>

                                                        <packaging>esb</packaging>

                                                        <explodedOnly>true</explodedOnly>

                                              </configuration>

                                              <executions>

                                                        <execution>

                                                                  <id>build-esb</id>

                                                                  <goals>

                                                                            <goal>esb</goal>

                                                                  </goals>

                                                        </execution>

                                              </executions>

                                    </plugin>

                                    <plugin>

                                              <groupId>org.apache.maven.plugins</groupId>

                                              <artifactId>maven-compiler-plugin</artifactId>

                                              <version>2.3.2</version>

                                              <configuration>

                                                        <source>1.6</source>

                                                        <target>1.6</target>

                                              </configuration>

                                    </plugin>

                          </plugins>

                </build>

                <dependencies>

                          <dependency>

                                    <groupId>org.milyn</groupId>

                                    <artifactId>milyn-smooks-edi</artifactId>

                                    <version>1.4</version>

                          </dependency>

                          <dependency>

                                    <groupId>org.milyn.edi.unedifact</groupId>

                                    <artifactId>d96a-mapping</artifactId>

                                    <version>1.4</version> <!-- base pom version - do not remove this comment -->

                          </dependency>

                </dependencies>

      </project>

       

      {code:xml}

       

      The Smooks configuration is almost exactly the same as in the examples for Smooks 1.4, and the exact same config works standalone.

       

      Anyone with ideas?

       

      Best regards /Linus

        • 1. Re: Smooks 1.4 on ESB 4.9 SmooksConfigurationException (UNEDIFACT)
          nzlinus

          Oops, an error seems to have snuck in above, the deployment error should be:

           

          {quote}

          DEPLOYMENTS IN ERROR:

            Deployment "jboss.esb.vfsfile:/home/linus/opt/jboss-5.1.0.GA/server/default-with-hornetq/deploy/transformer.esb/" is in error due to the following reason(s): org.milyn.cdr.SmooksConfigurationException: ContentHandler class member 'org.milyn.cdr.extension.NewResourceConfig#resource' must define a decoder through it's @ConfigParam annotation.  Unable to automatically determine DataDecoder from member type.

          {quote}

           

          • 2. Re: Smooks 1.4 on ESB 4.9 SmooksConfigurationException (UNEDIFACT)
            nzlinus

            OK, it appears that it was partly a ClassLoader issue, partly a pom/dependency issue. ClassLoading worked correctly after restarting JBoss AS with the package already in deploy. Adding:

             

            {code:xml}

            <dependency>

                 <groupId></groupId>

                 <artifactId>milyn-smooks-all</artifactId>

                 <version>1.4</version>

                 <scope>provided</scope>

            </dependency>

            <dependency>

                 <groupId></groupId>

                 <artifactId>milyn-smooks-core</artifactId>

                 <version>1.4</version>

                 <scope>provided</scope>

            </dependency>

            <dependency>

                 <groupId></groupId>

                 <artifactId>milyn-commons</artifactId>

                 <version>1.4</version>

                 <scope>provided</scope>

            </dependency>

            {code:xml}

            to pom.xml resolved the conflicts. This is already fixed in 1.5.