Uploaded image for project: 'jUDDI'
  1. jUDDI
  2. JUDDI-566

Using service/binding/hostingDirector causes a NPE

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.4
    • Fix Version/s: 3.1.5
    • Component/s: core
    • Labels:
      None

      Description

      I got this using the maven build process after saveBusiness, add a Service to the same host with a hosting redirector, then, saveBusiness again

      [WARNING] [talledLocalContainer] Caused by: java.lang.NullPointerException
      [WARNING] [talledLocalContainer] at org.apache.juddi.mapping.MappingApiToModel.mapBindingTemplate(MappingApiToMod
      el.java:503)
      [WARNING] [talledLocalContainer] at org.apache.juddi.mapping.MappingApiToModel.mapBindingTemplates(MappingApiToMo
      del.java:489)
      [WARNING] [talledLocalContainer] at org.apache.juddi.mapping.MappingApiToModel.mapBusinessService(MappingApiToMod
      el.java:452)
      [WARNING] [talledLocalContainer] at org.apache.juddi.mapping.MappingApiToModel.mapBusinessServices(MappingApiToMo
      del.java:430)
      [WARNING] [talledLocalContainer] at org.apache.juddi.mapping.MappingApiToModel.mapBusinessEntity(MappingApiToMode
      l.java:111)
      [WARNING] [talledLocalContainer] at org.apache.juddi.api.impl.UDDIPublicationImpl.saveBusiness(UDDIPublicationImp
      l.java:585)
      Error caught of type javax.xml.ws.soap.SOAPFaultException
      [WARNING] [talledLocalContainer] at sun.reflect.GeneratedMethodAccessor82.invoke(Unknown Source)
      javax.xml.ws.soap.SOAPFaultException: Fault occurred while processing.

        Issue Links

          Activity

          Hide
          spyhunter99 Alex O'Ree added a comment -

          this will fix it, however the validator still needs to be update. See issue JUDDI-565

          Show
          spyhunter99 Alex O'Ree added a comment - this will fix it, however the validator still needs to be update. See issue JUDDI-565
          Hide
          kurtstam Kurt T Stam added a comment -

          OK, but as far as I read http://uddi.org/pubs/uddi_v3.htm#_Toc85908374, then when using a hostingredirectory, the tModel referenced is:

          <tModel tModelKey="uddi:uddi.org:specification:hostingredirector">
          <name>uddi-org:hostingRedirector</name>
          <description>UDDI Hosting Redirector service specification
          </description>
          <overviewDoc>
          <overviewURL useType="text">
          http://uddi.org/pubs/uddi_v3.htm#hostDir
          </overviewURL>
          </overviewDoc>
          <categoryBag>
          <keyedReference keyName="uddi-org:types:specification" keyValue="specification" tModelKey="uddi:uddi.org:categorization:types" />
          </categoryBag>
          </tModel>

          which is part of the install data:
          http://svn.apache.org/repos/asf/juddi/trunk/juddi-core/src/main/resources/juddi_install_data/UDDI_tModels.xml

          And the accesspoint contains the URL to the " the accessPoint of the Hosting Redirector Web service ". So I do think you are always supposed to have an AccessPoint. However it's probably nicer to validate rather then throw back an NPE, so I'm going to commit the patch.

          --K

          Show
          kurtstam Kurt T Stam added a comment - OK, but as far as I read http://uddi.org/pubs/uddi_v3.htm#_Toc85908374 , then when using a hostingredirectory, the tModel referenced is: <tModel tModelKey="uddi:uddi.org:specification:hostingredirector"> <name>uddi-org:hostingRedirector</name> <description>UDDI Hosting Redirector service specification </description> <overviewDoc> <overviewURL useType="text"> http://uddi.org/pubs/uddi_v3.htm#hostDir </overviewURL> </overviewDoc> <categoryBag> <keyedReference keyName="uddi-org:types:specification" keyValue="specification" tModelKey="uddi:uddi.org:categorization:types" /> </categoryBag> </tModel> which is part of the install data: http://svn.apache.org/repos/asf/juddi/trunk/juddi-core/src/main/resources/juddi_install_data/UDDI_tModels.xml And the accesspoint contains the URL to the " the accessPoint of the Hosting Redirector Web service ". So I do think you are always supposed to have an AccessPoint. However it's probably nicer to validate rather then throw back an NPE, so I'm going to commit the patch. --K
          Hide
          kurtstam Kurt T Stam added a comment -

          fixed, patch applied

          Show
          kurtstam Kurt T Stam added a comment - fixed, patch applied
          Hide
          spyhunter99 Alex O'Ree added a comment -

          See 3.5.2 it clearly says one or the other

          Show
          spyhunter99 Alex O'Ree added a comment - See 3.5.2 it clearly says one or the other
          Hide
          spyhunter99 Alex O'Ree added a comment -

          The accessPoint is a string used to convey the network address suitable for invoking the Web service being described. This is typically a URL but may be an electronic mail address, or even a telephone number. No assumptions about the type of data in this field can be made without first understanding the technical requirements associated with the Web service.

          The hostingRedirector is a deprecated element, since its functionality is now covered by the accessPoint. For backward-compatibility, it can still be used, but it is not recommended. See the set of UDDI Version 2 Specifications for a description on hostingRedirector.

          Either an accessPoint or a hostingRedirector must be provided within a bindingTemplate.

          Show
          spyhunter99 Alex O'Ree added a comment - The accessPoint is a string used to convey the network address suitable for invoking the Web service being described. This is typically a URL but may be an electronic mail address, or even a telephone number. No assumptions about the type of data in this field can be made without first understanding the technical requirements associated with the Web service. The hostingRedirector is a deprecated element, since its functionality is now covered by the accessPoint. For backward-compatibility, it can still be used, but it is not recommended. See the set of UDDI Version 2 Specifications for a description on hostingRedirector. Either an accessPoint or a hostingRedirector must be provided within a bindingTemplate.
          Hide
          kurtstam Kurt T Stam added a comment -

          You are correct. I was thinking of a useType of hostingDirectory, but you are referring to element which is deprecated:

          The hostingRedirector is a deprecated element, since its functionality is now covered by the accessPoint. For backward-compatibility, it can still be used, but it is not recommended. See the set of UDDI Version 2 Specifications for a description on hostingRedirector.

          Show
          kurtstam Kurt T Stam added a comment - You are correct. I was thinking of a useType of hostingDirectory, but you are referring to element which is deprecated: The hostingRedirector is a deprecated element, since its functionality is now covered by the accessPoint. For backward-compatibility, it can still be used, but it is not recommended. See the set of UDDI Version 2 Specifications for a description on hostingRedirector.

            People

            • Assignee:
              kstam Kurt T Stam
              Reporter:
              spyhunter99 Alex O'Ree
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development