"java.lang.IllegalArgumentException: Sniffers with type [connector] and type [ejb] should not claim the archive at the same time. Please check the packaging of your archive"
happens, when GlassFish doesn't know how to interpret a content of a deployment archive. The error is usually caused by wrong packaging of your archive. I usually forget to set the scope (see bold tag below) in the pom.xml of the glasssh-embedded-all (needed because of Maven / Java EE 6 trouble), what causes the deployment of the whole embedded GlassFish with the WAR and the error above.
I would provide a error message like: "Deployment of servers inside WARs is unusual in Java EE 6 context and may result in not portable applications :-)".
<dependencies> <dependency> <groupId>org.glassfish.extras</groupId> <artifactId>glassfish-embedded-all</artifactId> <version>3.1.1</version> <scope>provided</scope> </dependency> </dependencies>
NEW workshop: Building HTML 5 Applications With Angular 2
Full week in December 2016: from Java EE 7 Bootstrap, Effective, Architectures over Testing to Microservices
On demand workshops: Java EE 7: Bootstrap, Effective, Testing and Microservices available for streaming.