- This topic has 13 replies, 5 voices, and was last updated 20 years, 12 months ago by Riyad Kalla.
-
AuthorPosts
-
SeJoMemberhi,
is this normal? when i click in the flow view on a forward (jsp page) then i get this error in a dialog:
Unable to create part: MyEclipse JSP Editor
and the option ok.
also the actions shown are not nicely formatted, how can i make it more showable (every page has the same error action in it, and those lines make it all unreadable :D).It’s all aligned to the left of the window.
I don’t get errors when clicking on an action… then the java editor opens up perfectly.
greetings
Riyad KallaMemberIt sounds like everything is behaving OK besides the error dialog that pops up, is this correct?
SeJoMembernope he does nothing he doesn’t open the editor (at least the jsp editor) but he does open the java editor when pressing an action.
wasn’t the meaning of clicking on an forward for opening the jsp or forward page?
Arnd FlosdorffMember@support-rkalla wrote:
It sounds like everything is behaving OK besides the error dialog that pops up, is this correct?
❓ Hi there,
I’m getting the same result as posted by SeJo: Clicking on a html-forward brings up a blank page, saying “Resource xyz does not exist”.
When clicking on a jsp, I get the error-dialog and a new entry in my eclipse log:!ENTRY org.eclipse.ui.workbench 4 2 Jan 27, 2004 19:26:31.875 !MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.ui.workbench". !STACK 0 java.lang.NullPointerException at de.bb.bje.eclipse.editors.I.<init>(Unknown Source) at de.bb.bje.eclipse.editors.D.getContentAssistant(Unknown Source) at org.eclipse.jface.text.source.SourceViewer.configure(SourceViewer.java:249) at org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl(AbstractTextEditor.java:1960) at org.eclipse.ui.texteditor.StatusTextEditor.createPartControl(StatusTextEditor.java:53) at org.eclipse.ui.editors.text.TextEditor.createPartControl(TextEditor.java:746) at de.bb.bje.eclipse.editors.BJspEditor.createPartControl(Unknown Source) at org.eclipse.ui.part.MultiPageEditorPart.addPage(MultiPageEditorPart.java:107) at de.bb.bje.eclipse.editors.JspMultiPageEditor.Ă(Unknown Source) at de.bb.bje.eclipse.editors.JspMultiPageEditor.createPages(Unknown Source) at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:166) at org.eclipse.ui.internal.PartPane$4.run(PartPane.java:141) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1006) at org.eclipse.core.runtime.Platform.run(Platform.java:413) at org.eclipse.ui.internal.PartPane.createChildControl(PartPane.java:137) at org.eclipse.ui.internal.PartPane.createControl(PartPane.java:186) at org.eclipse.ui.internal.EditorWorkbook.createPage(EditorWorkbook.java:387) at org.eclipse.ui.internal.EditorWorkbook.add(EditorWorkbook.java:123) at org.eclipse.ui.internal.EditorArea.addEditor(EditorArea.java:55) at org.eclipse.ui.internal.EditorPresentation.openEditor(EditorPresentation.java:351) at org.eclipse.ui.internal.EditorManager$2.run(EditorManager.java:585) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69) at org.eclipse.ui.internal.EditorManager.createEditorTab(EditorManager.java:574) at org.eclipse.ui.internal.EditorManager.openInternalEditor(EditorManager.java:668) at org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:459) at org.eclipse.ui.internal.EditorManager.openEditorFromInput(EditorManager.java:333) at org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:424) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2056) at org.eclipse.ui.internal.WorkbenchPage.access$6(WorkbenchPage.java:2004) at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.java:1991) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:1986) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:1871) at com.genuitec.eclipse.struts.editor.floweditor.StrutsGraphDrawer.�(Unknown Source) at com.genuitec.eclipse.struts.editor.floweditor.StrutsGraphDrawer$3.mouseDoubleClicked(Unknown Source) at com.genuitec.eclipse.struts.editor.floweditor.StrutsGraphDrawer$3.mousePressed(Unknown Source) at org.eclipse.draw2d.Figure.handleMousePressed(Figure.java:768) at org.eclipse.draw2d.SWTEventDispatcher.dispatchMousePressed(SWTEventDispatcher.java:163) at org.eclipse.draw2d.LightweightSystem$EventHandler.mouseDown(LightweightSystem.java:423) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:128) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:81) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:840) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2022) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1729) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1402) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1385) at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:858) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) 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:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:291) at org.eclipse.core.launcher.Main.run(Main.java:747) at org.eclipse.core.launcher.Main.main(Main.java:583)
I have Eclipe 2.1.2 and myEclipse 2.7 RC2 installed.
undefined
Scott AndersonParticipantI’m getting the same result as posted by SeJo: Clicking on a html-forward brings up a blank page, saying “Resource xyz does not exist”.
Well, does it exist? 🙂
Can you create a small example project that exhibits the same behavior? With that,
we’ll be able to easily address the issue. It’s probably related to something that is different about your
project setup, but without a copy of your project or one that exhibits similar behavior it will be tough to
diagnose. Any help on creating a test case is greatly appreciated.
Arnd FlosdorffMemberSorry, wrong pipeline
I inadverently posted this before as a private message. Here it is as a public post.
OK, it’s done.
Following this url, you’ll find a project (the struts example app) that exhibits this behavoiur.
http://www.flosdorff.net/misc/testcase.zip
Go for it![/b]
Riyad KallaMemberFirst thing I noticed is that there is no struts.jar file in this project, was that intentional?
Arnd FlosdorffMemberYes that was intentional. To make it work, you’ll have to copy your own struts.jar into WEB-INF/lib.
I just thought I’d keep my zipfile small – I first thought I’d email it to you.
Riyad KallaMemberThis is certainly interesting… I imported the project, lots of errors and warnings. I added struts.jar to the lib folder and build path, also setup the servlet-api.jar from my Tomcat 5 installation. So far so good. Then I moved your TLDs and .XML files all into the root of WEB-INF (just testing, I think they are fine where they are). Then I rebuild the entre project… I don’t have any tasks except for some deprecated warnings now. AND when I open JSPs, they open fine. The weird part is that when I open your struts-config, I get a dialog saying:
“Unable to load module: <default>”
with the following exception in the .log:
java.lang.NumberFormatException: null at java.lang.Integer.parseInt(Unknown Source) at java.lang.Integer.parseInt(Unknown Source) at org.easystruts.eclipse.project.Properties.getStrutsVersion(Unknown Source) at com.genuitec.eclipse.struts.editor.model.StrutsModuleRegistry.ā(Unknown Source) at com.genuitec.eclipse.struts.editor.model.StrutsModuleRegistry.registerModules(Unknown Source) at com.genuitec.eclipse.struts.editor.model.StrutsModuleRegistry.registerModules(Unknown Source) at com.genuitec.eclipse.struts.editor.multipage.StrutsConfigEditor.init(Unknown Source) at org.eclipse.ui.internal.EditorManager.createSite(EditorManager.java:604) at org.eclipse.ui.internal.EditorManager.openInternalEditor(EditorManager.java:666) at org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:459) at org.eclipse.ui.internal.EditorManager.openEditorFromInput(EditorManager.java:333) at org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:424) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2056) at org.eclipse.ui.internal.WorkbenchPage.access$6(WorkbenchPage.java:2004) at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.java:1991) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:1986) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:1887) at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:133) at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:106) at org.eclipse.jdt.internal.ui.actions.OpenActionUtil.open(OpenActionUtil.java:47) at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:158) at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:147) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:191) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:169) at org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:324) at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$3.open(PackageExplorerPart.java:323) at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:397) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1006) at org.eclipse.core.runtime.Platform.run(Platform.java:413) at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:395) at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:605) at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:694) at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:209) at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:204) at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:233) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:81) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:840) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2022) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1729) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1402) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1385) at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:858) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.core.launcher.Main.basicRun(Main.java:291) at org.eclipse.core.launcher.Main.run(Main.java:747) at org.eclipse.core.launcher.Main.main(Main.java:583)
which someone else reported here:
https://www.genuitec.com/forums/topic/error-loading-struts-config-file/&start=0I tried both Michael’s suggestion and Scotts (And a few others) and none of them seemed to work. So I removed Web Capabilities and tried readding it and now get this exception:
java.lang.NullPointerException at com.genuitec.eclipse.j2eedt.core.builder.WebProjectConverter.?(Unknown Source) at com.genuitec.eclipse.j2eedt.core.builder.WebProjectConverter.convert(Unknown Source) at com.genuitec.eclipse.j2eedt.ui.wizard.WebProjectConversionWizard.performFinish(Unknown Source) at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:608) at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:321) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:423) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:89) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:81) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:840) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2022) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1729) at org.eclipse.jface.window.Window.runEventLoop(Window.java:583) at org.eclipse.jface.window.Window.open(Window.java:563) at com.genuitec.eclipse.j2eedt.ui.action.WebProjectConversionActionDelegate.basicRun(Unknown Source) at com.genuitec.eclipse.j2eedt.ui.action.WebProjectConversionActionDelegate.run(Unknown Source) at com.genuitec.eclipse.core.ui.action.LicenseValidatingActionDelegate.runWithEvent(Unknown Source) at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:241) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent(ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0(ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent(ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:81) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:840) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2022) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1729) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1402) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1385) at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:858) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.core.launcher.Main.basicRun(Main.java:291) at org.eclipse.core.launcher.Main.run(Main.java:747) at org.eclipse.core.launcher.Main.main(Main.java:583)
Also note that my .mystrutsdata looks like this:
<?xml version="1.0" encoding="UTF-8"?> <MyEclipseStrutsProperties> <strutsConfig>/WEB-INF/conf/struts-config.xml</strutsConfig> <strutsVersion>1</strutsVersion> <basePackage>/web</basePackage> <strutsRootDir>com.youcompany.struts</strutsRootDir> <strutsApplicationResources>com.youcompany.struts.ApplicationResources</strutsApplicationResources> <strutsPattern>0</strutsPattern> <webVersion>3</webVersion> <servletName>action</servletName> </MyEclipseStrutsProperties>
and .mymetadata like this:
<?xml version="1.0" encoding="UTF-8"?> <project-module context-root="/testcase" name="testcase" archive="testcase.war" type="WEB" id="myeclipse.1075281557515"> <attributes> <attribute name="webrootdir" value="web"/> </attributes> </project-module>
Scott/Michael I hope this is enough for you guys to track down what might be happening here. Let me know if you need me to try a few more things.
Arnd FlosdorffMemberI’ve got it!
When I click on a .jsp or html- forward, the StrutsGraphDrawer calls openEditor like this:IFile ifile = icontainer.getFile(new Path(nodeName)); IWorkbench iworkbench = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().openEditor(ifile);
But the path of the file, that is actually being opened is wrong.
Someone obviously inserts “WEB-INF” into the path between web-Root and the name of the file.
Example: you have a forward to “/login.jsp” and a webroot of “c:/myproject/webroot”.
Physically, your file is to be found at “c:/myproject/webroot/login.jsp”.
But:
The editor tries to open “c:/myproject/webroot/WEB-INF/login.jsp”.That should be easy to fix, don’t you think?
Riyad KallaMemberArnd! Great work. I’ll fire this to Scott.
This was actualy something I was curious about, because when you generate new actions and have the wizards generate the pages for you, they get put in “WEB-INF/forms/” but are references a “/login.jsp” and so forth… so I wondered if the struts tools were assuming all the JSPs would be in/under that location…
Scott AndersonParticipantThanks for all the additional detail. I added this thread as a reference to the bug report
so we can be sure to get it squashed for the GA release.
support-michaelKeymasterI have added a PR on this behavior. Expect a fix in the next release.
Riyad KallaMemberThanks Scott/Michael
-
AuthorPosts