java mysql驱动异常_你好 java连接数据库异常 ,可能是驱动的原因,但是没弄明白 请大家指教...

-//W3C//DTDHTML4.01Transit...

pageEncoding="utf-8"%>

连接数据库

try{

Class.forName("com.mysql.jdbc.Driver");

String url="jdbc:mysql://localhost:3306/db_firstdatabase";

String username="root";

String password="123456";

Connection conn=DriverManager.getConnection(url,username,password);

if (conn != null){

out.println("数据库连接成功");

conn.close();

}

else{

out.println("数据库连接失败");

}

}catch(ClassNotFoundException e){

e.printStackTrace();

}catch(SQLException e){

e.printStackTrace();

}

%>

以上是源码。

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: org/aspectj/lang/Signature

org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:460)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:355)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:321)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:257)

javax.servlet.http.HttpServlet.service(HttpServlet.java:729)

root cause

javax.servlet.ServletException: org/aspectj/lang/Signature

org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:841)

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:774)

org.apache.jsp.dblink_jsp._jspService(dblink_jsp.java:85)

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)

javax.servlet.http.HttpServlet.service(HttpServlet.java:729)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:321)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:257)

javax.servlet.http.HttpServlet.service(HttpServlet.java:729)

root cause

java.lang.NoClassDefFoundError: org/aspectj/lang/Signature

java.lang.Class.forName0(Native Method)

java.lang.Class.forName(Unknown Source)

org.apache.jsp.dblink_jsp._jspService(dblink_jsp.java:56)

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)

javax.servlet.http.HttpServlet.service(HttpServlet.java:729)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:321)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:257)

javax.servlet.http.HttpServlet.service(HttpServlet.java:729)

展开

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值