[ 
https://issues.apache.org/jira/browse/ARIES-1784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16559709#comment-16559709
 ] 

Carlos Sierra commented on ARIES-1784:
--------------------------------------

Hey [~jalbert],

it is in the JAX-RS 2.1 specification, Section 2.1:

 {{The resources and providers that make up a JAX-RS application are configured 
via an application-supplied subclass of Application. An implementation MAY 
provide alternate mechanisms for locating resource classes and providers (e.g. 
runtime class scanning) but use of Application is the only portable means of 
configuration.}}

The whiteboard is just handling the provided service to the JAX-RS 
implementation, CXF in this case.

Carlos.

> @Component without (service=A.class) end in Nullpointer
> -------------------------------------------------------
>
>                 Key: ARIES-1784
>                 URL: https://issues.apache.org/jira/browse/ARIES-1784
>             Project: Aries
>          Issue Type: Bug
>          Components: jax-rs-whiteboard
>    Affects Versions: jax-rs-whiteboard-1.0.0
>            Reporter: Stefan Bischof
>            Priority: Major
>
> Hi,
> when i hava a Ressource annotated with @Component but without 
> (service=A.class) and call  AriesJaxrsServiceRuntime.getRuntimeDTO i get a in 
> Nullpointer
> org.apache.aries.jax.rs.whiteboard.internal.CxfJaxrsServiceRegistrator.getStaticResourceC
> lasses(CxfJaxrsServiceRegistrator.java:307
> Stacktrace:
> Feb 20, 2018 1:50:50 PM org.apache.cxf.phase.PhaseInterceptorChain
>  doDefaultLogging
>  WARNUNG: Application
> {openapi.rsw.hub.domain.org/}
> OpenApiResource has thrown
>  exception, unwinding now
>  org.apache.cxf.interceptor.Fault
>  at
>  
> org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:162)
>  at
>  
> org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:128)
>  at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:192)
>  at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:103)
>  at
> org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java
>  :59)
>  at
> org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerIntercep
>  tor.java:96)
>  at
>  
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
>  at
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:1
>  21)
>  at
> org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java
>  :267)
>  at
> org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.ja
>  va:234)
>  at
>  
> org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208)
>  at
>  
> org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160)
>  at
> org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:191)
> at
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.ja
>  va:301)
>  at
>  
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:225)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:618)
>  at
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:276
>  )
>  at
> org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:85)
> at
> org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.jav
>  a:79)
>  at
>  
> org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:128)
>  at
> org.apache.felix.http.base.internal.dispatch.DispatcherServlet.service(DispatcherServlet.
>  java:49)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
>  at
>  org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:848)
>  at
>  org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:584)
>  at
>  
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:224)
>  at
>  
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180)
>  at
>  org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512)
>  at
>  
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
>  at
>  
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)
>  at
>  org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
>  at
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection
>  .java:213)
>  at
>  
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
>  at org.eclipse.jetty.server.Server.handle(Server.java:534)
>  at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)
>  at
>  org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
>  at
> org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:28
>  3)
>  at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:108)
>  at
>  
> org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
>  at
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(Execut
>  eProduceConsume.java:303)
>  at
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduc
>  eConsume.java:148)
>  at
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.ja
>  va:136)
>  at
>  
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
>  at
>  
> org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
>  at java.lang.Thread.run(Thread.java:745)
>  Caused by: java.lang.NullPointerException
>  at
> org.apache.aries.jax.rs.whiteboard.internal.CxfJaxrsServiceRegistrator.getStaticResourceC
>  lasses(CxfJaxrsServiceRegistrator.java:307)
>  at
> org.apache.aries.jax.rs.whiteboard.internal.AriesJaxrsServiceRuntime.buildApplicationDTO(
>  AriesJaxrsServiceRuntime.java:552)
>  at
>  java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
>  at
>  java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
>  at
> java.util.concurrent.ConcurrentHashMap$ValueSpliterator.forEachRemaining(ConcurrentHashMa
>  p.java:3566)
>  at
>  java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
>  at
>  java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
>  at
>  java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:545)
>  at
>  
> java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260)
>  at
>  java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:438)
>  at
> org.apache.aries.jax.rs.whiteboard.internal.AriesJaxrsServiceRuntime.getRuntimeDTO(AriesJ
>  axrsServiceRuntime.java:202)
>  at
>  
> org.domain.hub.rsw.openapi.OpenApiResource.getApplication(OpenApiResource.java:125)
>  at
> org.domain.hub.rsw.openapi.OpenApiResource.getApplicationsUI(OpenApiResource.java:147
>  )
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  at
>  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>  at
>  
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  at java.lang.reflect.Method.invoke(Method.java:498)
>  at
> org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:179
>  )
>  at
>  
> org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
>  ... 42 more



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to