"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>
Java EE 7 Workshops: Bootstrap, Effective, Architectures, June, 13th-15th, Munich's Airport
On demand workshops: Java EE 7 Bootstrap, Effective Java EE 7, Java EE 7 Testing and NEW: Java EE 7 Microservices are available for streaming