You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Alan Collins <al...@yahoo.com> on 2010/07/19 08:46:49 UTC
problem with cxf configuration on unix
I had my code running on my windows box (eclipse), but need to get it running on a unix server (debian) and am having a tough time.
I have: tomcat6, spring 2.5.6, cxf 2.2.7.
It seems unhappy with the configuration. Here's the latest error:
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenerorg.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 16 in XML document from class path resource [com/example/cxf.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'jaxrs:server'. at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:404) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
Here's my cxf.xml that's sprung from a lot of web reading:
<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxrs="http://cxf.apache.org/jaxrs" xsi:schemaLocation="http://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans.xsdhttp://cxf.apache.org/jaxrshttp://cxf.apache.org/schemas/jaxrs.xsd">
<!-- do not use import statements if CXFServlet init parameters link to this beans.xml -->
<import resource="classpath:META-INF/cxf/cxf.xml" /> <import resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml" /> <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
<jaxrs:server id="user" address="/user"> <jaxrs:serviceBeans> <ref bean="userBean" /> </jaxrs:serviceBeans> </jaxrs:server>
<bean id="userBean" class="com.example.UserManager" /></beans>
The stuff I can find on the web either doesn't make sense to me (cxf noob) or doesn't seem to be specifically related.
I hope that I've given enough information, and thank you for your time.
Re: problem with cxf configuration on unix
Posted by Sergey Beryozkin <sb...@gmail.com>.
I'm sorry it is happening but there are just so many fragments there on the
wiki :-), doing copying & pasting is safer with the test source code, please
see systests/jaxrs, there are many configuration samples there...
cheers, Sergey
On Mon, Jul 19, 2010 at 11:16 PM, Alan Collins <al...@yahoo.com>wrote:
> Sergey,
> Thanks for the quick reply. That does seem to have been the problem, as
> I'm certain that I copied that config.
> Would you consider putting a warning up on the page?
> Thanks again.
> Alain.
>
> --- On Mon, 7/19/10, Sergey Beryozkin <sb...@gmail.com> wrote:
>
> From: Sergey Beryozkin <sb...@gmail.com>
> Subject: Re: problem with cxf configuration on unix
> To: users@cxf.apache.org
> Date: Monday, July 19, 2010, 1:49 PM
>
> This is most likely to do with some 'foreign' character getting into the
> way, I recall one of users copying some fragment from the wiki and then
> eventually having to create a new one...
>
> cheers, Sergey
>
> On Mon, Jul 19, 2010 at 7:46 AM, Alan Collins <alain_collins@yahoo.com
> >wrote:
>
> > I had my code running on my windows box (eclipse), but need to get it
> > running on a unix server (debian) and am having a tough time.
> > I have: tomcat6, spring 2.5.6, cxf 2.2.7.
> > It seems unhappy with the configuration. Here's the latest error:
> > SEVERE: Exception sending context initialized event to listener instance
> of
> > class
> >
> org.springframework.web.context.ContextLoaderListenerorg.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
> > Line 16 in XML document from class path resource [com/example/cxf.xml] is
> > invalid; nested exception is org.xml.sax.SAXParseException:
> > cvc-complex-type.2.4.c: The matching wildcard is strict, but no
> declaration
> > can be found for element 'jaxrs:server'. at
> >
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:404)
> > at
> >
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
> > at
> >
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
> >
> > Here's my cxf.xml that's sprung from a lot of web reading:
> > <?xml version="1.0" encoding="UTF-8"?><beans xmlns="
> > http://www.springframework.org/schema/beans" xmlns:xsi="
> > http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxrs="
> > http://cxf.apache.org/jaxrs" xsi:schemaLocation="
> >
> http://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans.xsdhttp://cxf.apache.org/jaxrshttp://cxf.apache.org/schemas/jaxrs.xsd
> > ">
> > <!-- do not use import statements if CXFServlet init parameters link to
> > this beans.xml -->
> > <import resource="classpath:META-INF/cxf/cxf.xml" /> <import
> > resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml"
> > /> <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
> > <jaxrs:server id="user" address="/user"> <jaxrs:serviceBeans>
> > <ref bean="userBean" /> </jaxrs:serviceBeans> </jaxrs:server>
> > <bean id="userBean" class="com.example.UserManager" /></beans>
> >
> > The stuff I can find on the web either doesn't make sense to me (cxf
> noob)
> > or doesn't seem to be specifically related.
> > I hope that I've given enough information, and thank you for your time.
> >
> >
> >
> >
> >
>
>
>
>
Re: problem with cxf configuration on unix
Posted by Alan Collins <al...@yahoo.com>.
Sergey,
Thanks for the quick reply. That does seem to have been the problem, as I'm certain that I copied that config.
Would you consider putting a warning up on the page?
Thanks again.
Alain.
--- On Mon, 7/19/10, Sergey Beryozkin <sb...@gmail.com> wrote:
From: Sergey Beryozkin <sb...@gmail.com>
Subject: Re: problem with cxf configuration on unix
To: users@cxf.apache.org
Date: Monday, July 19, 2010, 1:49 PM
This is most likely to do with some 'foreign' character getting into the
way, I recall one of users copying some fragment from the wiki and then
eventually having to create a new one...
cheers, Sergey
On Mon, Jul 19, 2010 at 7:46 AM, Alan Collins <al...@yahoo.com>wrote:
> I had my code running on my windows box (eclipse), but need to get it
> running on a unix server (debian) and am having a tough time.
> I have: tomcat6, spring 2.5.6, cxf 2.2.7.
> It seems unhappy with the configuration. Here's the latest error:
> SEVERE: Exception sending context initialized event to listener instance of
> class
> org.springframework.web.context.ContextLoaderListenerorg.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
> Line 16 in XML document from class path resource [com/example/cxf.xml] is
> invalid; nested exception is org.xml.sax.SAXParseException:
> cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration
> can be found for element 'jaxrs:server'. at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:404)
> at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
> at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
>
> Here's my cxf.xml that's sprung from a lot of web reading:
> <?xml version="1.0" encoding="UTF-8"?><beans xmlns="
> http://www.springframework.org/schema/beans" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxrs="
> http://cxf.apache.org/jaxrs" xsi:schemaLocation="
> http://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans.xsdhttp://cxf.apache.org/jaxrshttp://cxf.apache.org/schemas/jaxrs.xsd
> ">
> <!-- do not use import statements if CXFServlet init parameters link to
> this beans.xml -->
> <import resource="classpath:META-INF/cxf/cxf.xml" /> <import
> resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml"
> /> <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
> <jaxrs:server id="user" address="/user"> <jaxrs:serviceBeans>
> <ref bean="userBean" /> </jaxrs:serviceBeans> </jaxrs:server>
> <bean id="userBean" class="com.example.UserManager" /></beans>
>
> The stuff I can find on the web either doesn't make sense to me (cxf noob)
> or doesn't seem to be specifically related.
> I hope that I've given enough information, and thank you for your time.
>
>
>
>
>
Re: problem with cxf configuration on unix
Posted by Sergey Beryozkin <sb...@gmail.com>.
This is most likely to do with some 'foreign' character getting into the
way, I recall one of users copying some fragment from the wiki and then
eventually having to create a new one...
cheers, Sergey
On Mon, Jul 19, 2010 at 7:46 AM, Alan Collins <al...@yahoo.com>wrote:
> I had my code running on my windows box (eclipse), but need to get it
> running on a unix server (debian) and am having a tough time.
> I have: tomcat6, spring 2.5.6, cxf 2.2.7.
> It seems unhappy with the configuration. Here's the latest error:
> SEVERE: Exception sending context initialized event to listener instance of
> class
> org.springframework.web.context.ContextLoaderListenerorg.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
> Line 16 in XML document from class path resource [com/example/cxf.xml] is
> invalid; nested exception is org.xml.sax.SAXParseException:
> cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration
> can be found for element 'jaxrs:server'. at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:404)
> at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
> at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
>
> Here's my cxf.xml that's sprung from a lot of web reading:
> <?xml version="1.0" encoding="UTF-8"?><beans xmlns="
> http://www.springframework.org/schema/beans" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxrs="
> http://cxf.apache.org/jaxrs" xsi:schemaLocation="
> http://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans.xsdhttp://cxf.apache.org/jaxrshttp://cxf.apache.org/schemas/jaxrs.xsd
> ">
> <!-- do not use import statements if CXFServlet init parameters link to
> this beans.xml -->
> <import resource="classpath:META-INF/cxf/cxf.xml" /> <import
> resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml"
> /> <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
> <jaxrs:server id="user" address="/user"> <jaxrs:serviceBeans>
> <ref bean="userBean" /> </jaxrs:serviceBeans> </jaxrs:server>
> <bean id="userBean" class="com.example.UserManager" /></beans>
>
> The stuff I can find on the web either doesn't make sense to me (cxf noob)
> or doesn't seem to be specifically related.
> I hope that I've given enough information, and thank you for your time.
>
>
>
>
>