java.lang.NumberFormatException:对于输入字符串:“";(运行`sbt test`时出错) [英] java.lang.NumberFormatException: For input string: "" (Error when running `sbt test`)

查看:75
本文介绍了java.lang.NumberFormatException:对于输入字符串:“";(运行`sbt test`时出错)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的本地 Mac 操作系统(Mountain Lion)上,我一直在运行 sbt test,并且测试通过 Play 2.3.x、Scala (2.10.x) 编译/通过.我本地的 Java 版本是1.8.0_131".

On my local Mac OS (Mountain Lion), I have been running sbt test just fine and the tests compiled/passed with Play 2.3.x, Scala (2.10.x). Java version on my local was "1.8.0_131".

重新映像我的 Mac OS X(10.12.3) 后,我在为相同的代码库(Play、Scala、Java 版本仍然相同)运行sbt 测试"时开始收到非常奇怪的错误.

After re-imaging my Mac OS X(10.12.3), I started getting the very strange error when running "sbt test" for the same codebase (Play, Scala, Java versions still the same).

可能,这可能与我的 Mac 升级无关,但这是我现在能想到的唯一变量(更改).

Probably, this might not be to do with my Mac upgrade but that is the only variable (change) I could think of right now.

如果有人能给我一个关于可能的原因的快速提示,我真的很感激?

I would really appreciate if someone could give me a quick pointer on probable causes of this?

错误堆栈跟踪看起来像

[error]    NumberFormatException: : For input string: ""  (ProxyUtils.java:159)
[error] com.ning.http.util.ProxyUtils.createProxyServerSelector(ProxyUtils.java:159)
[error] com.ning.http.client.AsyncHttpClientConfig$Builder.build(AsyncHttpClientConfig.java:1132)
[error] play.api.libs.ws.ning.NingAsyncHttpClientConfigBuilder.build(NingAsyncHttpClientConfigBuilder.scala:37)
[error] play.api.libs.ws.ning.NingWSAPI.buildAsyncClientConfig(NingWS.scala:563)
[error] play.api.libs.ws.ning.NingWSAPI.newClient(NingWS.scala:520)
[error] play.api.libs.ws.ning.NingWSAPI$$anonfun$client$1.apply(NingWS.scala:543)
[error] play.api.libs.ws.ning.NingWSAPI$$anonfun$client$1.apply(NingWS.scala:540)
[error] play.api.libs.ws.ning.NingWSAPI.client(NingWS.scala:538)
[error] play.api.libs.ws.ning.NingWSAPI.url(NingWS.scala:553)
[error] play.api.libs.ws.WS$.url(WS.scala:129)

推荐答案

如果有人能给我一个关于这个原因的快速提示,我真的很感激?

I would really appreciate if someone could give me a quick pointer on the cause of this?

您只需要查看堆栈跟踪即可.它可以为您提供原因的指示".

You just need to look at the stack trace. It can give you a 'pointer' of the cause.

例如,这里的原因在异常的消息中指出,即:

For instance, here, the cause is indicated in the message of the exception, which is :

对于输入字符串:""

这表明一行代码试图解析一个不包含任何内容的字符串,并抛出异常表明从字符串到数字的转换失败

Which indicates that a line of code tried to parse a string containing nothing, and threw an exception to indicate a failed conversion from string to a number

造成这种情况的可能原因是应用程序在某处检索到的一些数据,并在重新映像计算机后发生了更改.通常,纠正这种情况的方法可能是重新安装应用

The probable cause of this is some data that the application retrived somewhere, and was changed after the re-imaging of the computer. Generally, a way to correct that might be to re-install the app

这篇关于java.lang.NumberFormatException:对于输入字符串:“";(运行`sbt test`时出错)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