使用Java和GWT的巡航控制中不存在包javax.servlet

时间:2012-06-12 11:49:25

标签: java gwt cruisecontrol

我正在研究Cruise控制。我得到以下例外:

    [javac] /root/CruiseControl/cruisecontrol-bin-2.8.4/checkout/Demo/src/com/Project Name/server/guice/BootstrapListener.java:7: cannot access javax.servlet.ServletContextListener
    [javac] class file for javax.servlet.ServletContextListener not found
    [javac] public class BootstrapListener extends GuiceServletContextListener {
    [javac]        ^
    [javac] /root/CruiseControl/cruisecontrol-bin-2.8.4/checkout/Demo/src/com/Project Name/server/search/IndexerServlet.java:8: package javax.servlet does not exist
    [javac] import javax.servlet.ServletContext;
    [javac]                     ^
    [javac] /root/CruiseControl/cruisecontrol-bin-2.8.4/checkout/Demo/src/com/Project Name/server/search/IndexerServlet.java:9: package javax.servlet does not exist
    [javac] import javax.servlet.ServletException;
    [javac]                     ^
    [javac] /root/CruiseControl/cruisecontrol-bin-2.8.4/checkout/Demo/src/com/Project Name/server/search/IndexerServlet.java:10: package javax.servlet.http does not exist
    [javac] import javax.servlet.http.HttpServlet;
    [javac]                          ^
    [javac] /root/CruiseControl/cruisecontrol-bin-2.8.4/checkout/Demo/src/com/Project Name/server/search/IndexerServlet.java:11: package javax.servlet.http does not exist
    [javac] import javax.servlet.http.HttpServletRequest;
    [javac]                          ^
    [javac] /root/CruiseControl/cruisecontrol-bin-2.8.4/checkout/Demo/src/com/Project Name/server/search/IndexerServlet.java:12: package javax.servlet.http does not exist
    [javac] import javax.servlet.http.HttpServletResponse;
    [javac]                          ^
    [javac] /root/CruiseControl/cruisecontrol-bin-2.8.4/checkout/Demo/src/com/Project Name/server/search/IndexerServlet.java:26: cannot find symbol
    [javac] symbol: class HttpServlet
    [javac] public class IndexerServlet extends HttpServlet {
    [javac]                                     ^
    [javac] /root/CruiseControl/cruisecontrol-bin-2.8.4/checkout/Demo/src/com/Project Name/server/search/IndexerServlet.java:29: cannot find symbol
    [javac] symbol  : class HttpServletRequest
    [javac] location: class com.Project Name.server.search.IndexerServlet
    [javac]     protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
    [javac]                          ^
    [javac] /root/CruiseControl/cruisecontrol-bin-2.8.4/checkout/Demo/src/com/Project Name/server/search/IndexerServlet.java:29: cannot find symbol
    [javac] symbol  : class HttpServletResponse
    [javac] location: class com.Project Name.server.search.IndexerServlet
    [javac]     protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
    [javac]                                                  ^
    [javac] /root/CruiseControl/cruisecontrol-bin-2.8.4/checkout/Demo/src/com/Project Name/server/search/IndexerServlet.java:29: cannot find symbol
    [javac] symbol  : class ServletException
    [javac] location: class com.Project Name.server.search.IndexerServlet
    [javac]     protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
    [javac]                                                                                   ^
    [javac] /root/CruiseControl/cruisecontrol-bin-2.8.4/checkout/Demo/src/com/Project Name/server/service/ActionDispatchServlet.java:15: cannot access javax.servlet.http.HttpServlet
    [javac] class file for javax.servlet.http.HttpServlet not found
    [javac] public class ActionDispatchServlet extends RemoteServiceServlet implements StandardDispatchService {
    [javac]        ^
    [javac] /root/CruiseControl/cruisecontrol-bin-2.8.4/checkout/Demo/src/com/Project Name/server/service/ConfigurationServlet.java:8: package javax.servlet does not exist
    [javac] import javax.servlet.ServletConfig;
    [javac]                     ^
    [javac] /root/CruiseControl/cruisecontrol-bin-2.8.4/checkout/Demo/src/com/Project Name/server/service/ConfigurationServlet.java:10: package javax.servlet does not exist
    [javac] import javax.servlet.ServletException;
    [javac]                     ^
    [javac] /root/CruiseControl/cruisecontrol-bin-2.8.4/checkout/Demo/src/com/Project Name/server/service/ConfigurationServlet.java:25: cannot find symbol
    [javac] symbol: class HttpServlet
    [javac] public class ConfigurationServlet extends HttpServlet {
    [javac]                                           ^
    [javac] /root/CruiseControl/cruisecontrol-bin-2.8.4/checkout/Demo/src/com/Project Name/server/service/ConfigurationServlet.java:31: cannot find symbol
    [javac] symbol  : class ServletConfig
    [javac] location: class com.Project Name.server.service.ConfigurationServlet
    [javac]     public void init(ServletConfig servletConfig) {
    [javac]                      ^
    [javac] /root/CruiseControl/cruisecontrol-bin-2.8.4/checkout/Demo/src/com/Project Name/server/service/FacebookLoginServlet.java:17: package javax.servlet.http does not exist
    [javac] import javax.servlet.http.HttpServletRequest;
    [javac]                          ^
    [javac] /root/CruiseControl/cruisecontrol-bin-2.8.4/checkout/Demo/src/com/Project Name/server/service/FacebookLoginServlet.java:18: package javax.servlet.http does not exist
    [javac] import javax.servlet.http.HttpServletResponse;
    [javac]                          ^
    [javac] /root/CruiseControl/cruisecontrol-bin-2.8.4/checkout/Demo/src/com/Project Name/server/service/FacebookLoginServlet.java:19: package javax.servlet.http does not exist
    [javac] import javax.servlet.http.HttpSession;
    [javac]                          ^
    [javac] /root/CruiseControl/cruisecontrol-bin-2.8.4/checkout/Demo/src/com/Project Name/server/service/FacebookLoginServlet.java:40: cannot find symbol
    [javac] symbol: class HttpServlet
    [javac] public class FacebookLoginServlet extends HttpServlet{
    [javac]                                           ^
    [javac] /root/CruiseControl/cruisecontrol-bin-2.8.4/checkout/Demo/src/com/Project Name/server/service/FacebookLoginServlet.java:50: cannot find symbol
    [javac] symbol  : class HttpServletRequest
    [javac] location: class com.Project Name.server.service.FacebookLoginServlet
    [javac]     protected void doGet(HttpServletRequest req, HttpServletResponse resp)throws ServletException, IOException {
    [javac]                          ^
    [javac] /root/CruiseControl/cruisecontrol-bin-2.8.4/checkout/Demo/src/com/Project Name/server/service/FacebookLoginServlet.java:50: cannot find symbol
    [javac] symbol  : class HttpServletResponse
    [javac] location: class com.Project Name.server.service.FacebookLoginServlet
    [javac]     protected void doGet(HttpServletRequest req, HttpServletResponse resp)throws ServletException, IOException {
    [javac]                                                  ^
    [javac] /root/CruiseControl/cruisecontrol-bin-2.8.4/checkout/Demo/src/com/Project Name/server/service/FacebookLoginServlet.java:50: cannot find symbol
    [javac] symbol  : class ServletException
    [javac] location: class com.Project Name.server.service.FacebookLoginServlet
    [javac]     protected void doGet(HttpServletRequest req, HttpServletResponse resp)throws ServletException, IOException {
    [javac]                                                                                  ^
    [javac] /root/CruiseControl/cruisecontrol-bin-2.8.4/checkout/Demo/src/com/Project Name/server/service/handlers/CommandHandler.java:7: package javax.servlet.http does not exist
    [javac] import javax.servlet.http.HttpSession;
    [javac]                          ^
    [javac] /root/CruiseControl/cruisecontrol-bin-2.8.4/checkout/Demo/src/com/Project Name/server/service/handlers/CommandHandler.java:28: cannot find symbol
    [javac] symbol  : class ServletContext
    [javac] location: class com.Project Name.server.service.handlers.CommandHandler
    [javac]     Provider<ServletContext> provider;
    [javac]              ^
    [javac] /root/CruiseControl/cruisecontrol-bin-2.8.4/checkout/Demo/src/com/Project Name/server/service/handlers/CommandHandler.java:29: cannot find symbol
    [javac] symbol  : class HttpSession
    [javac] location: class com.Project Name.server.service.handlers.CommandHandler
    [javac]     Provider<HttpSession> sessionProvider;
    [javac]              ^
    [javac] /root/CruiseControl/cruisecontrol-bin-2.8.4/checkout/Demo/src/com/Project Name/server/service/handlers/CommandHandler.java:32: cannot find symbol
    [javac] symbol  : class ServletContext
    [javac] location: class com.Project Name.server.service.handlers.CommandHandler
    [javac]     public CommandHandler(Provider<ServletContext> provider,
    [javac]                                    ^
    [javac] /root/CruiseControl/cruisecontrol-bin-2.8.4/checkout/Demo/src/com/Project Name/server/service/handlers/CommandHandler.java:33: cannot find symbol
    [javac] symbol  : class HttpSession
    [javac] location: class com.Project Name.server.service.handlers.CommandHandler
    [javac]             Provider<HttpSession> sessionPro) {
    [javac]                      ^
    [javac] /root/CruiseControl/cruisecontrol-bin-2.8.4/checkout/Demo/src/com/Project Name/server/service/handlers/DeleteEntityHandler.java:7: package javax.servlet.http does not exist
    [javac] import javax.servlet.http.HttpSession;
    [javac]                          ^
    [javac] /root/CruiseControl/cruisecontrol-bin-2.8.4/checkout/Demo/src/com/Project Name/server/service/handlers/DeleteEntityHandler.java:28: cannot find symbol
    [javac] symbol  : class ServletContext
    [javac] location: class com.Project Name.server.service.handlers.DeleteEntityHandler
    [javac]     Provider<ServletContext> provider;
    [javac]              ^
    [javac] /root/CruiseControl/cruisecontrol-bin-2.8.4/checkout/Demo/src/com/Project Name/server/service/handlers/DeleteEntityHandler.java:29: cannot find symbol
    [javac] symbol  : class HttpSession
    [javac] location: class com.Project Name.server.service.handlers.DeleteEntityHandler
    [javac]     Provider<HttpSession> sessionProvider;
    [javac]              ^
    [javac] /root/CruiseControl/cruisecontrol-bin-2.8.4/checkout/Demo/src/com/Project Name/server/service/handlers/DeleteEntityHandler.java:32: cannot find symbol
    [javac] symbol  : class ServletContext
    [javac] location: class com.Project Name.server.service.handlers.DeleteEntityHandler
    [javac]     public DeleteEntityHandler(Provider<ServletContext> provider,
    [javac]                                         ^
    [javac] /root/CruiseControl/cruisecontrol-bin-2.8.4/checkout/Demo/src/com/Project Name/server/service/handlers/DeleteEntityHandler.java:33: cannot find symbol
    [javac] symbol  : class HttpSession
    [javac] location: class com.Project Name.server.service.handlers.DeleteEntityHandler
    [javac]             Provider<HttpSession> sessionPro) {
    [javac]                      ^
    [javac] /root/CruiseControl/cruisecontrol-bin-2.8.4/checkout/Demo/src/com/Project Name/server/service/handlers/DeleteEntityQueryHandler.java:7: package javax.servlet.http does not exist
    [javac] import javax.servlet.http.HttpSession;
    [javac]                          ^
    [javac] /root/CruiseControl/cruisecontrol-bin-2.8.4/checkout/Demo/src/com/Project Name/server/service/handlers/DeleteEntityQueryHandler.java:31: cannot find symbol
    [javac] symbol  : class ServletContext
    [javac] location: class com.Project Name.server.service.handlers.DeleteEntityQueryHandler
    [javac]     Provider<ServletContext> provider;
    [javac]              ^
    [javac] /root/CruiseControl/cruisecontrol-bin-2.8.4/checkout/Demo/src/com/Project Name/server/service/handlers/DeleteEntityQueryHandler.java:32: cannot find symbol
    [javac] symbol  : class HttpSession
    [javac] location: class com.Project Name.server.service.handlers.DeleteEntityQueryHandler
    [javac]     Provider<HttpSession> sessionProvider;
    [javac]              ^
    [javac] /root/CruiseControl/cruisecontrol-bin-2.8.4/checkout/Demo/src/com/Project Name/server/service/handlers/DeleteEntityQueryHandler.java:35: cannot find symbol
    [javac] symbol  : class ServletContext
    [javac] location: class com.Project Name.server.service.handlers.DeleteEntityQueryHandler
    [javac]     public DeleteEntityQueryHandler(Provider<ServletContext> provider,
    [javac]                                              ^
    [javac] /root/CruiseControl/cruisecontrol-bin-2.8.4/checkout/Demo/src/com/Project Name/server/service/handlers/DeleteEntityQueryHandler.java:36: cannot find symbol
    [javac] symbol  : class HttpSession
    [javac] location: class com.Project Name.server.service.handlers.DeleteEntityQueryHandler
    [javac]             Provider<HttpSession> sessionPro) {
    [javac]                      ^
    [javac] /root/CruiseControl/cruisecontrol-bin-2.8.4/checkout/Demo/src/com/Project Name/server/service/handlers/DiscoverHandler.java:7: package javax.servlet.http does not exist
    [javac] import javax.servlet.http.HttpSession;
    [javac]                          ^
    [javac] /root/CruiseControl/cruisecontrol-bin-2.8.4/checkout/Demo/src/com/Project Name/server/service/handlers/DiscoverHandler.java:28: cannot find symbol

BUILD FAILED
/root/CruiseControl/cruisecontrol-bin-2.8.4/cc-build.xml:19: The following error occurred while executing this line:
/root/CruiseControl/cruisecontrol-bin-2.8.4/checkout/Demo/buildtest.xml:102: Compile failed; see the compiler error output for details.

1 个答案:

答案 0 :(得分:0)

servlet API jar不在你的类路径中,请参考这个answer