Vicky
Vicky

Reputation: 1225

Jboss eap-7.2: Adding external directory to a class-path

As per project need we need to migrate from jboss-eap-5.1.2 to jboss-eap-7.2 and for testing I was trying to deploy the war file in jboss-7.2. But it started giving me exception

rom relative location [mailsender.xml] Offending resource: class path resource [applicationContext.xml]; nested exception is org.springframework.beans.factory.BeanDefinitionStoreExcept ion: IOException parsing XML document from URL [vfs:/C:/dev/migration/jboss-eap-7.2-eap/bin/content/basel.war/WEB-INF/classes/mailsender.xml]; ne sted exception is java.io.FileNotFoundException: C:\dev\migration\jboss-eap-7.2-eap\standalone\tmp\vfs\temp\tempc01c1475a2367060\content-53d16429 03fec06a\WEB-INF\classes\mailsender.xml (The system cannot find the file specified)

i.e. file mailsender.xml is not added in the classpath.
Query : Is there any way in jboss-eap-7.2 to add a external folder(where I can put all of my XML's which needs to be present at the classpath) to classpath?

Upvotes: 0

Views: 2033

Answers (1)

This works for me in JBOSS EAP 7.1, where APP-INF/classes resource folder in ear or war: add META-INF/jboss-deployment-structure.xml with similar config:

<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
    <deployment>
        <resources>
            <resource-root path="APP-INF/classes" />
        </resources>
    </deployment>
</jboss-deployment-structure>

Upvotes: 2

Related Questions