You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by mayankeagle <ma...@yahoo.com> on 2013/12/19 12:02:14 UTC

CXF 2.6.8 issue with JBoss 6.0.1 EAP

I'm deploying a JAX-RS REST web-services project in JBoss 6.0.1 EAP. As JBoss
6 EAP comes with its own CXF installation (default version is 2.6.8), I have
removed all the CXF JARs from my WEB-INF/lib and instead written the
following in the jboss-deployment-structure.xml:

            <module name="org.apache.cxf" services="import">
                <imports>
                    <include path="META-INF**" />
                    <include path="org**" />
                    <include path="schemas**" />
                </imports>
	    </module>
            <module name="org.apache.cxf.impl" services="import">
                <imports>
                    <include path="META-INF**" />
                    <include path="org**" />
                    <include path="schemas**" />
                </imports>
            </module>

However, when I try to start JBoss, I get the error:

Failed to read schema document 'http://cxf.apache.org/schemas/jaxrs.xsd',
because 1) could not find the document; 2) the document could not be read;
3) the root element of the document is not <xsd:schema>

Could anyone please throw some light on this? Has this schema document been
removed from the CXF JARs 2.6.8 version? I don't face this issue in JBoss
7.1.1 GA with custom-downloaded CXF 2.7.5 (default CXF version in JBoss
7.1.1 is 2.4.6, so I upgraded it to the latest version 2.7.5 to make it
work). However, with JBoss 6.0.1 EAP, I'm trying to make it work with the
default CXF version, which is 2.6.8. Note that the App-server version in
JBoss 6.0.1 EAP is also AS 7.1.2 so it should work similar to how 7.1.1
works.



--
View this message in context: http://cxf.547215.n5.nabble.com/CXF-2-6-8-issue-with-JBoss-6-0-1-EAP-tp5737992.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: CXF 2.6.8 issue with JBoss 6.0.1 EAP

Posted by mayankeagle <ma...@yahoo.com>.
Ok I will double check on the Red Hat support team for that, but that's what
I understood in the earlier call.

I'm aware that between 7.1.1 GA and 6.0.1 EAP, the CXF module is split into
2 - earlier my jboss-deployment-structure.xml had only imported the CXF
module (in 7.1.1 GA), but now I'm importing both modules (CXF and CXF impl)
in 6.0.1 EAP. Any pointers on how to make it work here despite having
included both modules? Why can't it find the CXF JAXRS XSD?



--
View this message in context: http://cxf.547215.n5.nabble.com/CXF-2-6-8-issue-with-JBoss-6-0-1-EAP-tp5737992p5738151.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: CXF 2.6.8 issue with JBoss 6.0.1 EAP

Posted by Alessio Soldano <as...@redhat.com>.
Hi,
wrt support issues, etc. you should really get in touch with Red Hat 
support to clarify what you can do and what you can't. The JAX-RS impl 
of Apache CXF is not "supported" anyway in JBoss EAP afaik, as a matter 
of fact those jars not even included in it.

 From a technical point of view, I confirm what I suspected on yesterday 
but could not verify as I didn't have EAP 6.0.1 locally: the module 
structure is slightly different among JBoss AS 7.1.1.Final and JBoss EAP 
6.0.1, in particular the 'org.apache.cxf' module has been split into 
'org.apache.cxf' (containing the cxf-api jar only) and 
'org.apache.cxf.impl' (with the rest of the libs, *except* for jaxrs 
ones). So you need to fix your jboss-deployment-structure.xml accordingly.

Alessio

