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

时间:2016-07-17 07:26:11

标签: java eclipse debugging tomcat ibm-cloud

我遇到与Bluemix remote debugging session not starting相同的问题  尝试从Eclipse在Bluemix Tomcat服务器上调试我的Web应用程序时,请按照以下步骤操作。

  1. 全新安装的eclipse-jee-neon-R-win32-x86_64等等 必需的Eclipse插件(例如,用于Neon的Bluemix的Eclipse工具)。
  2. 在Bluemix中创建了一个新的Cloud Foundry应用程序 Tomcat作为运行时,然后添加Git并构建和部署示例Web 应用程序称为'TomcatHelloWorldApp'。
  3. 克隆了 来自Jazz Git的'TomcatHelloWorldApp'网络应用程序到我的Eclipse 库中。
  4. 在Eclipse中创建新的IBM Bluemix服务器,添加 并推送'TomcatHelloWorldApp'网络应用程序。
  5. 右键检查IBM Bluemix服务器下的Web应用程序,然后选择“启用应用程序调试”。
  6. 但是,我收到以下错误。即使使用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
    

    然后我尝试修改代码并使其与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> 
    

    在manifest.yml文件中添加以下设置。

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

    同时修改Build Shell Command,如下所示

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

    它成功构建和部署,现在可以正常使用Java 1.8。

    但是当我尝试'启用应用程序调试'时,我又遇到了同样的问题...... 你能对此提供任何帮助吗?

1 个答案:

答案 0 :(得分:0)

如果您使用IBM JVM作为工作台JVM,则Bluemix troubleshoot doc有更多详细信息可以解决此问题。