首页 > 解决方案 > 与服务器的 COBOL 连接在 VSCode 中关闭

问题描述

我正在尝试学习 COBOL 以(希望)帮助解决当前的危机。我正在参加IBM 课程,该课程需要 VSCode 中的“IBM Zowe Open Editor”和“Zowe Explorer”扩展。我花了很长时间为它设置JDK。我正在使用JDK1.8.0_251,就像配置要求的那样。我仍然收到一条错误消息,提示“cobol 语言服务器在过去 3 分钟内崩溃了 5 次”,导致我的代码无法运行。这是 COBOL 语言服务器的输出:

[Info  - 10:22:35 AM] Connection to server got closed. Server will restart.
Picked up _JAVA_OPTIONS: -Xmx512M
[Info  - 10:22:57 AM] Connection to server got closed. Server will restart.
Picked up _JAVA_OPTIONS: -Xmx512M
[Info  - 10:23:20 AM] Connection to server got closed. Server will restart.
[Error - 10:23:22 AM] Request textDocument/definition failed.
  Message: Internal error.
  Code: -32603 
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:67)
    at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.request(GenericEndpoint.java:120)
    at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleRequest(RemoteEndpoint.java:261)
    at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:190)
    at com.ibm.lsp.cobol.core.abilities.WatchLSPParent.lambda$0(WatchLSPParent.java:96)
    at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:192)
    at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
    at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:99)
    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:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:65)
    ... 12 more
Caused by: java.lang.NullPointerException
    at com.ibm.lsp.cobol.core.handlers.GetDefinitionHandler.getDefinition(GetDefinitionHandler.java:34)
    at com.ibm.lsp.cobol.core.CobolLanguageServer.definition(CobolLanguageServer.java:182)
    ... 17 more

Picked up _JAVA_OPTIONS: -Xmx512M
[Info  - 10:23:42 AM] Connection to server got closed. Server will restart.
Picked up _JAVA_OPTIONS: -Xmx512M
[Error - 10:24:05 AM] Connection to server got closed. Server will not be restarted.

更新:我想我需要访问 z/OS 大型机。我在 IBM 的 Master the Mainframe 程序中找到了如何免费访问但显然我需要添加 z/OSMF 软件(它只给你 3 天的免费试用期)或者这个叫做 Remote System Explorer API 的东西。我会继续研究它...

标签: javavisual-studio-codecobol

解决方案


在数据中心升级报告中,COBOL 服务器系统当时不可用。COBOL 服务器现已启动。我推荐使用 Open Mainframe Project、OMP、slack channel cobol-programming-course 来寻求帮助。仅供参考 - z/OSMF 已安装并可运行。COBOL 课程系统、Master the Mainframe Learning System、Zowe Tutorial System 和 ZTrial 系统都是独立的 z/OS,具有独立的 IP 地址。请包括系统的 ID 和 IP 地址,以确保我们同步。


推荐阅读