Java错误:无法将java.lang.Boolean强制转换为java.lang.String

时间:2016-09-29 23:43:45

标签: java netflix-zuul netflix-eureka

我正在尝试运行Netflix Zuul(https://github.com/Netflix/zuul)& Netflix Eureka(https://github.com/Netflix/eureka)在我的网络服务器上。 Zuul能够在尤里卡注册。但是当Zuul尝试获取在Eureka上注册的服务列表时,我收到以下错误:

`

DiscoveryClient_ZUUL/zuul-01.bm.net - was unable to refresh its cache! status = java.lang.Boolean cannot be cast to java.lang.String :` java.lang.Boolean cannot be cast to java.lang.String
    at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:79)
        at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
        at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
        at com.netflix.discovery.converters.Converters$ApplicationConverter.unmarshal(Converters.java:226)
        at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
        at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
        at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
        at com.netflix.discovery.converters.Converters$ApplicationsConverter.unmarshal(Converters.java:145)
        at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
        at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
        at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
        at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134)
        at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
        at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1052)
        at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1036)
        at com.thoughtworks.xstream.XStream.fromXML(XStream.java:921)
        at com.netflix.discovery.converters.EntityBodyConverter.read(EntityBodyConverter.java:61)
        at com.netflix.discovery.provider.DiscoveryJerseyProvider.readFrom(DiscoveryJerseyProvider.java:94)
        at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:634)
        at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:586)
        at com.netflix.discovery.DiscoveryClient.getAndStoreFullRegistry(DiscoveryClient.java:853)
        at com.netflix.discovery.DiscoveryClient.fetchRegistry(DiscoveryClient.java:752)
        at com.netflix.discovery.DiscoveryClient.access$1400(DiscoveryClient.java:110)
        at com.netflix.discovery.DiscoveryClient$CacheRefreshThread.run(DiscoveryClient.java:1778)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
    Caused by: java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.lang.String
        at org.codehaus.jettison.mapped.MappedNamespaceConvention.processAttributesAndNamespaces(MappedNamespaceConvention.java:119)
        at org.codehaus.jettison.Node.<init>(Node.java:55)
        at org.codehaus.jettison.mapped.MappedXMLStreamReader.processElement(MappedXMLStreamReader.java:147)
        at org.codehaus.jettison.mapped.MappedXMLStreamReader.next(MappedXMLStreamReader.java:77)
        at com.thoughtworks.xstream.io.xml.StaxReader.pullNextEvent(StaxReader.java:58)
        at com.thoughtworks.xstream.io.xml.AbstractPullReader.readRealEvent(AbstractPullReader.java:148)
        at com.thoughtworks.xstream.io.xml.AbstractPullReader.readEvent(AbstractPullReader.java:135)
        at com.thoughtworks.xstream.io.xml.AbstractPullReader.hasMoreChildren(AbstractPullReader.java:87)
        at com.netflix.discovery.converters.Converters$InstanceInfoConverter.unmarshal(Converters.java:380)

我已经尝试过调试此功能,但无法找到此错误的根本原因。

0 个答案:

没有答案