分享

写回答

发帖

[提问] 求助:Java怎么连接MySQL

GoDaddy GoDaddy 1043 人阅读 | 5 人回复

发表于 2010-1-5 12:42:55 | 显示全部楼层 |阅读模式

Deluxe Hosting - Linux主机+MySQL数据库。JSP中调用后台自定义JDBC连接类里,提示找不到此类,无法Import。
提示如下:
HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: Unable to compile class for JSP

Generated servlet error:
/web/tomcat/work/hosting/www.###.com/_/org/apache/jsp/index_jsp.java:6: package com.gangwj.dao does not exist
import com.gangwj.dao.*;
^


Generated servlet error:
/web/tomcat/work/hosting/www.###.com/_/org/apache/jsp/index_jsp.java:8: package com.gangwj.entity does not exist
import com.gangwj.entity.*;
^

回答|共 5 个

mlmm

发表于 2010-1-5 13:03:20 | 显示全部楼层

不懂 java

add.c

发表于 2010-1-5 13:20:59 | 显示全部楼层

参考http://bbs.idcspy.com/thread-40083-1-1.html

xiaoyuezhong

发表于 2010-1-5 17:54:42 | 显示全部楼层

:) ,谢谢高人.

,谢谢高人.

xiaoyuezhong

发表于 2010-1-6 17:52:13 | 显示全部楼层

还没解决。

xiaoyuezhong

发表于 2010-1-8 18:52:36 | 显示全部楼层

有没有人在gd上布署过java程序?

经过两天调试。数据库是解决了,但还有问题。
root cause

java.lang.NoClassDefFoundError
        org.apache.jsp.index_jsp._jspService(index_jsp.java:66)
        org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        sun.reflect.GeneratedMethodAccessor96.invoke(Unknown Source)
        sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        java.lang.reflect.Method.invoke(Method.java:592)
        org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:239)
        java.security.AccessController.doPrivileged(Native Method)
        javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
        org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:266)
        org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:157)
您需要登录后才可以回帖 登录 | 注册

本版积分规则