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.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>> 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:
>      > DeploymentUnitProcessingException: 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/
>      >
>      >
>      >
>      > _______________________________________________
>      > Resteasy-users mailing list
>      > Resteasy-users@lists.sourceforge.net
>     <mailto:Resteasy-users@lists.sourceforge.net>
>      > 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/
>     _______________________________________________
>     Resteasy-users mailing list
>     Resteasy-users@lists.sourceforge.net
>     <mailto:Resteasy-users@lists.sourceforge.net>
>     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/
_______________________________________________
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users

Reply via email to