Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-405

Unnecessary dependency on EJB in RESTEasy links

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • 2.0-beta-3
    • 2.0-beta-2
    • None
    • None

      If the @RolesAllowed annotation is not found in the classpath, RESTEasy links fails to produce links for the entity, which should not be necessary since if the class is not found it should not be on the method we're scanning.

      The symptomatic stack trace:

      java.lang.NoClassDefFoundError: javax/annotation/security/RolesAllowed
      at org.jboss.resteasy.links.impl.RESTUtils.checkEJBConstraint(RESTUtils.java:176)
      at org.jboss.resteasy.links.impl.RESTUtils.checkConstraint(RESTUtils.java:170)
      at org.jboss.resteasy.links.impl.RESTUtils.processLinkResource(RESTUtils.java:131)
      at org.jboss.resteasy.links.impl.RESTUtils.processLinkResources(RESTUtils.java:113)
      at org.jboss.resteasy.links.impl.RESTUtils.addDiscovery(RESTUtils.java:56)
      at org.jboss.resteasy.links.impl.LinkDecorator$1.beforeMarshal(LinkDecorator.java:27)
      at com.sun.xml.internal.bind.v2.runtime.XMLSerializer.fireBeforeMarshalEvents(XMLSerializer.java:740)
      at com.sun.xml.internal.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.java:479)
      at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:314)
      at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:243)
      at javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:75)
      at org.jboss.resteasy.plugins.providers.jaxb.AbstractJAXBProvider.writeTo(AbstractJAXBProvider.java:105)
      at org.jboss.resteasy.core.interception.MessageBodyWriterContextImpl.proceed(MessageBodyWriterContextImpl.java:117)
      at org.jboss.resteasy.plugins.interceptors.encoding.GZIPEncodingInterceptor.write(GZIPEncodingInterceptor.java:48)
      at org.jboss.resteasy.core.interception.MessageBodyWriterContextImpl.proceed(MessageBodyWriterContextImpl.java:123)
      at org.jboss.resteasy.core.ServerResponse.writeTo(ServerResponse.java:186)
      at org.jboss.resteasy.core.SynchronousDispatcher.writeJaxrsResponse(SynchronousDispatcher.java:530)
      at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:467)
      at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:117)

            patriot1burke@gmail.com Bill Burke (Inactive)
            separdau@redhat.com Stephane Epardaud
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: