A股上市公司传智教育(股票代码 003032)旗下技术交流社区北京昌平校区

 找回密码
 加入黑马

QQ登录

只需一步,快速开始

  我打开eclipse后,新建了一个struts项目——>新建jsp文件
  但是打不开了!以前也出过这个问题不知道怎么回事!各位大大帮忙看下
  我把详细信息粘过来了(好像太罗嗦了)
   java.lang.NullPointerException
at org.jboss.tools.common.model.project.ProjectHome.getLocationFrom_project_File(ProjectHome.java:62)
at org.jboss.tools.common.model.project.ProjectHome.getLocation(ProjectHome.java:53)
at org.jboss.tools.common.model.project.ProjectHome.getLocation(ProjectHome.java:39)
at org.jboss.tools.common.model.project.ModelNature.checkModelNature(ModelNature.java:237)
at org.jboss.tools.common.model.util.EclipseResourceUtil.getModelNature(EclipseResourceUtil.java:248)
at org.jboss.tools.common.model.util.EclipseResourceUtil.getObjectByResource(EclipseResourceUtil.java:126)
at org.jboss.tools.common.core.resources.XModelObjectEditorInput.convertFileInput(XModelObjectEditorInput.java:203)
at org.jboss.tools.common.core.resources.XModelObjectEditorInput.checkInput(XModelObjectEditorInput.java:180)
at org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditorPart.init(JSPMultiPageEditorPart.java:357)
at org.eclipse.ui.internal.EditorManager.createSite(EditorManager.java:828)
at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:647)
at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:313)
at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180)
at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270)
at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:473)
at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1245)
at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1198)
at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1597)
at org.eclipse.ui.internal.PartStack.add(PartStack.java:493)
at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:103)
at org.eclipse.ui.internal.PartStack.add(PartStack.java:479)
at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:112)
at org.eclipse.ui.internal.EditorSashContainer.addEditor(EditorSashContainer.java:63)
at org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorAreaHelper.java:225)
at org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAreaHelper.java:213)
at org.eclipse.ui.internal.EditorManager.createEditorTab(EditorManager.java:808)
at org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:707)
at org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:666)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2942)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2850)
at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2842)
at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2793)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2789)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2773)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2764)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:651)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:610)
at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:355)
at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:164)
at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:249)
at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:228)
at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:275)
at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:251)
at org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:376)
at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$4.open(PackageExplorerPart.java:538)
at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48)
at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:866)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:864)
at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1152)
at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1256)
at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:275)
at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:269)
at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:309)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)

未命名.jpg (15.25 KB, 下载次数: 53)

未命名.jpg

11 个回复

倒序浏览
我刚刚找到一个解决办法
在要打开的文件上右击——>open with——>(如果打开的是jsp文件)JSP Editor
这样子就打开了,但是双击的话还是打不开,不知道有什么治标的办法吗?而且出现这个错误是为什么呢
回复 使用道具 举报
更改默认的打开方式试试:
选择 window-->Preferenced-->General-->Editors-->File Associations -->(在右边上面的框中选择jsp)-->(然后在下面的框中选择MyEclipse jsp editor )-->点default就可以了。
回复 使用道具 举报
黑马我来了 发表于 2012-5-5 21:30
更改默认的打开方式试试:
选择 window-->Preferenced-->General-->Editors-->File Associations -->(在右边 ...

我试过了不行!问题到底是出在哪里了呢
回复 使用道具 举报
好吧 不得不说 我看不懂英文 查了好久单词对照 对你的问题算是了解了,简单的说按照你的第二种打开方式来说,应该是默认的打开方式没有设置好。
你按照我楼上的方法试下 我这里有中文版本的 EditPlus 文件 注册好的 如果你需要就加我QQ 我传你一个
回复 使用道具 举报
安路凤 发表于 2012-5-5 21:37
我试过了不行!问题到底是出在哪里了呢

还不行额,那就myeclipse工具里的Project-->Clean,选中你的项目重新编译下!
回复 使用道具 举报
好吧 我承认我错了 忘记留QQ了 870528788{:soso_e127:} 我这边是中文版的 目前没出现楼主问题
回复 使用道具 举报
额 我想声明 我用的是eclipse,不知道跟myeclipse是不是一样
而且无论我打开哪个文件都是出的这个错!
回复 使用道具 举报
https://community.jboss.org/message/566698?_sscc=t
错误跟这个一样,看起来说是JBossAS版本出的问题,上面那网页5楼/7楼正解,照做下看看吧
回复 使用道具 举报
Please try, for JBossAS Tools Version: 2.0.2.v200910211631N-H194-GA, to remove from your custom project file .settings/org.jboss.tools.jst.web.xml
这个吗??版本问题吗
回复 使用道具 举报
安路凤 发表于 2012-5-6 07:51
Please try, for JBossAS Tools Version: 2.0.2.v200910211631N-H194-GA, to remove from your custom proj ...

嗯对,解决了吧?
回复 使用道具 举报
用myeclipse吧,虽然可能多占点内存,但是还是蛮好用的额,出问题的几率会的少些;我用的6.5,内存不到200,还不错
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 加入黑马