有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

Glassfish 4.0服务器中的eclipse Java Web服务部署错误

我正在编写一个简单的JavaWeb服务,它几乎没有使用java中的SQL库创建和访问数据库的方法。当我试图在Glassfish 4.0上部署它时,我得到如下错误。请帮助我部署我试图捕获访问数据库的方法中的所有异常。 我的Web服务代码有如下方法:

public boolean processOrder(int cust_id) throws ClassNotFoundException, SQLException{
    try{
        Class.forName(JDBC_DRIVER);
        System.out.println("Connecting to Database...");
        Connection conn = null;
        Statement stmt = null;
        conn = DriverManager.getConnection(newDB_URL,USER,PASS);
        stmt = conn.createStatement();
        String sql = "DELETE FROM Orders WHERE cust_id ="+cust_id;
        stmt.executeUpdate(sql);
        return true;
    }catch(SQLException se){
        se.printStackTrace(); }catch(Exception e){
        e.printStackTrace(); }
    return false;
}

上面给出的方法就是这样一种方法,很少有其他方法,它们以某种方式或其他相同的任务访问数据库。下面给出了在Glassfish上部署时遇到的错误

cannot Deploy FalseSecure
deploy is failing=Error occurred during deployment: Exception while loading the app  
java.lang.IllegalStateException: ContainerBase.addChild: start:    org.apache.catalina.LifecycleException: java.lang.RuntimeException: Servlet web service  endpoint '' failure. Please see server.log for more details.

我正在使用EclipseIDE来完成这个项目。请跟踪服务器。日志如下所示。 请查找服务器。云中的日志文件太大,无法复制到这里。 链接:https://dl.dropboxusercontent.com/u/62247131/server.log


共 (0) 个答案