Quantcast

jboss-app.xml Auto Generated from MAVEN EAR plugin

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

jboss-app.xml Auto Generated from MAVEN EAR plugin

Daivish Shah
I want to remove the DOCTYPE line from jboss-app.xml. I don't want this
line to be generated in my auto generated jboss-app.xml

<DOCTYPE jboss-app PUBLIC "-//JBoss//DTD Java EE Application 5.0//EN"
                          "http://www.jboss.org/j2ee/dtd/jboss-app_5_0.dtd">
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-ear-plugin</artifactId>
  <configuration>
    <defaultLibBundleDir>/APP-INF/lib</defaultLibBundleDir>
    <version>5</version>
    <modules>
      <ejbModule>
        <groupId>test-project</groupId>
        <artifactId>test-ejb</artifactId>
        <bundleFileName>test-ejb-0.0.1-SNAPSHOT.jar</bundleFileName>
        <bundleDir>/</bundleDir>
      </ejbModule>
    </modules>
    <archive>
     <manifest>
       <addClasspath>false</addClasspath>
     </manifest>
    </archive>
    <jboss>
      <version>5</version>
      <loader-repository>com.test:archive=com.test.services</loader-repository>
    </jboss>
  </configuration>
</plugin>

*THE REASON WHY I WANT TO DO THIS as followed.  *

The reason is. Jboss accepts the jboss-app.xml file without DOCTYPE tag.

I created one webservice and i am applying <version>5</version> and we
are using Jboss 5.1.2EA version.

And it's not able to generate WSDL if i apply DOCTYPE tag over there.
If i remove that tag from jboss-app.xml it's working all right...

And another reason is if we change the Jboss version from 5.1.2EA to
6.0EA at that time also we have to change all our projects to apply
version change in the POM file.

which is not practically all right
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: jboss-app.xml Auto Generated from MAVEN EAR plugin

Wayne Fay
> I created one webservice and i am applying <version>5</version> and we
> are using Jboss 5.1.2EA version.
>
> And it's not able to generate WSDL if i apply DOCTYPE tag over there.
> If i remove that tag from jboss-app.xml it's working all right...

Talk to the JBoss folks about that. Sounds like a bug on their side.

> And another reason is if we change the Jboss version from 5.1.2EA to
> 6.0EA at that time also we have to change all our projects to apply
> version change in the POM file.

This is most likely not true. The DOCTYPE simply says "this file
conforms to the following specification and version." There is nothing
which prevents JBoss v6 from accepting a JBoss v5 configuration file
-- many times app servers will intentionally accept older versions of
files to prevent such headaches and then internally up-convert the
file to the new format in memory or on disk during deployment. Again,
I'd talk to the JBoss folks about this to confirm this is actually
required.

If you really want to remove the DOCTYPE, you will need to hack the
plugin to remove it, then make that an on/off configuration option.

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: jboss-app.xml Auto Generated from MAVEN EAR plugin

Daivish Shah
Hi Wayne,

I already tried this and if i apply this TAG <version>5</version> it
generates the DOCTYPE and i tried manually delete that TAG and added the
modified jboss-app.xml and deployed that EAR on the jboss 5.1.2 EA version.

And WEBSERVICE able to generate WSDL from
http://localhost:8080/jbossws/services
it worked pretty well.

If i deploy the MAVEN GENERATED jboss-app.xml i am getting Exception stack
trace from the servlet something like below.


org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'TestEjbHandlerImpl': Invocation of init
method failed; nested exception is java.lang.LinkageError: loader
constraint violation: loader (instance of
org/jboss/web/tomcat/service/WebCtxLoader$ENCLoader) previously
initiated loading for a different type with name
"javax/xml/namespace/QName"



THE ONLY WORK AROUND to resolve this problem is something like this.  Apply
your own jboss-app.xml under this folder structure and remove
<jboss></jboss> tag from MAVEN EAR plugin and it will take your local
version whenever you hit the mvn install command.


