Change "javax.ws.rs.core.Application" to "javax.ws.rs.Application". 
That is the correct way to do it.  (Still might not work).

On 9/4/2012 12:22 PM, Duncan Bloem wrote:
> No, I have:
>
> <web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd";>
>      <module-name>jaxrs</module-name>
>      <servlet-mapping>
>          <servlet-name>javax.ws.rs.core.Application</servlet-name>
>          <url-pattern>/*</url-pattern>
>      </servlet-mapping>
>      <session-config>
>          <session-timeout>
>              30
>          </session-timeout>
>      </session-config>
> </web-app>
>
> including
>
> public class MyApplication extends Application {} //without annotation
>
> this fails because of deployment error: JBAS011233: Please use either
> @ApplicationPath or servlet mapping for url path config.
>
> if I remove MyApplication.class from the war, everything works fine.
>
> (GF deploys the same war (including MyApplication) without errors)
>
> The jax-rs documentation 2.3.2 Servlet states in bullet 3 the following:
> "If the Application subclass is not annotated with @ApplicationPath then
> the application MUST
> be packaged with a web.xml that specifies a servlet mapping for the
> added servlet."
>
> however, the header of these bullets states:
> "When using the pluggability mechanism the following conditions MUST be
> met:"
>
> Does this mean if NON of the conditions are met, the pluggability
> mechanism should not be activated..?
>
> I think Resteasy and Jersey did interpret it differently ;-)
>
> Regards,
> Duncan
>
>
>
> On Tue, Sep 4, 2012 at 4:09 PM, Bill Burke <bbu...@redhat.com
> <mailto:bbu...@redhat.com>> wrote:
>
>     SO, you have:
>
>     <web-app>
>          <servlet>
>              <servlet-name>Resteasy</__servlet-name>
>              <servlet-class>
>
>     org.jboss.resteasy.plugins.__server.servlet.__HttpServletDispatcher
>              </servlet-class>
>              <init-param>
>                  <param-name>javax.ws.rs
>     <http://javax.ws.rs>.__Application</param-name>
>
>     
> <param-value>com.restfully.__shop.services.__ShoppingApplication</param-__value>
>              </init-param>
>          </servlet>
>
>          <servlet-mapping>
>              <servlet-name>Resteasy</__servlet-name>
>              <url-pattern>/*</url-pattern>
>          </servlet-mapping>
>
>     </web-app>
>
>     And it doesn't deploy because a different Application class was found?
>
>
>     On 9/2/2012 6:49 AM, Duncan Bloem wrote:
>
>         I want to have web.xml decide which Application class should be
>         registered.
>         (GF and JBoss profiles have different web.xml)
>
>         I would have expected that the Application sub-class is disregarded,
>         because there is no annotation and no servlet mapping. JBoss
>         should just
>         register javax.ws.rs.core.Application when defined in the
>         web.xml, but
>         deployment fails because of the error of the missing mapping for the
>         (scanned) sub-class. So, maybe a warning is more appropriate
>         then a failure.
>
>         GF does disregard the sub-class and deploys fine and registers the
>         javax.ws.rs.core.Application class.
>
>         (The use case is that GF requires configuration, while JBoss
>         needs no
>         configuration)
>
>         Regards,
>         Duncan
>
>         On Sat, Sep 1, 2012 at 1:36 PM, Bill Burke <bbu...@redhat.com
>         <mailto:bbu...@redhat.com>
>         <mailto:bbu...@redhat.com <mailto:bbu...@redhat.com>>> wrote:
>
>              I don't understand, you have an Application class not
>         annotated?  *AND*
>              you have a different application class declared in web.xml?
>
>              What do you expect to happen?  What does GF 3.1 do?  The
>         spec is kinda
>              vague here.
>
>              Originally if you had an Application class without
>         @ApplicationPath,
>              resteasy would just map it to /*, but, somebody on the AS7
>         team changed
>              the code without telling me and now you get this error...
>
>              On 9/1/2012 6:12 AM, Duncan Bloem wrote:
>               > Hello,
>               >
>               > When there is a Sub-class of Application on the
>         classpath without
>               > @ApplicationPath annotation nor a <servlet-mapping> for the
>              Application
>               > sub-class in web.xml, deployment fails under JBoss AS7
>         with the
>               > following error:
>               > DeploymentUnitProcessingExcept__ion: JBAS011233: Please
>         use either
>               > @ApplicationPath or servlet mapping for url path config.
>               > at JaxrsIntegrationProcessor.__deploy(line:171)
>               >
>               > Just wondering of this is the correct behaviour, because
>         it could
>              also
>               > just skip this sub-class (because there is no mapping,
>         and e.g. use
>               > javax.ws.rs.core.Application if defined in web.xml).
>               >
>               > Like to hear your opinion...
>               >
>               > ps, I noticed this behaviour to have the application
>         GF3.1 and AS7
>               > compatible.
>               >
>               > Regards,
>               > Duncan
>               >
>               >
>               >
>               >
>               >
>
>         
> ------------------------------__------------------------------__------------------
>               > Live Security Virtual Conference
>               > Exclusive live event will cover all the ways today's
>         security and
>               > threat landscape has changed and how IT managers can
>         respond.
>              Discussions
>               > will include endpoint security, mobile security and the
>         latest in
>              malware
>               > threats.
>         http://www.accelacomm.com/jaw/__sfrnl04242012/114/50122263/
>         <http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/>
>               >
>               >
>               >
>               > _________________________________________________
>               > Resteasy-users mailing list
>               > Resteasy-users@lists.__sourceforge.net
>         <mailto:Resteasy-users@lists.sourceforge.net>
>              <mailto:Resteasy-users@lists.__sourceforge.net
>         <mailto:Resteasy-users@lists.sourceforge.net>>
>
>               >
>         https://lists.sourceforge.net/__lists/listinfo/resteasy-users
>         <https://lists.sourceforge.net/lists/listinfo/resteasy-users>
>               >
>
>              --
>              Bill Burke
>              JBoss, a division of Red Hat
>         http://bill.burkecentral.com
>
>
>         
> ------------------------------__------------------------------__------------------
>              Live Security Virtual Conference
>              Exclusive live event will cover all the ways today's
>         security and
>              threat landscape has changed and how IT managers can respond.
>              Discussions
>              will include endpoint security, mobile security and the
>         latest in
>              malware
>              threats.
>         http://www.accelacomm.com/jaw/__sfrnl04242012/114/50122263/
>         <http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/>
>              _________________________________________________
>              Resteasy-users mailing list
>         Resteasy-users@lists.__sourceforge.net
>         <mailto:Resteasy-users@lists.sourceforge.net>
>              <mailto:Resteasy-users@lists.__sourceforge.net
>         <mailto:Resteasy-users@lists.sourceforge.net>>
>         https://lists.sourceforge.net/__lists/listinfo/resteasy-users
>         <https://lists.sourceforge.net/lists/listinfo/resteasy-users>
>
>
>
>     --
>     Bill Burke
>     JBoss, a division of Red Hat
>     http://bill.burkecentral.com
>
>

-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users

Reply via email to