简体   繁体   English

在Eclipse中使用Tomcat运行时调试的Bluemix失败

[英]Bluemix with Tomcat runtime debug in Eclipse failed

I get the same problem as Bluemix remote debugging session not starting when trying to debug my web app on Bluemix Tomcat server from Eclipse, following the steps below. 按照以下步骤,尝试从Eclipse在Bluemix Tomcat服务器上调试我的Web应用程序时,出现了与Bluemix远程调试会话未启动相同的问题。

  1. Fresh installed eclipse-jee-neon-R-win32-x86_64 and all required Eclipse plugins (eg, the Eclipse tools for Bluemix for Neon,). 全新安装的eclipse-jee-neon-R-win32-x86_64和所有必需的Eclipse插件(例如,用于Bluemix for Neon的Eclipse工具)。
  2. Created a new Cloud Foundry App in Bluemix, selected Tomcat as runtime, then Add Git and build and deploy the sample web app which called 'TomcatHelloWorldApp'. 在Bluemix中创建了一个新的Cloud Foundry App,选择Tomcat作为运行时,然后添加Git并构建和部署了名为“ TomcatHelloWorldApp”的示例Web应用程序。
  3. Clone the 'TomcatHelloWorldApp' web app to my Eclipse from Jazz Git repository. 从Jazz Git存储库将“ TomcatHelloWorldApp” Web应用程序克隆到我的Eclipse。
  4. Created new IBM Bluemix server in Eclipse, add and push the 'TomcatHelloWorldApp' web app. 在Eclipse中创建了新的IBM Bluemix服务器,添加并推送“ TomcatHelloWorldApp” Web应用程序。
  5. Right check the web app under the IBM Bluemix server and select 'Enable Application Debug'. 右键检查IBM Bluemix服务器下的Web应用程序,然后选择“启用应用程序调试”。

But, I get the error below. 但是,我得到下面的错误。 It doesn't work even with the default web app created by Bluemix: 即使使用Bluemix创建的默认Web应用程序也无法使用:

[2016-07-17 14:15:54.854] bluemixMgmgClient - ???? [pool-1-thread-1] .... ERROR --- ClientProxyImpl: Cannot create the websocket connections for asmilk
com.ibm.ws.cloudoe.management.client.exception.ApplicationManagementException: javax.websocket.DeploymentException: The HTTP response from the server [500] did not permit the HTTP upgrade to WebSocket
    at com.ibm.ws.cloudoe.management.client.impl.ClientProxyImpl.onNewClientSocket(ClientProxyImpl.java:161)
    at com.ibm.ws.cloudoe.management.client.impl.ClientProxyImpl$RunServerTask.run(ClientProxyImpl.java:272)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: javax.websocket.DeploymentException: The HTTP response from the server [500] did not permit the HTTP upgrade to WebSocket
    at org.apache.tomcat.websocket.WsWebSocketContainer.connectToServer(WsWebSocketContainer.java:374)
    at com.ibm.ws.cloudoe.management.client.impl.ClientProxyImpl.onNewClientSocket(ClientProxyImpl.java:158)
    ... 6 more
[2016-07-17 14:16:11.938] bluemixMgmgClient - ???? [pool-1-thread-1] .... ERROR --- ClientProxyImpl: Cannot create the websocket connections for asmilk
com.ibm.ws.cloudoe.management.client.exception.ApplicationManagementException: javax.websocket.DeploymentException: The HTTP response from the server [500] did not permit the HTTP upgrade to WebSocket
    at com.ibm.ws.cloudoe.management.client.impl.ClientProxyImpl.onNewClientSocket(ClientProxyImpl.java:161)
    at com.ibm.ws.cloudoe.management.client.impl.ClientProxyImpl$RunServerTask.run(ClientProxyImpl.java:272)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: javax.websocket.DeploymentException: The HTTP response from the server [500] did not permit the HTTP upgrade to WebSocket
    at org.apache.tomcat.websocket.WsWebSocketContainer.connectToServer(WsWebSocketContainer.java:374)
    at com.ibm.ws.cloudoe.management.client.impl.ClientProxyImpl.onNewClientSocket(ClientProxyImpl.java:158)
    ... 6 more

Then I try to modify the code and make it work fine with Java 1.8 Modify the Maven pom.xml file as 然后,我尝试修改代码并使其在Java 1.8中正常工作。将Maven pom.xml文件修改为

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.5.1</version>
            <configuration>
                <source>1.8</source>
                <target>1.8</target>
            </configuration>
        </plugin> 

Add below settings in the manifest.yml file. 在manifest.yml文件中添加以下设置。

  env:
    JBP_CONFIG_IBMJDK: '[version: 1.8.+]'
    JBP_CONFIG_LIBERTY: 'app_archive: {features: [websocket-1.1, servlet-3.1]}

Also modify the Build Shell Command as below 还要如下修改Build Shell命令

#!/bin/bash
export JAVA_HOME=/opt/IBM/java8
mvn -B package

It builds and deploys successfully, and works fine with Java 1.8 now. 它可以成功构建和部署,并且现在可以在Java 1.8上正常运行。

But when I try to 'Enable Application Debug', I got the same problem again... Can you please give any help on this? 但是,当我尝试“启用应用程序调试”时,我又遇到了同样的问题……请您提供任何帮助吗?

如果您将IBM JVM用作工作台JVM,那么Bluemix 故障排除文档将提供更多详细信息来解决此问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM