COBOL Connection to Server got closed in VSCode - java

I'm trying to learn COBOL to (hopefully) help with the crisis right now. I'm taking the IBM course which requires the "IBM Zowe Open Editor" and "Zowe Explorer" extensions in VSCode. It took me a long time to set up the JDK for it.I'm using JDK1.8.0_251 like the configuration asked. I'm still getting an error saying "the cobol language server crashed 5 times in the last 3 miuntes" rendering my code unable to run. Here is the output for the COBOL language server:
[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.
Update: I think I need access to a z/OS mainframe. I found out how to get free access here at IBM's Master the Mainframe program, but apparently I need either z/OSMF software added (which only gives you a 3 day free trial) or this thing called the Remote System Explorer API. I'll keeping looking into it...

The COBOL server system was unavailable at the time in the report for data center upgrades. COBOL server is up now. I recommend using the Open Mainframe Project, OMP, slack channel cobol-programming-course for assistance. FYI - z/OSMF is installed and operational. The COBOL course system, the Master the Mainframe Learning System, Zowe Tutorial System, and ZTrial system are all separate z/OS with separate IP address. Please include ID and IP address of system to be certain we are in sync.

Related

Can't get a Java heapdump from a docker container

My Java process is stuck and hogging a lot of CPU on the VM. I am trying to get to the root of the issue by getting a heapdump. This process is running in a docker container. I am getting into the container and running a jmap -F -dump:format=b,file=/tmp/heapdump.bin 6 as root user. But I still get java.lang.reflect.InvocationTargetException.
I used jmap -F to get over this exception - com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: target process not responding or HotSpot VM not loaded
I referenced the this post to make modifications to my query - Running jmap getting Unable to open socket file,
I have tried both jmap and jcmd queries, but got the same results.
Can someone please help here?
# jmap -F -dump:format=b,file=/tmp/heapdump.bin 6
Attaching to process ID 6, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 25.111-b14
Dumping heap to /tmp/heapdump.bin ...
Exception in thread "main" 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 sun.tools.jmap.JMap.runTool(JMap.java:201)
at sun.tools.jmap.JMap.main(JMap.java:130)
Caused by: java.lang.InternalError: Metadata does not appear to be polymorphic
at sun.jvm.hotspot.types.basic.BasicTypeDataBase.findDynamicTypeForAddress(BasicTypeDataBase.java:278)
at sun.jvm.hotspot.runtime.VirtualBaseConstructor.instantiateWrapperFor(VirtualBaseConstructor.java:102)
at sun.jvm.hotspot.oops.Metadata.instantiateWrapperFor(Metadata.java:68)
at sun.jvm.hotspot.memory.DictionaryEntry.klass(DictionaryEntry.java:71)
at sun.jvm.hotspot.memory.Dictionary.classesDo(Dictionary.java:66)
at sun.jvm.hotspot.memory.SystemDictionary.classesDo(SystemDictionary.java:190)
at sun.jvm.hotspot.memory.SystemDictionary.allClassesDo(SystemDictionary.java:183)
at sun.jvm.hotspot.utilities.HeapHprofBinWriter.writeClasses(HeapHprofBinWriter.java:954)
at sun.jvm.hotspot.utilities.HeapHprofBinWriter.write(HeapHprofBinWriter.java:427)
at sun.jvm.hotspot.tools.HeapDumper.run(HeapDumper.java:62)
at sun.jvm.hotspot.tools.Tool.startInternal(Tool.java:260)
at sun.jvm.hotspot.tools.Tool.start(Tool.java:223)
at sun.jvm.hotspot.tools.Tool.execute(Tool.java:118)
at sun.jvm.hotspot.tools.HeapDumper.main(HeapDumper.java:83)
I too faced this issue with openjdk8 alpine. Worked fine on upgrading base image to openjdk:17-jdk-alpine

java.net.UnknownHostException in WildFly start

I'm getting the following error when I start up a Java server process (WildFly application server):
Caused by: java.net.UnknownHostException: proxy01.phx2.fedoraproject.org: Name or service not known
at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:929)
at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1324)
at java.net.InetAddress.getLocalHost(InetAddress.java:1501)
The server is not harmed by this error, but it bothers me to have this error in the logs. It is something related with my environment. Indeed, the problem happens no matter which version of the server and on any location of my file system.
I have checked in /etc/hosts and /etc/resolv.conf but I really don't have idea where the "proxy01.phx2.fedoraproject.org" comes from.
Any idea?
Thanks

IBM Worklight server failing to start project

