1 Reply Latest reply on Jul 4, 2012 2:17 AM by jaysensharma

    How to write the jboss-deployment-structure.xml file for a war file which should include the third party jar files

    hari309965

      {code}

      <?xml version='1.0' encoding='UTF-8'?>

      <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.1">

                <deployment>

                   <exclusions>

                        <module name="org.apache.log4j" />

                        <module name="com.sun.ssl.internal.ssl" />

                       <module name="com.myjars.jcommon" />

                       <module name="com.myjars.jfreechart" />

                   </exclusions>

                </deployment>         

              <!-- </sub-deployment>-->

      </jboss-deployment-structure>

       

      It is getting the message on the jboss console for this tag <module name="com.myjars.jfreechart" />

      Caused by: java.lang.ClassNotFoundException: org.jfree.data.time.RegularTimePeriod from [Module "deployment.OrionLite.wa

      r:main" from Service Module Loader]

       

       

      I have created the modules for those two jar files But I am getting the class not found exception for this <jfreechart.jar > file

       

      Could you please suggest me where should did I go wrong?

       

       

      Regards,

      Hari Kishore Y.

        • 1. Re: How to write the jboss-deployment-structure.xml file for a war file which should include the third party jar files
          jaysensharma

          HI Hari,

           

              First of all you will need to create a JFreechart  custom "module" as mentioned in the following link: 

              http://middlewaremagic.com/jboss/?p=1933    How to create custom modules in JBossAS7 to load different slots of the jars ?

           

              It means you can create  a directory "$JBOSS_HOME/com/myjars/jfreechart/main"  then paste your "jfreechart.jar" & "jcommon.jar" file inside the  "$JBOSS_HOME/com/myjars/jfreechart/main" directory and then create following kind of "$JBOSS_HOME/com/myjars/jfreechart/main/module.xml" 

           

          <?xml version="1.0" encoding="UTF-8"?>
          <module xmlns="urn:jboss:module:1.1" name="com.myjars.jfreechart">
                 <resources>
                     <resource-root path="jfreechart.jar"/>
                     <resource-root path="jcommon.jar"/>
                 </resources>
          </module>
          

           

              Restart JBossAS7, Then you can add your Custom Module inside your application using "WEB-INF/jboss-deployment-structure.xml" file as following:

           

          <?xml version="1.0" encoding="UTF-8"?>
          <jboss-deployment-structure>
              <deployment>
                   <dependencies>
                        <module name="com.myjars.jfreechart" />
                            <module name="com.myjars.jcommon" />
                  </dependencies>
              </deployment>
          </jboss-deployment-structure>
          
          1 of 1 people found this helpful