|-- pom.xml
`-- src
    `-- main
        `-- application
            `-- META-INF
                `-- jboss-app.xml



TO ME it looks like MAVEN EAR PLUGIN team needs to work with Jboss TEAM and
have to make this correction in MAVEN EAR PLUGIN.

Thanks.

On Thu, Feb 2, 2012 at 9:15 AM, Wayne Fay <[hidden email]> wrote:

> > I created one webservice and i am applying <version>5</version> and we
> > are using Jboss 5.1.2EA version.
> >
> > And it's not able to generate WSDL if i apply DOCTYPE tag over there.
> > If i remove that tag from jboss-app.xml it's working all right...
>
> Talk to the JBoss folks about that. Sounds like a bug on their side.
>
> > And another reason is if we change the Jboss version from 5.1.2EA to
> > 6.0EA at that time also we have to change all our projects to apply
> > version change in the POM file.
>
> This is most likely not true. The DOCTYPE simply says "this file
> conforms to the following specification and version." There is nothing
> which prevents JBoss v6 from accepting a JBoss v5 configuration file
> -- many times app servers will intentionally accept older versions of
> files to prevent such headaches and then internally up-convert the
> file to the new format in memory or on disk during deployment. Again,
> I'd talk to the JBoss folks about this to confirm this is actually
> required.
>
> If you really want to remove the DOCTYPE, you will need to hack the
> plugin to remove it, then make that an on/off configuration option.
>
> Wayne
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: jboss-app.xml Auto Generated from MAVEN EAR plugin

Wayne Fay
> TO ME it looks like MAVEN EAR PLUGIN team needs to work with Jboss TEAM and
> have to make this correction in MAVEN EAR PLUGIN.

You're talking about getting changes that you need for your personal
work into an open source project.

If a company wants something badly enough, they will pay one of their
own people (or hire a contractor) to change/add functionality for
their specific needs.

If a person wants something badly enough, they will use their own time
(paid or not) to change/add functionality for their specific needs.

It sounds like you are sufficiently motivated to make any necessary
changes to get this to work. I'd encourage you to take the next step
and download the sources for m-ear-p and change the code so it does
what you require, then donate your changes back to Maven for use in a
future release of this plugin.

Otherwise you will simply be waiting on someone else who has fewer
motivations to do this same work to do it on your behalf. Saying the
Maven team needs to work with the JBoss team to do something that you
require is just not practical nor realistic.

If you have a work-around that works, then by all means use it instead.

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: jboss-app.xml Auto Generated from MAVEN EAR plugin

Daivish Shah
Hi Wayne,

You are right.

As long as there is a workaround, I mean user can put there own
jboss-app.xml under application/META-INF/*.xml i don't care.

And my meaning was JBOSS can support even if you don't provide
this <version>5</version> TAG in your jboss-app.xml. Then it should not
be mandatory by MAVEN too as jboss didn't make this element as mandatory
element there side.

That's all i wanted to say. Yes i know my work around for this. But wanted
to share my thought to MAVEN community also wanted to take MAVEN
users opinion on this.

And i always say that i like MAVEN USERS group very much as it's really
healthy discussion and thoughts i get from MAVEN USERS group.

Thanks again.



On Thu, Feb 2, 2012 at 12:37 PM, Wayne Fay <[hidden email]> wrote:

> > TO ME it looks like MAVEN EAR PLUGIN team needs to work with Jboss TEAM
> and
> > have to make this correction in MAVEN EAR PLUGIN.
>
> You're talking about getting changes that you need for your personal
> work into an open source project.
>
> If a company wants something badly enough, they will pay one of their
> own people (or hire a contractor) to change/add functionality for
> their specific needs.
>
> If a person wants something badly enough, they will use their own time
> (paid or not) to change/add functionality for their specific needs.
>
> It sounds like you are sufficiently motivated to make any necessary
> changes to get this to work. I'd encourage you to take the next step
> and download the sources for m-ear-p and change the code so it does
> what you require, then donate your changes back to Maven for use in a
> future release of this plugin.
>
> Otherwise you will simply be waiting on someone else who has fewer
> motivations to do this same work to do it on your behalf. Saying the
> Maven team needs to work with the JBoss team to do something that you
> require is just not practical nor realistic.
>
> If you have a work-around that works, then by all means use it instead.
>
> Wayne
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: jboss-app.xml Auto Generated from MAVEN EAR plugin

Stephen Coy
In reply to this post by Daivish Shah

On 03/02/2012, at 4:42 AM, Daivish Shah wrote:

> Hi Wayne,
>
> org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'TestEjbHandlerImpl': Invocation of init
> method failed; nested exception is java.lang.LinkageError: loader
> constraint violation: loader (instance of
> org/jboss/web/tomcat/service/WebCtxLoader$ENCLoader) previously
> initiated loading for a different type with name
> "javax/xml/namespace/QName"
>
>

The whole JBoss 5 deployment descriptor is almost a red herring. In fact it exposes a clue as to what the real problem is.

The problem you have here is that your application has included at least one of the (many) XML utilities out there that contains it's own version of javax.xml.namespace.QName. The reason for this is largely historical as it's generally a result of forward migration of code from Java 1.3/1.4 environments.

Early xmlbeans is one such example. Old releases of Apache Axis is another source of these kinds of problems.

Cheers,

Steve C


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: jboss-app.xml Auto Generated from MAVEN EAR plugin

Daivish Shah
Hi All,

I found the correct problem.

It wasn't related to DOCTYPE at all.. Wayne was correct.

I have to apply this tag in MAVEN EAR plugin, The exception was coming when
i try to look for WSDL for the webservice. It was throwing exception
because classloader was unable to find the webservice class from the EAR.



<jboss>
             <version>5</version>

 <loader-repository>com.test:archive=com.test.services.ejb</loader-repository>
<loader-repository-config>java2ParentDelegation=true</loader-repository-config>
           </jboss>


Do we have any guideline or any link from where i can read which all Jboss
TAG supported by MAVE EAR plugin ?

Thanks.





On Thu, Feb 2, 2012 at 10:31 PM, Stephen Coy <[hidden email]> wrote:

>
> On 03/02/2012, at 4:42 AM, Daivish Shah wrote:
>
> > Hi Wayne,
> >
> > org.springframework.beans.factory.BeanCreationException: Error
> > creating bean with name 'TestEjbHandlerImpl': Invocation of init
> > method failed; nested exception is java.lang.LinkageError: loader
> > constraint violation: loader (instance of
> > org/jboss/web/tomcat/service/WebCtxLoader$ENCLoader) previously
> > initiated loading for a different type with name
> > "javax/xml/namespace/QName"
> >
> >
>
> The whole JBoss 5 deployment descriptor is almost a red herring. In fact
> it exposes a clue as to what the real problem is.
>
> The problem you have here is that your application has included at least
> one of the (many) XML utilities out there that contains it's own version of
> javax.xml.namespace.QName. The reason for this is largely historical as
> it's generally a result of forward migration of code from Java 1.3/1.4
> environments.
>
> Early xmlbeans is one such example. Old releases of Apache Axis is another
> source of these kinds of problems.
>
> Cheers,
>
> Steve C
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: jboss-app.xml Auto Generated from MAVEN EAR plugin

Stephane Nicoll
On Fri, Feb 3, 2012 at 6:44 PM, Daivish Shah <[hidden email]> wrote:


> Do we have any guideline or any link from where i can read which all Jboss
> TAG supported by MAVE EAR plugin ?
>
> Thanks.
>

In the doc (see JBoss support):
http://maven.apache.org/plugins/maven-ear-plugin/usage.html

S.


>
>
>
>
>
> On Thu, Feb 2, 2012 at 10:31 PM, Stephen Coy <[hidden email]> wrote:
>
> >
> > On 03/02/2012, at 4:42 AM, Daivish Shah wrote:
> >
> > > Hi Wayne,
> > >
> > > org.springframework.beans.factory.BeanCreationException: Error
> > > creating bean with name 'TestEjbHandlerImpl': Invocation of init
> > > method failed; nested exception is java.lang.LinkageError: loader
> > > constraint violation: loader (instance of
> > > org/jboss/web/tomcat/service/WebCtxLoader$ENCLoader) previously
> > > initiated loading for a different type with name
> > > "javax/xml/namespace/QName"
> > >
> > >
> >
> > The whole JBoss 5 deployment descriptor is almost a red herring. In fact
> > it exposes a clue as to what the real problem is.
> >
> > The problem you have here is that your application has included at least
> > one of the (many) XML utilities out there that contains it's own version
> of
> > javax.xml.namespace.QName. The reason for this is largely historical as
> > it's generally a result of forward migration of code from Java 1.3/1.4
> > environments.
> >
> > Early xmlbeans is one such example. Old releases of Apache Axis is
> another
> > source of these kinds of problems.
> >
> > Cheers,
> >
> > Steve C
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
> >
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: jboss-app.xml Auto Generated from MAVEN EAR plugin

Daivish Shah
Thanks Stephane !!!!


On Sun, Feb 26, 2012 at 7:39 PM, Stephane Nicoll
<[hidden email]>wrote:

> On Fri, Feb 3, 2012 at 6:44 PM, Daivish Shah <[hidden email]>
> wrote:
>
>
> > Do we have any guideline or any link from where i can read which all
> Jboss
> > TAG supported by MAVE EAR plugin ?
> >
> > Thanks.
> >
>
> In the doc (see JBoss support):
> http://maven.apache.org/plugins/maven-ear-plugin/usage.html
>
> S.
>
>
> >
> >
> >
> >
> >
> > On Thu, Feb 2, 2012 at 10:31 PM, Stephen Coy <[hidden email]>
> wrote:
> >
> > >
> > > On 03/02/2012, at 4:42 AM, Daivish Shah wrote:
> > >
> > > > Hi Wayne,
> > > >
> > > > org.springframework.beans.factory.BeanCreationException: Error
> > > > creating bean with name 'TestEjbHandlerImpl': Invocation of init
> > > > method failed; nested exception is java.lang.LinkageError: loader
> > > > constraint violation: loader (instance of
> > > > org/jboss/web/tomcat/service/WebCtxLoader$ENCLoader) previously
> > > > initiated loading for a different type with name
> > > > "javax/xml/namespace/QName"
> > > >
> > > >
> > >
> > > The whole JBoss 5 deployment descriptor is almost a red herring. In
> fact
> > > it exposes a clue as to what the real problem is.
> > >
> > > The problem you have here is that your application has included at
> least
> > > one of the (many) XML utilities out there that contains it's own
> version
> > of
> > > javax.xml.namespace.QName. The reason for this is largely historical as
> > > it's generally a result of forward migration of code from Java 1.3/1.4
> > > environments.
> > >
> > > Early xmlbeans is one such example. Old releases of Apache Axis is
> > another
> > > source of these kinds of problems.
> > >
> > > Cheers,
> > >
> > > Steve C
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [hidden email]
> > > For additional commands, e-mail: [hidden email]
> > >
> > >
> >
>
Loading...