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

NullPointerException when using service cache

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.3.1
    • Fix Version/s: 3.3.2
    • Component/s: juddi-client
    • Labels:

      Description

      Calling this method gives a NullPointerException. If I remove the serviceLocator.withCache(). Everything is working fine. I have attached my uddi.xml so that you can see my configuration.

      private String resolveEndpointForServiceID(String uddiServiceId) {
              try {
                  UDDIClient uddiClient = new UDDIClient();
                  ServiceLocator serviceLocator = uddiClient.getServiceLocator("uddiv3");
                  serviceLocator.setPolicy(PolicyRoundRobin.class.getName());
                  serviceLocator.withCache(new URL("http","0.0.0.0",0, ""));
                  return serviceLocator.lookupEndpoint(uddiServiceId);
              } catch (Exception e) {
                  throw new EndpointResolutionFromUDDIException("Could not resolve endpoint '"+uddiServiceId+"'.", e);
              }
          }
      
      Stacktrace
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
      	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
      	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      	at com.intellij.junit4.JUnit4TestRunnerUtil$IgnoreIgnoredTestJUnit4ClassRunner.runChild(JUnit4TestRunnerUtil.java:341)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
      	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
      	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
      	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
      	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
      	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
      	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
      	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
      	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:78)
      	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:212)
      	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:68)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at com.intellij.rt.execution.CommandLineWrapper.main(CommandLineWrapper.java:130)
      Caused by: org.apache.commons.configuration.ConfigurationException: java.lang.NullPointerException
      	at org.apache.juddi.v3.client.mapping.ServiceLocator.initCache(ServiceLocator.java:172)
      	at org.apache.juddi.v3.client.mapping.ServiceLocator.withCache(ServiceLocator.java:84)
      Caused by: java.lang.NullPointerException
      	at java.util.Hashtable.putAll(Hashtable.java:586)
      	at org.apache.juddi.v3.client.mapping.UDDIServiceCache.<init>(UDDIServiceCache.java:119)
      	at org.apache.juddi.v3.client.mapping.ServiceLocator.initCache(ServiceLocator.java:170)
      	... 30 more
      

        Attachments

        1. uddi.xml
          3 kB
          Matthieu Ghilain

          Activity

            People

            • Assignee:
              spyhunter99 Alex O'Ree
              Reporter:
              ghilainm@gmail.com Matthieu Ghilain
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: