0 Replies Latest reply on Mar 23, 2017 12:31 PM by arch9745

    problem loading dependent jars

    arch9745 Newbie

      Since jboss is actually wildfly, thought to post the question here as well.

       

      Having a problem with jar loading when one jar depends on another jar.  The jboss-deployment-structure.xml file has the following:

       

      <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.1">
        <deployment>
          <dependencies>
            <module name="deployment.ojdbc6.jar" />
            <module name="deployment.commons-fileupload-1.3.2.jar" />
            <module name="deployment.commons-io-2.5.jar" />
          </dependencies>
        </deployment>
      </jboss-deployment-structure>

       

      The jars were copied to the deployment folder and got deployed. The app picks up the commons-fileupload jar just fine, but not the commons-io which is needed by the commons-fileupload.  Why does one get picked up but not the other? Here is the error in the log:

       

      Caused by: java.lang.NoClassDefFoundError: org/apache/commons/io/IOUtils
          at org.apache.commons.fileupload.util.Streams.copy(Streams.java:123)
          at org.apache.commons.fileupload.util.Streams.copy(Streams.java:70)
          at org.apache.commons.fileupload.MultipartStream.readBodyData(MultipartStream.java:593)
          at org.apache.commons.fileupload.MultipartStream.discardBodyData(MultipartStream.java:617)
          at org.apache.commons.fileupload.MultipartStream.skipPreamble(MultipartStream.java:634)
          at

      org.apache.commons.fileupload.FileUploadBase$FileItemIteratorImpl.findNextItem(FileUploadBase.java:1023)
          at org.apache.commons.fileupload.FileUploadBase$FileItemIteratorImpl.<init>(FileUploadBase.java:1003)
          at org.apache.commons.fileupload.FileUploadBase.getItemIterator(FileUploadBase.java:310)
          at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:334)
          at org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.java:115)