Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-2926

Missing dependency to com.google.guava in jberet

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Minor
    • 8.1.0.CR1, 8.1.0.Final
    • 8.0.0.Final
    • Batch
    • None
    • Hide

      1. deploy a batch application that throws exception
      2. run the batch application

      Show
      1. deploy a batch application that throws exception 2. run the batch application
    • Workaround Exists
    • Hide

      Add the com.google.guava to the module.xml for the JBeret module.

      Path to file

      $JBOSS_HOME/modules/system/layers/base/org/jberet/jberet-core/main/module.xml
      

      XML with the added module

      <?xml version="1.0" encoding="UTF-8"?>
      <module xmlns="urn:jboss:module:1.1" name="org.jberet.jberet-core">
          <properties>
              <property name="jboss.api" value="private"/>
          </properties>
      
          <resources>
              <resource-root path="jberet-core-1.0.0.Final.jar"/>
              <!-- Insert resources here -->
          </resources>
      
          <dependencies>
              <module name="javax.api"/>
              <module name="javaee.api"/>
              <module name="javax.transaction.api"/>
              <module name="org.jboss.jts"/>
              <module name="org.jboss.marshalling"/>
              <module name="org.jboss.logging"/>
              <module name="com.h2database.h2" optional="true"/>
              <module name="com.google.guava"/>
          </dependencies>
      </module>
      
      Show
      Add the com.google.guava to the module.xml for the JBeret module. Path to file $JBOSS_HOME/modules/system/layers/base/org/jberet/jberet-core/main/module.xml XML with the added module <?xml version= "1.0" encoding= "UTF-8" ?> <module xmlns= "urn:jboss:module:1.1" name= "org.jberet.jberet-core" > <properties> <property name= "jboss.api" value= "private" /> </properties> <resources> <resource-root path= "jberet-core-1.0.0.Final.jar" /> <!-- Insert resources here --> </resources> <dependencies> <module name= "javax.api" /> <module name= "javaee.api" /> <module name= "javax.transaction.api" /> <module name= "org.jboss.jts" /> <module name= "org.jboss.marshalling" /> <module name= "org.jboss.logging" /> <module name= "com.h2database.h2" optional= "true" /> <module name= "com.google.guava" /> </dependencies> </module>

    Description

      jberet uses guava but the module.xml does not declare a dependency on it. it makes occur unexpected exception java.lang.NoClassDefFoundError: com/google/common/base/Throwables

      I reported about it in a website http://www.nailedtothex.org/articles/jbatch/wildfly8finalguava/
      (it wrote in Japanese, but stacktraces are may be useful)

      Attachments

        Activity

          People

            jperkins-rhn James Perkins
            xkylex Kohei Nozaki (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: