Thanks, Romain. You don't need to test it. I understand what you said.

On Fri, Dec 27, 2013 at 1:07 AM, Romain Manni-Bucau
<[email protected]>wrote:

> Hi
>
> I didnt take time to test but both of your resources uses same root @Path
> (noone is specified so @Path("/")). This mean when jaxrs resolves the
> endpoint to use it uses it is not deterministic and ambiguous.
>
> Move @Path("word") and @Path("teacher") on the class and not the methods.
> Le 26 déc. 2013 13:23, "LG Optimusv" <[email protected]> a écrit :
>
> > Hi All,
> >
> > I have this class:
> >
> > package home;
> >
> > import home.resource.TeacherResource;
> > import home.resource.WordResource;
> >
> > import javax.ws.rs.ApplicationPath;
> > import javax.ws.rs.core.Application;
> > import java.util.HashSet;
> > import java.util.Set;
> >
> > @ApplicationPath("/resource")
> > public class MyApplication extends Application {
> >     @Override
> >     public Set<Class<?>> getClasses() {
> >         Set<Class<?>> classes = new HashSet<>();
> >         classes.add(WordResource.class);
> > //        classes.add(TeacherResource.class);
> >         return classes;
> >     }
> > }
> >
> > In the getClasses method above, if I add only 1 class (any of them) to
> the
> > Set
> > classes, it works. If I add both of them, the WordResource.class doesn't
> > work. Does anybody know what my problem is?
> >
> > Thanks.
> >
> > PS: the application can be found at https://github.com/dxxvi/tomee-jaxrs
> >
>

Reply via email to