tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ryan McGuinness (JIRA)" <>
Subject [jira] [Created] (TOMEE-1490) Arquillian Test and Local context.xml file not loading correctly
Date Thu, 08 Jan 2015 22:04:34 GMT
Ryan McGuinness created TOMEE-1490:

             Summary: Arquillian Test and Local context.xml file not loading correctly
                 Key: TOMEE-1490
             Project: TomEE
          Issue Type: Bug
          Components: TomEE Arquillian Adapters
    Affects Versions: 1.7.1
            Reporter: Ryan McGuinness

When using a custom "webapp/META-INF/context.xml
    <Realm className="org.apache.catalina.realm.LockOutRealm">
            realmClass="example.service.SecurityRealm" />

Then build the shrink wrap to include it in deployment:
@Deployment(testable = true)
    public static WebArchive createDeployment() {
        WebAppDescriptor descriptor = Descriptors.create(WebAppDescriptor.class)
        File[] files = new File("src/main/resources/META-INF").listFiles();
        WebArchive war = ShrinkWrap.create(WebArchive.class, "example.war")
                .setWebXML(new StringAsset(descriptor.exportAsString()))
                .addPackages(true, "example")
                .addAsManifestResource(new File("src/main/webapp/META-INF/context.xml"))
                .addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"));
        for (File f : files) {
        return war;

The following error is thrown (regardless the realm definition):
Caused by: org.apache.catalina.LifecycleException: Failed to start component [Realm[LockOutRealm]]
	at org.apache.catalina.util.LifecycleBase.start(
	at org.apache.catalina.core.StandardContext.startInternal(
	at org.apache.catalina.util.LifecycleBase.start(
	... 99 more

This message was sent by Atlassian JIRA

View raw message