in the spec it is mentionned that's the correct way to define the
application class for a servlet container and that the container can use
other way to discover it.

using this web.xml it works:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns="
http://java.sun.com/xml/ns/javaee";
 xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";
 xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd";
 id="WebApp_ID" version="3.0">
  <display-name>openEJBExample3</display-name>


  <servlet>
    <servlet-name>ApplicationConfig</servlet-name>
    <init-param>
        <param-name>javax.ws.rs.Application</param-name>
        <param-value>ApplicationConfig</param-value>
    </init-param>
  </servlet>
  <servlet-mapping>
    <servlet-name>ApplicationConfig</servlet-name>
    <url-pattern>/*</url-pattern>
  </servlet-mapping>

  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>default.html</welcome-file>
    <welcome-file>default.htm</welcome-file>
    <welcome-file>default.jsp</welcome-file>
  </welcome-file-list>
</web-app>


Can you give a try renaming the deployed artifact (.war or exploded folder)
with a name not starting with openejb please?

- Romain


2012/5/3 kalgik <kons...@yahoo.gr>

> I tested both of them.
> If I add the servlet part you recommended to me but I receive the following
> error:
> "java.lang.NullPointerException
>        sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
>        java.lang.ClassLoader.loadClass(ClassLoader.java:248)
>
>
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1626)
>
>
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556)
>
>
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:461)
>
>
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
>
>  org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
>
>  org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
>
>
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
>
>
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
>
>
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)
>
>
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>
>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>        java.lang.Thread.run(Thread.java:662)
> "
> But the ApplicationConfig is not a servlet, isn't it?
>
> I added the system property to the Run Configuration without result.
>
> Can you please send to me your project which is working?
>
> kalgik
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Problem-deploying-REST-Examples-on-Eclipse-tp4582815p4605714.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Reply via email to