Hi Guys,
im trying to deploy a simple RESTful webservice on jboss 5.1.0 using apache
CXF. But i'm getting this exception 'Could not find 'server'. 

Googling it didn't helped much. Below follows my web.xml and beans.xml which
i done using the documentation on
http://cwiki.apache.org/CXF20DOC/jax-rs.html. I'm pasting also the simple
Web service and the exception itself. 

I'm not sure if i'm doing the right configurations. I would be glad if you
could help.

Thanks,
Damica

--------------- web.xml-------------------

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd";>
<web-app>
        <servlet>
                <servlet-name>CXFServlet1</servlet-name>
                <display-name>CXF Servlet1</display-name>
                <servlet-class>
                        org.apache.cxf.transport.servlet.CXFServlet
                </servlet-class>
                <init-param>
                   <param-name>config-location</param-name>
                   <param-value>/WEB-INF/beans.xml</param-value>
                </init-param>
                <load-on-startup>1</load-on-startup>
        </servlet>

        <servlet-mapping>
                <servlet-name>CXFServlet1</servlet-name>
                <url-pattern>/1/*</url-pattern>
        </servlet-mapping>

</web-app>

----------- beans.xml-------------------------------------

<?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/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://cxf.apache.org/jaxrs
http://cxf.apache.org/schemas/jaxrs.xsd";>

  <jaxrs:server id="RestHelloService" address="/service1">
    <jaxrs:serviceBeans>
      <ref bean="customerBean" />
    </jaxrs:serviceBeans>
  </jaxrs:server>

  <bean id="customerBean"
class="com.ixaris.webservices.rest.server.RestHelloService" />
</beans>

---- the exception------------------------
15:56:38,274 ERROR [AbstractKernelController] Error installing to Start:
name=vfszip:/C:/dev/applications/JBoss/jboss-5.1.0.GA/server/default/deploy/TestRESTWebservice-war-0.0.1.war/_WebBeansBootstrapBean
state=Create
javax.inject.DefinitionException: Could not find 'server'
        at
org.jboss.webbeans.xml.ParseXmlHelper.loadElementClass(ParseXmlHelper.java:62)
        at
org.jboss.webbeans.xml.XmlParser.parseForBeans(XmlParser.java:149)
        at org.jboss.webbeans.xml.XmlParser.parse(XmlParser.java:64)
        at
org.jboss.webbeans.bootstrap.WebBeansBootstrap.boot(WebBeansBootstrap.java:195)
        at
org.jboss.webbeans.bootstrap.api.helpers.BootstrapBean.boot(BootstrapBean.java:120)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)
        at
org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)
        at
org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
        at
org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:241)
        at
org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)
        at
org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:109)
        at
org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:70)
        at
org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:221)
        at
org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)
        at
org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)




-- 
View this message in context: 
http://old.nabble.com/Deploying-RESTful-Webservice-on-JBOSS-5.1.0-using-Apache-CXF-framework-tp26337929p26337929.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to