Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-8156

Incorrect service name displayed in logs during Runtime Exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: In Progress
    • Major
    • Resolution: Unresolved
    • None
    • None
    • JAX-RS
    • None
    • Unknown

    Description

      This is with reference to the ticket CXF-2538, wherein the service name was appended to the exception stack trace logs. For this getName() of the JAXRSServiceImpl was used to get the name of the service.

      In getName() method, when the serviceName and address properties are null, then we pick up first record in the classResourceInfos list. In scenarios where there are multiple endpoints and I am not setting the serviceName property while constructing JAXRSServiceImpl which happens in initializeServiceModel() of JAXRSServiceFactoryBean. Because, there isn't a specific service that I can initialize during the service factory creation(I have multiple rest services). In these scenarios, when I request a service and the service throws Runtime exception, In the logs I see an incorrect Service Name being displayed due to the fact that we are hardcoding to pick the first item in the classResourceInfos.

       

      Is there a specific purpose of hardcoding to pick the first item in the list ? I feel there should be a logic to determine the particular Service name which I requested, may be CXF-5360 where there is a discussion of selecting an appropriate service name using ResourceComparator when there are multiple rest services could be used to decide on the serviceName ?

       

      Attachments

        Activity

          People

            ashakirin Andrei Shakirin
            swathant1 Swathantra Kumar N
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: