users@glassfish.java.net

Re: maven / remote EJB client for deployment in JBoss AS?

From: Richard Kolb <rjdkolb_at_gmail.com>
Date: Wed, 14 Nov 2012 09:33:38 +0200

Hi Kristian

I see nobody has responded yet.

This is a solution/workaround for JAR hell in Maven:
http://maven.apache.org/plugins/maven-shade-plugin/

I've never actually used it in a WAR before.

Hope it helps.

regards
Richard



On 13 November 2012 14:45, Kristian Rink <kr_at_zimmer428.net> wrote:

> Folks;
>
> having a standalone Java EE client built and running using maven (good), I
> am
> trying to take the next step and do as needed - build a web app supposed to
> run as part of an enterprise application deployed to a JBoss AS 7.1.1.
>
> So far, however, I see maven2 build for Glassfish standalone clients is a
> bit
> cumbersome; at the moment I have
>
> <dependency>
> <groupId>org.glassfish.appclient</groupId>
> <artifactId>gf-client</artifactId>
> <version>3.1</version>
> <type>pom</type>
> <scope>compile</scope>
> </dependency>
>
>
> as a dependency in that very module which adds roughly 40 megs of jars to
> the
> project. Adding this setup to a webapp and trying to deploy this to JBoss
> makes the JBoss deployer massively complain about things like this...
>
> [...]
> at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_33]
> Caused by: java.lang.IllegalArgumentException: JBAS015533: Web Service
> endpoint com.sun.xml.ws.tx.coord.v11.endpoint.RegistrationPortImpl with URL
> pattern /RegistrationService_V11 is already registered. Web service
> endpoint
> com.sun.xml.w
> s.tx.coord.v11.endpoint.RegistrationRequesterPortImpl is requesting the
> same
> URL pattern.
> at
>
> org.jboss.as.webservices.metadata.model.AbstractDeployment.addEndpoint(AbstractDeployment.java:60)
> at
>
> org.jboss.as.webservices.metadata.model.JAXWSDeployment.addEndpoint(JAXWSDeployment.java:27)
> [...]
>
>
> ... before ultimately stopping deployment. Looking at the kind of jars in
> the
> gf-client pom project, I am not really surprised to see this causing
> problems,
> yet I of course would like to see it work. Can anyone out here point me out
> (a) which jars out of gf-client would be required to deploy such a
> structure
> to another application server and/or (b) whether there is a "cleaner" way
> for
> building such things via maven other than adding _all_ the code to the
> project
> via this large pom?
>
> TIA and all the best,
> Kristian
>