Ballerina 软件包构建失败
Ballerina package build failed
我在 https://ballerina.io/community-program/ 上跟随 Ballerina 快速浏览并创建了包 'Calculator',在包构建步骤之前一切都运行良好。输入构建命令后出现错误
ballerina build calculator
ballerina: Oh no, something really went wrong. Bad. Sad.
There should be a file named "ballerina-internal.log" in the current directory.
If you are able to share with us the code that broke Ballerina then
we would REALLY appreciate if you would report this to us:
go to https://github.com/ballerina-platform/ballerina-lang/issues and
create a bug report with both this log file and the sample code.
We thank you for helping make us better dancers.
日志文件包含以下内容。
[2018-07-03 17:02:15,679] ERROR {org.ballerinalang.launcher.Main} - Illegal character in opaque part at index 40: jar:file:/home/senuri/Projects/Ballerina thrid cal/.ballerina/repo/senuri/calculator/0.1.0/calculator.zip
java.lang.IllegalArgumentException: Illegal character in opaque part at index 40: jar:file:/home/senuri/Projects/Ballerina thrid cal/.ballerina/repo/senuri/calculator/0.1.0/calculator.zip
at java.net.URI.create(URI.java:852)
at org.wso2.ballerinalang.compiler.FileSystemProjectDirectory.saveCompiledPackage(FileSystemProjectDirectory.java:165)
at org.wso2.ballerinalang.compiler.BinaryFileWriter.writeLibraryPackage(BinaryFileWriter.java:153)
at org.wso2.ballerinalang.compiler.BinaryFileWriter.writeLibraryPackage(BinaryFileWriter.java:125)
at org.wso2.ballerinalang.compiler.BinaryFileWriter.write(BinaryFileWriter.java:89)
at org.wso2.ballerinalang.compiler.Compiler.build(Compiler.java:96)
at org.ballerinalang.packerina.BuilderUtils.compileAndWrite(BuilderUtils.java:54)
at org.ballerinalang.packerina.cmd.BuildCommand.execute(BuildCommand.java:94)
at java.util.Optional.ifPresent(Optional.java:159)
at org.ballerinalang.launcher.Main.main(Main.java:66)
Caused by: java.net.URISyntaxException: Illegal character in opaque part at index 40: jar:file:/home/senuri/Projects/Ballerina thrid cal/.ballerina/repo/senuri/calculator/0.1.0/calculator.zip
at java.net.URI$Parser.fail(URI.java:2848)
at java.net.URI$Parser.checkChars(URI.java:3021)
at java.net.URI$Parser.parse(URI.java:3058)
at java.net.URI.<init>(URI.java:588)
at java.net.URI.create(URI.java:850)
... 9 more
我在 Ubuntu 16.04,Ballerina 版本是 0.975.0
有什么解决这个问题的建议吗?
问题出在您的项目目录中的空格:Ballerina thrid cal
。消除目录名称中的空格应该可以解决此问题。
例如,Ballerina-third-cal
我在 https://ballerina.io/community-program/ 上跟随 Ballerina 快速浏览并创建了包 'Calculator',在包构建步骤之前一切都运行良好。输入构建命令后出现错误
ballerina build calculator
ballerina: Oh no, something really went wrong. Bad. Sad.
There should be a file named "ballerina-internal.log" in the current directory.
If you are able to share with us the code that broke Ballerina then
we would REALLY appreciate if you would report this to us:
go to https://github.com/ballerina-platform/ballerina-lang/issues and
create a bug report with both this log file and the sample code.
We thank you for helping make us better dancers.
日志文件包含以下内容。
[2018-07-03 17:02:15,679] ERROR {org.ballerinalang.launcher.Main} - Illegal character in opaque part at index 40: jar:file:/home/senuri/Projects/Ballerina thrid cal/.ballerina/repo/senuri/calculator/0.1.0/calculator.zip
java.lang.IllegalArgumentException: Illegal character in opaque part at index 40: jar:file:/home/senuri/Projects/Ballerina thrid cal/.ballerina/repo/senuri/calculator/0.1.0/calculator.zip
at java.net.URI.create(URI.java:852)
at org.wso2.ballerinalang.compiler.FileSystemProjectDirectory.saveCompiledPackage(FileSystemProjectDirectory.java:165)
at org.wso2.ballerinalang.compiler.BinaryFileWriter.writeLibraryPackage(BinaryFileWriter.java:153)
at org.wso2.ballerinalang.compiler.BinaryFileWriter.writeLibraryPackage(BinaryFileWriter.java:125)
at org.wso2.ballerinalang.compiler.BinaryFileWriter.write(BinaryFileWriter.java:89)
at org.wso2.ballerinalang.compiler.Compiler.build(Compiler.java:96)
at org.ballerinalang.packerina.BuilderUtils.compileAndWrite(BuilderUtils.java:54)
at org.ballerinalang.packerina.cmd.BuildCommand.execute(BuildCommand.java:94)
at java.util.Optional.ifPresent(Optional.java:159)
at org.ballerinalang.launcher.Main.main(Main.java:66)
Caused by: java.net.URISyntaxException: Illegal character in opaque part at index 40: jar:file:/home/senuri/Projects/Ballerina thrid cal/.ballerina/repo/senuri/calculator/0.1.0/calculator.zip
at java.net.URI$Parser.fail(URI.java:2848)
at java.net.URI$Parser.checkChars(URI.java:3021)
at java.net.URI$Parser.parse(URI.java:3058)
at java.net.URI.<init>(URI.java:588)
at java.net.URI.create(URI.java:850)
... 9 more
我在 Ubuntu 16.04,Ballerina 版本是 0.975.0
有什么解决这个问题的建议吗?
问题出在您的项目目录中的空格:Ballerina thrid cal
。消除目录名称中的空格应该可以解决此问题。
例如,Ballerina-third-cal