首页上一页 1 下一页尾页 1 条记录 1/1页
《JSP项目开发案例全程实录》第1章源码无法正常运行问题
发表在JavaWeb图书答疑
2012-04-03
是否精华
是
否
版块置顶:
是
否
《JSP项目开发案例全程实录》第1章源码无法正常运行问题
1、将源码导入到myeclipse工程中
2、修改connDB.properties文件,修改为jdbc:mysql://127.0.0.1:3306/db_CityInfo?user=sa&password=mima&useUnicode=true
3、修改DB.java文件
private String user="sa";
private String password="mima";
private String url="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=db_CityInfo";
4、用sql2008附加数据库文件,数据库名为db_CityInfo
5、部署并打开网页
结果出现异常,除了上面的步骤外还要进行什么操作吗?
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Filter execution threw an exception
root cause
java.lang.NoClassDefFoundError: Could not initialize class com.yxq.action.IndexAction
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
java.lang.reflect.Constructor.newInstance(Constructor.java:513)
java.lang.Class.newInstance0(Class.java:355)
1、将源码导入到myeclipse工程中
2、修改connDB.properties文件,修改为jdbc:mysql://127.0.0.1:3306/db_CityInfo?user=sa&password=mima&useUnicode=true
3、修改DB.java文件
private String user="sa";
private String password="mima";
private String url="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=db_CityInfo";
4、用sql2008附加数据库文件,数据库名为db_CityInfo
5、部署并打开网页
结果出现异常,除了上面的步骤外还要进行什么操作吗?
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Filter execution threw an exception
root cause
java.lang.NoClassDefFoundError: Could not initialize class com.yxq.action.IndexAction
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
java.lang.reflect.Constructor.newInstance(Constructor.java:513)
java.lang.Class.newInstance0(Class.java:355)