想请教一下,下面错误如何解决,报错显示连接数据库错误,可是我是复制的书上的源码啊?想知道该如何解决
发表在JavaWeb图书答疑 2021-08-08 悬赏:11 学分 《JavaWeb项目开发实战入门》第2章 51商城
是否精华
版块置顶:

QQ图片20210808201246.jpg

88.jpg


分享到:
精彩评论 6
根号申
学分:4736 LV12
TA的每日心情
2021-07-16 23:48:46
2021-08-09
沙发

给出控制台的异常日志

神经蛙_1645760735
学分:55 LV3
2021-08-12
板凳

根号申 发表于2021-08-09 08:53

给出控制台的异常日志


!ENTRY org.eclipse.jst.jee 4 0 2021-08-12 23:13:41.426

!MESSAGE Cannot invoke "org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.setEncoding(String)" because "res" is null

!STACK 0

java.lang.NullPointerException: Cannot invoke "org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.setEncoding(String)" because "res" is null

at org.eclipse.jst.jee.model.internal.JEE5ModelProvider.createModelResource(JEE5ModelProvider.java:209)

at org.eclipse.jst.jee.model.internal.JEE5ModelProvider.getModelResource(JEE5ModelProvider.java:190)

at org.eclipse.jst.jee.model.internal.Web25ModelProvider.getModelObject(Web25ModelProvider.java:44)

at org.eclipse.jst.jee.model.internal.JEE5ModelProvider.getModelObject(JEE5ModelProvider.java:233)

at org.eclipse.jst.jee.model.internal.Web25MergedModelProvider.getXmlWebApp(Web25MergedModelProvider.java:59)

at org.eclipse.jst.jee.model.internal.Web25MergedModelProvider.internalModelChanged(Web25MergedModelProvider.java:155)

at org.eclipse.jst.jee.model.internal.Web25MergedModelProvider.xmlModelChanged(Web25MergedModelProvider.java:146)

at org.eclipse.jst.jee.model.internal.common.AbstractMergedModelProvider$XmlModelListener.modelsChanged(AbstractMergedModelProvider.java:91)

at org.eclipse.jst.jee.model.internal.JEE5ModelProvider$NotifyRunner.run(JEE5ModelProvider.java:470)

at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)

at org.eclipse.jst.jee.model.internal.JEE5ModelProvider.notifyListeners(JEE5ModelProvider.java:445)

at org.eclipse.jst.jee.model.internal.JEE5ModelProvider.resourceChanged(JEE5ModelProvider.java:117)

at org.eclipse.jst.jee.model.internal.JEE5ModelProvider$ResourceAdapter.notifyChanged(JEE5ModelProvider.java:81)

at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:424)

at org.eclipse.emf.ecore.resource.impl.ResourceImpl.setModified(ResourceImpl.java:1867)

at org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsEList.modified(ResourceImpl.java:486)

at org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsEList.didRemove(ResourceImpl.java:447)

at org.eclipse.emf.common.util.AbstractEList.didClear(AbstractEList.java:170)

at org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsEList.didClear(ResourceImpl.java:466)

at org.eclipse.emf.common.util.BasicEList.clear(BasicEList.java:639)

at org.eclipse.emf.common.notify.impl.NotifyingListImpl.doClear(NotifyingListImpl.java:1158)

at org.eclipse.emf.common.notify.impl.NotifyingListImpl.clear(NotifyingListImpl.java:1085)

at org.eclipse.emf.ecore.resource.impl.ResourceImpl.doUnload(ResourceImpl.java:1699)

at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doUnload(XMLResourceImpl.java:720)

at org.eclipse.emf.ecore.resource.impl.ResourceImpl.unload(ResourceImpl.java:1721)

at org.eclipse.jem.internal.util.emf.workbench.ProjectResourceSetImpl.removeAndUnloadAllResources(ProjectResourceSetImpl.java:885)

at org.eclipse.jem.internal.util.emf.workbench.ProjectResourceSetImpl.release(ProjectResourceSetImpl.java:866)

at org.eclipse.wst.common.internal.emfworkbench.integration.ResourceSetWorkbenchEditSynchronizer.release(ResourceSetWorkbenchEditSynchronizer.java:222)

at org.eclipse.jem.util.emf.workbench.ResourceSetWorkbenchSynchronizer.resourceChanged(ResourceSetWorkbenchSynchronizer.java:184)

at org.eclipse.wst.common.internal.emfworkbench.integration.ResourceSetWorkbenchEditSynchronizer.resourceChanged(ResourceSetWorkbenchEditSynchronizer.java:137)

at org.eclipse.core.internal.events.NotificationManager$1.run(NotificationManager.java:305)

at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)

at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:295)

at org.eclipse.core.internal.events.NotificationManager.handleEvent(NotificationManager.java:271)

at org.eclipse.core.internal.resources.Workspace.broadcastEvent(Workspace.java:376)

at org.eclipse.core.internal.resources.Resource.broadcastPreDeleteEvent(Resource.java:1851)

at org.eclipse.core.internal.resources.Resource.delete(Resource.java:747)

at org.eclipse.core.internal.resources.Project.delete(Project.java:320)

at org.eclipse.ltk.core.refactoring.resource.DeleteResourceChange.perform(DeleteResourceChange.java:155)

at org.eclipse.ltk.core.refactoring.CompositeChange.perform(CompositeChange.java:281)

at org.eclipse.ltk.core.refactoring.CompositeChange.perform(CompositeChange.java:281)

at org.eclipse.ltk.core.refactoring.PerformChangeOperation.lambda$0(PerformChangeOperation.java:258)

at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2313)

at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2338)

at org.eclipse.ltk.core.refactoring.PerformChangeOperation.executeChange(PerformChangeOperation.java:295)

at org.eclipse.ltk.internal.ui.refactoring.UIPerformChangeOperation.executeChange(UIPerformChangeOperation.java:94)

at org.eclipse.ltk.core.refactoring.PerformChangeOperation.run(PerformChangeOperation.java:219)

at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2313)

at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2338)

at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:89)

at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)


根号申
学分:4736 LV12
TA的每日心情
2021-07-16 23:48:46
2021-08-13
地板

把你eclipse使用的JRE环境改成你在已安装的的JDK

神经蛙_1645760735
学分:55 LV3
2021-08-13
4L

根号申 发表于2021-08-13 08:55

把你eclipse使用的JRE环境改成你在已安装的的JDK

老师你好,改完之后,有下列报错,请问该如何解决呢?

image.png

神经蛙_1645760735
学分:55 LV3
2021-08-13
5L

根号申 发表于2021-08-13 08:55

把你eclipse使用的JRE环境改成你在已安装的的JDK

XML文件报错-Multiple annotations found at this line:

这条语句报错,请问老师该如何改一下呢?

<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns="http://xmlns.jcp.org/xml/ns/javaee"xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"id="WebApp_ID" version="3.1">

根号申
学分:4736 LV12
TA的每日心情
2021-07-16 23:48:46
2021-08-14
6L

https://zyk.mingrisoft.com/Develop/view/id/3326/type/6/cid/1.html

首页上一页 1 下一页尾页 6 条记录 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经营性网站备案信息 营业执照