{"record":{"id":"4c37b336c513c7c2","repo":"quarkusio/quarkus","slug":"unknown-archive-type-deploymentarchive","errorCode":null,"errorMessage":"Unknown archive type: ${deploymentArchive}","messagePattern":"Unknown archive type: (.+?)","errorType":"exception","errorClass":"DeploymentException","httpStatus":null,"severity":"error","filePath":"independent-projects/arc/tcks/arquillian/src/main/java/io/quarkus/arc/arquillian/Deployer.java","lineNumber":65,"sourceCode":"    private final DeploymentDir deploymentDir;\n    private final String testClass;\n\n    private final List<BeanArchive> beanArchives = new ArrayList<>();\n\n    Deployer(Archive<?> deploymentArchive, DeploymentDir deploymentDir, String testClass) {\n        this.deploymentArchive = deploymentArchive;\n        this.deploymentDir = deploymentDir;\n        this.testClass = testClass;\n    }\n\n    DeploymentClassLoader deploy() throws DeploymentException {\n        try {\n            if (deploymentArchive instanceof JavaArchive) {\n                explodeJar();\n            } else if (deploymentArchive instanceof WebArchive) {\n                explodeWar();\n            } else {\n                throw new DeploymentException(\"Unknown archive type: \" + deploymentArchive);\n            }\n\n            generate();\n\n            return new DeploymentClassLoader(deploymentDir);\n        } catch (IOException | ExecutionException | InterruptedException e) {\n            throw new DeploymentException(\"Deployment failed\", e);\n        }\n    }\n\n    private void explodeJar() throws IOException {\n        Archives.explode(deploymentArchive, \"/\", deploymentDir.appClasses);\n\n        BeanArchive beanArchive = BeanArchive.detect(deploymentArchive);\n        if (beanArchive != null) {\n            beanArchives.add(beanArchive);\n        }\n    }","sourceCodeStart":47,"sourceCodeEnd":83,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/arc/tcks/arquillian/src/main/java/io/quarkus/arc/arquillian/Deployer.java#L47-L83","documentation":"ArC's Arquillian TCK Deployer explodes the given deployment archive (jar or war) into a directory to run bean processing. If the archive passed to deploy() is neither a JavaArchive nor a WebArchive, the framework does not know how to explode it and throws DeploymentException. This is a defensive guard against unsupported archive types.","triggerScenarios":"Calling Deployer.deploy() with an archive object that is not an instance of org.jboss.shrinkwrap.api.spec.JavaArchive or WebArchive (e.g. an EnterpriseArchive/ear or a custom Archive implementation).","commonSituations":"Running the CDI TCK against a test deployment that produces an EAR archive, or a custom Arquillian protocol that wraps archives in a non-standard type; version changes where the archive type changed.","solutions":["Change the test deployment to produce a JavaArchive (JAR) or WebArchive (WAR) via ShrinkWrap.create(JavaArchive.class/War.class, ...).","If an EAR is required, extract the inner jar/war module and deploy that instead.","Inspect the actual runtime class of the archive and add support (explode method) for it in Deployer if it is a legitimate new type."],"exampleFix":"// before\nWebArchive war = ShrinkWrap.create(EnterpriseArchive.class, \"test.ear\")...; deployer.deploy(ear);\n// after\nJavaArchive jar = ShrinkWrap.create(JavaArchive.class, \"test.jar\")\n        .addPackages(true, \"org.acme\")\n        .addAsManifestResource(EmptyAsset.INSTANCE, \"beans.xml\");\ndeployer.deploy(jar);","handlingStrategy":"validation","validationCode":"if (!(archive instanceof JavaArchive) && !(archive instanceof WebArchive)) {\n    throw new IllegalArgumentException(\"Deployer supports only JavaArchive/WebArchive, got: \" + archive.getClass().getName());\n}\ndeployer.deploy(archive);","typeGuard":"static boolean isSupportedArchive(Object a) {\n    return a instanceof JavaArchive || a instanceof WebArchive;\n}","tryCatchPattern":"try {\n    deployer.deploy(archive);\n} catch (DeploymentException e) {\n    if (e.getMessage().startsWith(\"Unknown archive type\")) {\n        throw new IllegalStateException(\"Unsupported archive type: \" + archive.getClass(), e);\n    }\n    throw e;\n}","preventionTips":["Always create TCK deployments as ShrinkWrap JavaArchive or War.","Assert the archive type before deploying in custom Arquillian protocols.","Log archive.getClass().getName() when debugging deployment setup."],"tags":["arquillian","deployment","archive-type","cdi-tck"],"backgroundTag":"unsupported-archive-type","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}