Windows 7; Java 1.7; Worklight 7.0:
Just started getting this error; has anyone else run into this?
`
[ERROR ] FWLSE0320E: Failed to check whether the admin services are ready. Caused by: [project rta]
Connection refused: connect
[ERROR ] FWLST0003E: ========= Failed starting project /rta [project rta]
java.lang.reflect.InvocationTargetException
[ERROR ] null
java.lang.reflect.InvocationTargetException
[ERROR ] FWLSE4011E: StatusMessage [severity=ERROR, message='null', timestamp=1462897073437, detailedMessage=java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
at java.lang.reflect.Method.invoke(Method.java:620)
at com.worklight.server.bundle.project.JeeProjectActivator$1.run(JeeProjectActivator.java:239)
at java.lang.Thread.run(Thread.java:798)
Caused by: java.lang.RuntimeException: Timeout while waiting for the management service to start up.120 secs.
at com.worklight.core.init.WorklightServletInitializer$1.run(WorklightServletInitializer.java:150)
at com.worklight.core.init.WorklightServletInitializer.initialize(WorklightServletInitializer.java:193)
... 6 more
`
If you are using IBM Java, try instead to install Oracle Java and see if this has gone away.
You can also try removing the MobileFirst Development Server (the folder that appears in your Solution view in Eclipse. Then simply restart Eclipse, this should recreate a fresh copy of the server and the error may be gone then.

Trouble Deploying App From Tomcat to Sun Java Web Server 7...and I'm a .NET guy :(

I am trying to deploy an application that was developed in MyEclipse using Tomcat (originally 5.5 but works with 7) to our demo server (Sun Java Web Server 7). Unfortunately all of the people that had designed the application have left the company. So, here is what I know:
1) The application works as-is in MyEclipse on Tomcat
2) The application was successfully deployed to Sun Java Web Server in the past (presumably with the same build)
3) I can connect to the database from the server with sqldeveloper
4) The application uses: Java EE 5 and Spring framework
Application settings:
driver: oracle.jdbc.driver.OracleDriver
url jdbc:oracle:thin#xx.xx.x.xx:service
Here is the only error I am getting. I get a lot of warnings before and after though:
warning: CORE3283: stderr: com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
failure:
for host xx.xx.x.xxx trying to GET /application/login.jsp, service-j2ee reports: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source. at
com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1319) at
com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:557) at
com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:477) at
com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:525) at
com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128) at
org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:113) at
org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:79) at
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:379) at
org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:455) at
org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:463) at
org.springframework.jdbc.core.simple.SimpleJdbcTemplate.query(SimpleJdbcTemplate.java:187) at
gov.nyc.oer.dao.SiteConfigDao.getSiteConfig(Unknown Source) at
gov.nyc.oer.manager.SiteConfigManager.getSiteConfig(Unknown Source) at
gov.nyc.oer.manager.SiteConfigManager.afterPropertiesSet(Unknown Source) at
gov.nyc.oer.manager.SiteConfigManager.getValue(Unknown Source) at
org.apache.jsp.login_jsp._jspService(login_jsp.java:67) at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:80) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:917) at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373) at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:457) at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:351) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:917) at
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:398) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304) at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185) at
org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:169) at
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:183) at
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:138) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:217) at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185) at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:255) at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188) at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586) at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556) at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:187) at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586) at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556) at
com.sun.webserver.connector.nsapi.NSAPIProcessor.service(NSAPIProcessor.java:160)
Server Configuration:
Java: Enabled
Java Home: ${WS_JDK_HOME}
Ignore Environment Class Path: Enabled
Class Path Prefix: None
Server Class Path:
${WS_INSTALL_ROOT}/lib/webserv-rt.jar
${WS_INSTALL_ROOT}/lib/pwc.jar
${WS_INSTALL_ROOT}/lib/ant.jar
${java.home}/lib/tools.jar
${WS_INSTALL_ROOT}/lib/ktsearch.jar
${WS_INSTALL_ROOT}/lib/webserv-jstl.jar
${WS_INSTALL_ROOT}/lib/jsf-impl.jar
${WS_INSTALL_ROOT}/lib/jsf-api.jar
${WS_INSTALL_ROOT}/lib/webserv-jwsdp.jar
${WS_INSTALL_ROOT}/lib/container-auth.jar
${WS_INSTALL_ROOT}/lib/mail.jar
${WS_INSTALL_ROOT}/lib/activation.jar
Class Path Suffix: ${WS_INSTALL_ROOT}/lib/ojdbc14.jar
JVM Options:
-Djava.security.auth.login.config=login.conf
-Xms128m -Xmx256m
-Djdbc.drivers=oracle.jdbc.driver.OracleDriver
Looks like your database connection is not defined on your sun java web server 7. On this website you can find out how to define it.

GlassFish build failed

