juddi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex O'Ree (JIRA)" <juddi-...@ws.apache.org>
Subject [jira] [Commented] (JUDDI-939) NullPointerException when using service cache
Date Tue, 27 Oct 2015 22:52:27 GMT

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

Alex O'Ree commented on JUDDI-939:
----------------------------------

The line
`ServiceLocator serviceLocator = uddiClient.getServiceLocator("uddiv3");`
essentially open's the default config file, named 'uddi.xml' or uses the java property, and
looks for the clerk named "uddiv3". Was one specified in your config file?

I'm personally not too familiar with that part of the code base, but I'm looking at it now.

> NullPointerException when using service cache
> ---------------------------------------------
>
>                 Key: JUDDI-939
>                 URL: https://issues.apache.org/jira/browse/JUDDI-939
>             Project: jUDDI
>          Issue Type: Bug
>          Components: juddi-client
>    Affects Versions: 3.3.1
>            Reporter: Matthieu Ghilain
>              Labels: cache, juddi
>
> 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.
> {code}
> 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);
>         }
>     }
> {code}
> {code:title=Stacktrace|borderStyle=solid}
> 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
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message