3 Replies Latest reply on Jul 10, 2012 10:30 PM by fadc80

    jars are not loaded from the lib directory of a sar in JBoss AS 5

    fadc80

      Hi, I have a SAR application containing the following directory structure:

       

      classes

      lib

      META-INF

       

      The application was developed with old JBoss 4.2.3.AS and now is going to be deployed on version 5. However, the application is not getting up because jars are not loaded from the "lib" direcotry.

       

      It seems to be an issue according to

       

      https://issues.jboss.org/browse/JBAS-5900?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel#issue-tabs

       

       

      Unfortunately, I didn't get how to use the jboss-structure.xml as a workaround.

       

      Could anyone give me some advice?

        • 1. Re: jars are not loaded from the lib directory of a sar in JBoss AS 5
          pitani123

          Hi Fernado, Do you have solution to above problem? If you have solution, Can you please share with me? That would be great.

          • 2. Re: jars are not loaded from the lib directory of a sar in JBoss AS 5
            pitani123

            we can resolve this problem by adding jboss-structure.xml with following content in SAR file.

             

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

            <structure>

            <context>

            <path name=""/>

            <metaDataPath>

            <path name="META-INF"/>

            </metaDataPath>       

                    <classpath>

            <path name=""/>

            <path name="" suffixes=".jar" />

            <path name="lib" suffixes=".jar" />

            </classpath>

            </context>

            </structure>

            • 3. Re: jars are not loaded from the lib directory of a sar in JBoss AS 5
              fadc80

              I'd tried this before, but It didn't work. I got the following error:

               

              5:15:30,426 WARN  [VFSStructureBuilder] Error populating deployment vfsfile:/home/fadc80/jboss-5.0.1.GA/server/default/deploy/deploy.last/

              org.jboss.deployers.spi.DeploymentException: Unable to find class path entry ClassPathEntryImpl{path=lib suffixes=.jar} from deploy.last

               

              The application is deployed in "deploy.last" folder because it depends on a JBoss datasource. This was the only way I've found to make the datasource to be loaded before the SAR. I've indicated such a dependency in jboss-service.xml, but it didn't work.