1) note I was using java8, but someone else on irc had the same error
running java7
2) trying back with version 3.1, and testing many pom congiguration, I
always end up with the error below
Yesterday both index.html and the servlet were served with version 3.1, I
always clean and package before trying, so now
INFOS: Started GlassFish ServerId = maven, GlassFish =
com.sun.enterprise.glassfish.bootstrap.StaticGlassFishRuntime$1_at_6594402a,
TimeTaken = 508 ms
mars 27, 2014 6:22:36 PM org.glassfish.api.ActionReport failure
GRAVE: Exception while deploying the app [myapp]
mars 27, 2014 6:22:36 PM com.sun.enterprise.v3.server.ApplicationLifecycle
deploy
GRAVE: Sniffers with type [connector] and type [ejb] should not claim the
archive at the same time. Please check the packaging of your archive
[C:\Users\profit\
AppData\Local\Temp\gfembed3525366688668757780tmp\applications\myapp]
java.lang.IllegalArgumentException: Sniffers with type [connector] and type
[ejb] should not claim the archive at the same time. Please check the
packaging of y
our archive
[C:\Users\profit\AppData\Local\Temp\gfembed3525366688668757780tmp\applications\myapp]
at
com.sun.enterprise.v3.server.SnifferManagerImpl.validateSniffers(SnifferManagerImpl.java:238)
at
com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:616)
at
com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:368)
at
com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
at
org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:370)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:360)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1067)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1247)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
at
com.sun.enterprise.admin.cli.embeddable.CommandExecutorImpl.executeCommand(CommandExecutorImpl.java:118)
at
com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:97)
at
com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:88)
at org.glassfish.maven.PluginUtil.doDeploy(PluginUtil.java:106)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at
org.glassfish.maven.AbstractDeployMojo.doDeploy(AbstractDeployMojo.java:171)
at org.glassfish.maven.RunMojo.execute(RunMojo.java:62)
at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
mars 27, 2014 6:22:36 PM org.glassfish.deployment.admin.DeployCommand
execute
GRAVE: Exception while deploying the app [myapp] : Sniffers with type
[connector] and type [ejb] should not claim the archive at the same time.
Please check the
packaging of your archive
[C:\Users\profit\AppData\Local\Temp\gfembed3525366688668757780tmp\applications\myapp]
PlainTextActionReporterFAILUREDescription: deploy AdminCommandError
occurred during deployment: Exception while deploying the app [myapp] :
Sniffers with type [
connector] and type [ejb] should not claim the archive at the same time.
Please check the packaging of your archive
[C:\Users\profit\AppData\Local\Temp\gfembed3
525366688668757780tmp\applications\myapp]. Please see server.log for more
details.
[name=myapp
mars 27, 2014 6:22:36 PM PluginUtil doDeploy
INFOS: Deployed null
Hit ENTER to redeploy, X to exit
code:
https://github.com/n11/TestGlassfishEmbedded
2014-03-27 17:37 GMT+01:00 Cyril Auburtin <cyril.auburtin_at_gmail.com>:
> Ah thanks Romain, at least I have now this nasty error
>
> java.lang.IllegalStateException: Servlet [CoordinatorPortTypePortImpl] and
> Servlet [ParticipantPortTypePortImpl] have the same url pattern:
> [/WSAT10Service]. Related annotation information: annotation
> [@javax.jws.WebService(name=, wsdlLocation=/wsdls/wsat10/wsat.wsdl,
> endpointInterface=com.sun.xml.ws.tx.at.v10.types.ParticipantPortType,
> portName=ParticipantPortTypePort, serviceName=WSAT10Service,
> targetNamespace=http://schemas.xmlsoap.org/ws/2004/10/wsat)] on annotated
> element [class
> com.sun.xml.ws.tx.at.v10.endpoint.ParticipantPortTypePortImpl] of type
> [TYPE]
> at
> com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:518)
> at
> com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:446)
> at
> org.glassfish.web.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:338)
> at
> org.glassfish.web.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:91)
> ....
>
>
> the rest is enclosed
>
> I have updated the project https://github.com/n11/TestGlassfishEmbeddedwith my current config (your changes)
>
>
> 2014-03-27 13:04 GMT+01:00 Romain Grecourt <romain.grecourt_at_oracle.com>:
>
> Hi,
>>
>> The exception mentioned below is related to a maven deployment attempt to
>> maven.java.net...
>>
>> I made the example work with the following:
>>
>> <plugin>
>>
>> <groupId>org.glassfish.embedded</groupId>
>> <artifactId>maven-embedded-glassfish-plugin</artifactId>
>> <version>4.0</version>
>> <configuration>
>> <goalPrefix>embedded-glassfish</goalPrefix>
>> <autoDelete>true</autoDelete>
>> <port>8080</port>
>> </configuration>
>> <executions>
>> <execution>
>> <goals>
>> <goal>deploy</goal>
>> </goals>
>> <configuration>
>>
>>
>> <app>target/${project.build.finalName}.war</app>
>>
>> <contextRoot>/</contextRoot>
>> </configuration>
>> </execution>
>> </executions>
>> </plugin>
>>
>> > mvn embedded-glassfish:run
>>
>> Thanks,
>> Romain
>>
>>
>> On 3/27/14 10:44 AM, Cyril Auburtin wrote:
>>
>> Yes, thanks Martin, I saw it once, but on my lastest attempts even with
>> verbose option, I didn't see this (role security exception) again.
>>
>> I didn't put a configFile element (pointing to domain.xml), as it was
>> not said to be necesary in the doc
>> https://glassfish.java.net/docs/4.0/embedded-server-guide.pdf
>>
>> but maybe since 4.0, there should be a domain.xml for setting these
>> security options? I have however no idea how to do it
>>
>>
>> 2014-03-27 2:48 GMT+01:00 Martin Gainty <mgainty_at_hotmail.com>:
>>
>>> Hi Cyril
>>>
>>> I got a little further:
>>> Caused by: org.apache.maven.wagon.TransferFailedException: Failed to
>>> transfer fi
>>> le:
>>> https://maven.java.net/service/local/staging/deploy/maven2/org/glassfish/emb
>>>
>>> edded/maven-embedded-glassfish-plugin/4.0/maven-embedded-glassfish-plugin-4.0.ja
>>> r. Return code is: 401, ReasonPhrase: Unauthorized.
>>> at
>>> org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.put(Abstr
>>> actHttpClientWagon.java:626)
>>> at
>>> org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.put(Abstr
>>> actHttpClientWagon.java:524)
>>> at
>>> org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.put(Abstr
>>> actHttpClientWagon.java:505)
>>> at
>>> org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.put(Abstr
>>> actHttpClientWagon.java:485)
>>> at
>>> org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.
>>> run(WagonRepositoryConnector.java:811)
>>> ... 28 more
>>>
>>> Need to setup users/roles etc..
>>>
>>> Is that the error you get?
>>> Martin
>>> ______________________________________________
>>> Verzicht und Vertraulichkeitanmerkung
>>>
>>> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
>>> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
>>> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
>>> dient lediglich dem Austausch von Informationen und entfaltet keine
>>> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
>>> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
>>>
>>>
>>> ------------------------------
>>> From: cyril.auburtin_at_gmail.com
>>> Date: Thu, 27 Mar 2014 01:11:18 +0100
>>> Subject: glassfish-embedded-4.0 is it stable?
>>> To: users_at_glassfish.java.net
>>>
>>>
>>> I need to run glassfish-embedded 4.0 (at least version 4 of
>>> glassfish), I found them on maven
>>> http://search.maven.org/#search%7Cga%7C1%7Cmaven-embedded-glassfish-plugin<http://search.maven.org/#search%7cga%7c1%7cmaven-embedded-glassfish-plugin>,
>>> but strangely under a different groupId
>>>
>>>
>>>
>>>
>>>
>>> <plugin>
>>> <!-- <groupId>org.glassfish</groupId> --><!-- <artifactId>maven-embedded-glassfish-plugin</artifactId> --><!-- <version>3.1</version> -->
>>> <groupId>org.glassfish.embedded</groupId>
>>> <artifactId>maven-embedded-glassfish-plugin</artifactId>
>>> <version>4.0</version>
>>>
>>> <configuration>
>>> <goalPrefix>embedded-glassfish</goalPrefix>
>>> <app>target/${project.build.finalName}.
>>>
>>>
>>>
>>>
>>> war<
>>> /span></app>
>>>
>>>
>>>
>>>
>>>
>>> <port>8080</port>
>>> <contextRoot>/</contextRoot>
>>> <autoDelete>true</autoDelete>
>>> </configuration></plugin>
>>>
>>>
>>>
>>>
>>> anyway I tried with a basic example
>>> https://github.com/n11/TestGlassfishEmbedded
>>>
>>> You can easily download the code and run the README
>>> Uncomment and comment the right sections in pom.xml to switch between
>>> 3.1 and 4.0.
>>> It's working fine under 3.1, and not serving anything with 4.0, without
>>> any error
>>>
>>> any idea?
>>>
>>
>>
>>
>