Each time I try to deploy my server side code, the build fails. If I try to restart my machine, the build is successful but fails later when I try to build the subsequent times. I get the following Severe messages when I attempt to build:
SEVERE: "IOP00410216: (COMM_FAILURE) Unable to create IIOP listener on the specified host/port: localhost/3820"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 216 completed: No
WARNING: Can not find resource bundle for this logger. class name that failed: org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory
WARNING: Exception getting SocketInfo
java.lang.RuntimeException: Orb initialization eror
WARNING: "IOP02310202: (OBJ_ADAPTER) Error in connecting servant to ORB"
org.omg.CORBA.OBJ_ADAPTER: vmcid: SUN minor code: 202 completed: No
Following are the details for the severe method:
SEVERE: "IOP00410216: (COMM_FAILURE) Unable to create IIOP listener on the specified host/port: localhost/3820"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 216 completed: No
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.createListenerFailed(ORBUtilSystemException.java:3835)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.createListenerFailed(ORBUtilSystemException.java:3855)
at com.sun.corba.ee.impl.transport.SocketOrChannelAcceptorImpl.initialize(SocketOrChannelAcceptorImpl.java:98)
at com.sun.corba.ee.impl.transport.CorbaTransportManagerImpl.getAcceptors(CorbaTransportManagerImpl.java:247)
at com.sun.corba.ee.impl.transport.CorbaTransportManagerImpl.addToIORTemplate(CorbaTransportManagerImpl.java:264)
at com.sun.corba.ee.spi.oa.ObjectAdapterBase.initializeTemplate(ObjectAdapterBase.java:131)
at com.sun.corba.ee.impl.oa.toa.TOAImpl.<init>(TOAImpl.java:130)
at com.sun.corba.ee.impl.oa.toa.TOAFactory.getTOA(TOAFactory.java:114)
at com.sun.corba.ee.impl.orb.ORBImpl.connect(ORBImpl.java:1740)
at com.sun.corba.ee.spi.presentation.rmi.StubAdapter.connect(StubAdapter.java:212)
at com.sun.corba.ee.impl.orb.ORBImpl.getIOR(ORBImpl.java:2194)
at com.sun.corba.ee.impl.orb.ORBImpl.getFVDCodeBaseIOR(ORBImpl.java:966)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.glassfish.gmbal.generic.FacetAccessorImpl.invoke(FacetAccessorImpl.java:126)
at org.glassfish.gmbal.impl.MBeanImpl.invoke(MBeanImpl.java:440)
at org.glassfish.gmbal.impl.AttributeDescriptor.get(AttributeDescriptor.java:144)
at org.glassfish.gmbal.impl.MBeanSkeleton.getAttribute(MBeanSkeleton.java:569)
at org.glassfish.gmbal.impl.MBeanSkeleton.getAttributes(MBeanSkeleton.java:625)
at org.glassfish.gmbal.impl.MBeanImpl.getAttributes(MBeanImpl.java:389)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttributes(DefaultMBeanServerInterceptor.java:726)
at com.sun.jmx.mbeanserver.JmxMBeanServer.getAttributes(JmxMBeanServer.java:665)
at org.glassfish.admin.amx.util.jmx.MBeanProxyHandler.getAttributes(MBeanProxyHandler.java:273)
at org.glassfish.admin.amx.core.proxy.AMXProxyHandler.attributesMap(AMXProxyHandler.java:1193)
at org.glassfish.admin.amx.core.proxy.AMXProxyHandler.attributesMap(AMXProxyHandler.java:1203)
at org.glassfish.admin.amx.core.proxy.AMXProxyHandler.handleSpecialMethod(AMXProxyHandler.java:414)
at org.glassfish.admin.amx.core.proxy.AMXProxyHandler._invoke(AMXProxyHandler.java:792)
at org.glassfish.admin.amx.core.proxy.AMXProxyHandler.invoke(AMXProxyHandler.java:526)
at $Proxy107.attributesMap(Unknown Source)
at org.glassfish.admin.amx.core.AMXValidator._validate(AMXValidator.java:642)
at org.glassfish.admin.amx.core.AMXValidator.validate(AMXValidator.java:1298)
at org.glassfish.admin.amx.impl.mbean.ComplianceMonitor$ValidatorThread.doRun(ComplianceMonitor.java:256)
at org.glassfish.admin.amx.impl.mbean.ComplianceMonitor$ValidatorThread.run(ComplianceMonitor.java:227)
Caused by: java.net.BindException: Address already in use
at sun.nio.ch.Net.bind(Native Method)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:119)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:52)
at org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory.createServerSocket(IIOPSSLSocketFactory.java:293)
at com.sun.corba.ee.impl.transport.SocketOrChannelAcceptorImpl.initialize(SocketOrChannelAcceptorImpl.java:91)
... 32 more
It looks like some process is using the port 3820. Since you have said that the first build works okay, I am tempted to say that your build is attempting to start the server, even though it is already started... which would give this kind of error. If you include more info about what you mean when you say 'build', someone may be able to give you a more complete answer.
I was getting this problem because my program crashed unexpectedly, while the server was still running. So, each time this happened I cleaned the tcp ports that remained open when the code crashed.

Categories