已有101人关注
“Java项目开发全程实录 第4版”的第九章“企业门户网站(JSP+JavaBean+SQL Server 2014实现)”index.jsp文件出现了这样一个报错
发表在Java图书答疑 2021-01-10 悬赏:1 学分 《Java项目开发全程实录(第3版)》第9章 企业门户网站(JSP+JavaBean+SQL Server 2000实现)
是否精华
版块置顶:

你好,我的问题是出自于“Java项目开发全程实录 第4版”的第九章“企业门户网站(JSP+JavaBean+SQL Server 2014实现)”。在用eclipse运行程序时index.jsp文件出现了这样一个报错org.apache.jasper.JasperException: 在 [41] 行处理 [index.jsp] 时发生异常。具体报错如下:

org.apache.jasper.JasperException: 在 [41] 行处理 [index.jsp] 时发生异常


38:

39: <tr>

40: <td colspan="2" rowspan="2" width="405" height="20"><table width="100%"  border="0"  background="images/17.gif" height="20">

41:           <%Collection temp2=sql.selectNews();

42:   Iterator it2=temp2.iterator();

43: while(it2.hasNext()){

44: news news=(news)it2.next();%>



Stacktrace:

at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:626)

at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:500)

at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385)

at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

at com.wsy.Filter.ModifyCode.doFilter(ModifyCode.java:23)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)

at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)

at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:690)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)

at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:374)

at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)

at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:888)

at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1597)

at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)

at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)

at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)

at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

at java.base/java.lang.Thread.run(Thread.java:832)

Caused by: javax.servlet.ServletException: java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter

at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:666)

at org.apache.jsp.index_jsp._jspService(index_jsp.java:326)

at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:71)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)

at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:477)

... 28 more

Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter

at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(SQLServerConnection.java:4098)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:3160)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$100(SQLServerConnection.java:43)

at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:3123)

at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7505)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:2445)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1981)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:1628)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectInternal(SQLServerConnection.java:1459)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:773)

at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1168)

at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:677)

at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:228)

at com.wsy.connsqlserver.getConnection(connsqlserver.java:26)

at com.wsy.connsqlserver.executeQuery(connsqlserver.java:33)

at com.wsy.selectsql.selectNews(selectsql.java:145)

at org.apache.jsp.index_jsp._jspService(index_jsp.java:173)

... 31 more

Caused by: java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter

at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1365)

at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1188)

... 48 more

我浏览了之前的帖子,也有一个同学和我出现了一样的情况,在那里您说可能是jdk版本问题,建议将jdk版本改为8。在这里说明下,我的jdk版本是14。然后那个同学后来也没回复到底改jdk有没有用。麻烦老师能够解答下。


分享到:
精彩评论 7
林汤梅纹_1610266989
学分:10 LV2
林汤梅纹_1610266989
学分:10 LV2
2021-01-10
板凳

补充说明下,我这本书是第4版,因为选择框里没有第4版的选项,所以我给写了第3版,不好意思。

林汤梅纹_1610266989
学分:10 LV2
林汤梅纹_1610266989
学分:10 LV2
林汤梅纹_1610266989
学分:10 LV2
2021-01-10
5L

各位大哥,谁能帮我解答一下,“根号申”老师?

林汤梅纹_1610266989
学分:10 LV2
2021-01-11
6L

我费了老大功夫,将jdk版本换成了8版本,还是不行,吐血

根号申
学分:4736 LV12
TA的每日心情
2021-07-16 23:48:46
2021-01-15
7L

jaxb.rar

导入这三个包,如果不报错了,说明你的环境并不是8

首页上一页 1 下一页尾页 7 条记录 1/1页
手机同步功能介绍
友情提示:以下图书配套资源能够实现手机同步功能
明日微信公众号
明日之星 明日之星编程特训营
客服热线(每日9:00-17:00)
400 675 1066
mingrisoft@mingrisoft.com
吉林省明日科技有限公司Copyright ©2007-2022,mingrisoft.com, All Rights Reserved长春市北湖科技开发区盛北大街3333号长春北湖科技园项目一期A10号楼四、五层
吉ICP备10002740号-2吉公网安备22010202000132经营性网站备案信息 营业执照