On 19/12/13 19:11, mayankeagle wrote:
> Sure, that's fine. I can wait till tomorrow. I don't have an account on JBoss
> forums but will create and post it there tomorrow as well if its not
> resolved there.
>
> I need to use the default version of CXF which ships with JBoss EAP because
> we are having an organizational direction to go ahead with JBoss EAP so that
> we can buy support (as opposed to GA, which is community edition and we
> can't buy support for it). As per JBoss support, we need to use the default
> modules which ship with it to be able to claim support. If we change the JAR
> files (e.g., if I change CXF to 2.7.5 instead of the default 2.6.8), then
> they won't be able to support it.
>
> I have checked this version of JBoss has the CXF impl module as well. As per
> Sergey, it should have the schema in the JAR. The Spring module I have
> created is version 3.2.3.
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/CXF-2-6-8-issue-with-JBoss-6-0-1-EAP-tp5737992p5738088.html
> Sent from the cxf-user mailing list archive at Nabble.com.


-- 
Alessio Soldano
Web Service Lead, JBoss


Re: CXF 2.6.8 issue with JBoss 6.0.1 EAP

Posted by mayankeagle <ma...@yahoo.com>.
Sure, that's fine. I can wait till tomorrow. I don't have an account on JBoss
forums but will create and post it there tomorrow as well if its not
resolved there.

I need to use the default version of CXF which ships with JBoss EAP because
we are having an organizational direction to go ahead with JBoss EAP so that
we can buy support (as opposed to GA, which is community edition and we
can't buy support for it). As per JBoss support, we need to use the default
modules which ship with it to be able to claim support. If we change the JAR
files (e.g., if I change CXF to 2.7.5 instead of the default 2.6.8), then
they won't be able to support it.

I have checked this version of JBoss has the CXF impl module as well. As per
Sergey, it should have the schema in the JAR. The Spring module I have
created is version 3.2.3.



--
View this message in context: http://cxf.547215.n5.nabble.com/CXF-2-6-8-issue-with-JBoss-6-0-1-EAP-tp5737992p5738088.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: CXF 2.6.8 issue with JBoss 6.0.1 EAP

Posted by Alessio Soldano <as...@redhat.com>.
Hi,
sorry, I'm a bit in hurry and I'd need to check EAP 6.0.1 distribution 
(which I don't have here atm) for a proper reply. I could possibly get 
back on this tomorrow.
Regarding excluding the webservices susbsytem, I think I understand why 
that's not playing a relevant role in your case, sorry.
Regarding the usage of CXF libraries from the container, I'd say please 
double check the jars you need are actually there in the module that 
you're setting a dependency to. As I said previously, the cxf jaxrs libs 
are not shipped. Spring is not shipped (you might need to install it 
into org.springframework.spring module). Moreover, I can't remember if 
that version of EAP had the 'org.apache.cxf.impl' module or not, check 
that too.
Feel free to move this discussion to the jboss user forum if you want 
(perhaps add a link here), there's no CXF issue afaiu, this is more a 
matter of configuring the JBoss container for your app requirements...

Cheers
Alessio

On 19/12/13 15:18, mayankeagle wrote:
> Alessio - I tried excluding the webservices sub-system. I am not including
> the CXF impl JARs in my WEB-INF/lib though. Would it not pick up if I am
> still referring to the CXF and CXF impl modules in the
> jboss-deployment-structure.xml? I understand that 6.0.1 EAP (AS 7.1.2) has
> bug-fixes, etc so I'd assumed existing functionality from 7.1.1 wouldn't get
> broken and I wouldn't have to do anything additional to make CXF
> web-services (note that in 7.1.1, I didn't disable webservices sub-system to
> make JAX-RS work with the CXF modules).
>
> I still get the same error after removing the webservices sub-system. I am
> currently trying with this kind of configuration for the modules CXF, CXF
> impl and Spring:
>
>              <module name="org.apache.cxf" services="import" export = "true">
> 				<imports>
>                  	<include path="META-INF"/>
>                  	<include path="META-INF/cxf"/>
> 				</imports>
> 				<exports>
>                		<include path="META-INF"/>
>                		<include path="META-INF/cxf"/>
> 				</exports>			
> 			</module>
>
> I found this from one of your posts on another site. Should I revert it to
> the earlier:
>
>              <module name="org.apache.cxf" services="import">
>                  <imports>
>                      <include path="META-INF**" />
>                      <include path="org**" />
>                      <include path="schemas**" />
>                  </imports>
> 			</module>
>
>
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/CXF-2-6-8-issue-with-JBoss-6-0-1-EAP-tp5737992p5738007.html
> Sent from the cxf-user mailing list archive at Nabble.com.


-- 
Alessio Soldano
Web Service Lead, JBoss


Re: CXF 2.6.8 issue with JBoss 6.0.1 EAP

Posted by mayankeagle <ma...@yahoo.com>.
Sergey - thanks for confirming that the schema definitions are always
shipped. That is what I'd also assumed.

Alessio - I tried excluding the webservices sub-system. I am not including
the CXF impl JARs in my WEB-INF/lib though. Would it not pick up if I am
still referring to the CXF and CXF impl modules in the
jboss-deployment-structure.xml? I understand that 6.0.1 EAP (AS 7.1.2) has
bug-fixes, etc so I'd assumed existing functionality from 7.1.1 wouldn't get
broken and I wouldn't have to do anything additional to make CXF
web-services (note that in 7.1.1, I didn't disable webservices sub-system to
make JAX-RS work with the CXF modules).

I still get the same error after removing the webservices sub-system. I am
currently trying with this kind of configuration for the modules CXF, CXF
impl and Spring:

            <module name="org.apache.cxf" services="import" export = "true">
				<imports>
                	<include path="META-INF"/>
                	<include path="META-INF/cxf"/>
				</imports>
				<exports>
              		<include path="META-INF"/>
              		<include path="META-INF/cxf"/>
				</exports>			
			</module>

I found this from one of your posts on another site. Should I revert it to
the earlier:

            <module name="org.apache.cxf" services="import">
                <imports>
                    <include path="META-INF**" />
                    <include path="org**" />
                    <include path="schemas**" />
                </imports>
			</module>





--
View this message in context: http://cxf.547215.n5.nabble.com/CXF-2-6-8-issue-with-JBoss-6-0-1-EAP-tp5737992p5738007.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: CXF 2.6.8 issue with JBoss 6.0.1 EAP

Posted by Alessio Soldano <as...@redhat.com>.
Hi,

On 19/12/13 12:02, mayankeagle wrote:
> I'm deploying a JAX-RS REST web-services project in JBoss 6.0.1 EAP. As JBoss
> 6 EAP comes with its own CXF installation (default version is 2.6.8), I have
> removed all the CXF JARs from my WEB-INF/lib
This would have been the suggested approach if you were developing a 
jaxws application.
However, the jaxrs components of Apache CXF are not included in JBoss 
EAP (the reason being that RestEasy is the supported jaxrs impl there), 
so you can't get them from the container.

If you want to use the Apache CXF impl of jaxrs, my suggestion is to 
disabled the EAP webservices subsystem for your deployment (using 
<|||exclude-subsystems|||> in a jboss-deployment-structure.xml, as 
mentioned at [1]). Then include the cxf jars you need in your 
deployment. You'll basically end up using JBoss AS as if it was a 
servlet container only (~ Tomcat).
There might be alternative approaches, you might want to check with the 
EAP customer support though.

>   [...] However, with JBoss 6.0.1 EAP, I'm trying to make it work with the
> default CXF version, which is 2.6.8. Note that the App-server version in
> JBoss 6.0.1 EAP is also AS 7.1.2 so it should work similar to how 7.1.1
> works.
The internal version (7.1.2) is actually not that relevant here, do not 
make too many assumption based on that, EAP comes with multiple fixes.

Cheers
Alessio


[1] 
http://cxf.apache.org/docs/application-server-specific-configuration-guide.html#ApplicationServerSpecificConfigurationGuide-JBossApplicationServer

-- 
Alessio Soldano
Web Service Lead, JBoss


Re: CXF 2.6.8 issue with JBoss 6.0.1 EAP

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi
On 19/12/13 11:02, mayankeagle wrote:
> I'm deploying a JAX-RS REST web-services project in JBoss 6.0.1 EAP. As JBoss
> 6 EAP comes with its own CXF installation (default version is 2.6.8), I have
> removed all the CXF JARs from my WEB-INF/lib and instead written the
> following in the jboss-deployment-structure.xml:
>
>              <module name="org.apache.cxf" services="import">
>                  <imports>
>                      <include path="META-INF**" />
>                      <include path="org**" />
>                      <include path="schemas**" />
>                  </imports>
> 	    </module>
>              <module name="org.apache.cxf.impl" services="import">
>                  <imports>
>                      <include path="META-INF**" />
>                      <include path="org**" />
>                      <include path="schemas**" />
>                  </imports>
>              </module>
>
> However, when I try to start JBoss, I get the error:
>
> Failed to read schema document 'http://cxf.apache.org/schemas/jaxrs.xsd',
> because 1) could not find the document; 2) the document could not be read;
> 3) the root element of the document is not <xsd:schema>
>
> Could anyone please throw some light on this? Has this schema document been
> removed from the CXF JARs 2.6.8 version? I don't face this issue in JBoss
> 7.1.1 GA with custom-downloaded CXF 2.7.5 (default CXF version in JBoss
> 7.1.1 is 2.4.6, so I upgraded it to the latest version 2.7.5 to make it
> work). However, with JBoss 6.0.1 EAP, I'm trying to make it work with the
> default CXF version, which is 2.6.8. Note that the App-server version in
> JBoss 6.0.1 EAP is also AS 7.1.2 so it should work similar to how 7.1.1
> works.
>
No, the schema resource is always shipped with CXF.

Thanks, Sergey

>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/CXF-2-6-8-issue-with-JBoss-6-0-1-EAP-tp5737992.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>


-- 
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com