1

ソースをコンパイルして Tomcat Web サーバーにデプロイするためのスクリプトが与えられました。

Eclipse でソースをコンパイルすると、問題なくコンパイルされます。

しかし、スクリプトを使用すると、次の出力が得られます。

Buildfile: C:\Dev\workworkspace\myapp\build.xml
     [echo] website root dir is C:/Dev/ServerXamp/tomcat/myapp/myapp line sepa
rator is

clean-build:

compile:
    [mkdir] Created dir: C:\Dev\workworkspace\myapp\build\classes
    [javac] Compiling 86 source files to C:\Dev\workworkspace\myapp\build\c
lasses
    [javac] C:\Dev\workworkspace\myapp\main\src\com\myapp\problempackage\problemclass.java:6: error: package org.apache.catalina.websocket does
 not exist
    [javac] import org.apache.catalina.websocket.*;
    [javac] ^
    [javac] C:\Dev\workworkspace\myapp\main\src\com\myapp\problempackage\problemclass.java.java:7: error: package org.apache.catalina.websocket does
 not exist
    [javac] import org.apache.catalina.websocket.*;
    [javac] ^
    [javac] C:\Dev\workworkspace\myapp\main\src\com\myapp\problempackage\problemclass.java:14: error: cannot find symbol
    [javac] public class problemclass extends MessageInbound
    [javac]                                                   ^
    [javac]   symbol: class MessageInbound
    [javac] C:\Dev\workworkspace\myapp\main\src\com\myapp\problempackage\problemclass.java:25: error: cannot find symbol
    [javac]     private WsOutbound _out;
    [javac]             ^
    [javac]   symbol:   class WsOutbound
    [javac]   location: class problemclass
    [javac] C:\Dev\workworkspace\myapp\main\src\com\myapp\problempackage\problemclass.java:83: error: cannot find symbol
    [javac]     protected  void onOpen(WsOutbound outbound) {
    [javac]                            ^
    [javac]   symbol:   class WsOutbound
    [javac]   location: class problemclass
    [javac] C:\Dev\workworkspace\myapp\main\src\com\myapp\problempackage\problemclass.java:15: error: package org.apache.catalina.websocket does not
 exist
    [javac] import org.apache.catalina.websocket.StreamInbound;
    [javac]                                     ^
    [javac] C:\Dev\workworkspace\myapp\main\src\com\myapp\problempackage\problemclass.java:37: error: cannot find symbol
    [javac]     protected StreamInbound createWebSocketInbound(String subProtoco
l, HttpServletRequest request)
    [javac]               ^
    [javac]   symbol:   class StreamInbound
    [javac]   location: class problemclass
    [javac] C:\Dev\workworkspace\myapp\main\src\com\myapp\problempackage\problemclassServer.java:795: error: bad operand types for binary operator '!='
    [javac]             if (userInfo.websocket != null)
    [javac]                                    ^
    [javac]   first type:  problemclass
    [javac]   second type: <null>
    [javac] C:\Dev\workworkspace\myapp\main\src\com\myapp\problempackage\problemclassServer.java:4593: error: bad operand types for binary operator '!='
    [javac]         if (userInfo.websocket != null)
    [javac]                                ^
    [javac]   first type:  problemclass
    [javac]   second type: <null>
    [javac] C:\Dev\workworkspace\myapp\main\src\com\myapp\problempackage\problemclassServer.java:4907: error: bad operand types for binary operator '!='
    [javac]             if (userInfo.websocket != null)
    [javac]                                    ^
    [javac]   first type:  problemclass
    [javac]   second type: <null>
    [javac] Note: C:\Dev\workworkspace\myapp\main\src\com\myapp\problempackage\problemclassServer.java uses or overrides a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] 10 errors

BUILD FAILED
C:\Dev\workworkspace\myapp\build.xml:96: Compile failed; see the compiler e
rror output for details.

Total time: 7 seconds
4

1 に答える 1