- This topic has 24 replies, 4 voices, and was last updated 18 years, 11 months ago by
kmarx.
-
AuthorPosts
-
mwunderlichMemberDear all,
I am currently examining the Struts capabilities of MyEclipse IDE. I have created a project, which was working fine, when all of a sudden I get this following error:
"Unable to create this part due to an internal error. Reason for the failure: An unexpected exception was thrown."
This occurs when I try to open struts-config.xml. The full stack trace is pasted below.
I am using Eclipse 3.1.1. and MyEclipse 4.0.3 under Win XP Pro with JDK 1.5.0_05.I noticed another problem, as well, which was discussed extensively here:
https://www.genuitec.com/forums/topic/struts-design-pane-empty-closed/#post-219990The symptons are the exact same in my case, only that switching to a different JDK version does not solve the problem (tried 1.5.0 and 1.4.2_10).
I tried starting eclipse from the command line with “eclipse.exe -clean”, but no success. Any ideas what else I could try?
Cheers,
Martin
java.lang.NullPointerException at com.genuitec.eclipse.struts.editor.model.ModelManager.getGlobalForwardConfigs(ModelManager.java:198) at com.genuitec.eclipse.struts.editor.modeler.model.StrutsConfigDiagram.synchronizeDiagram(StrutsConfigDiagram.java:450) at com.genuitec.eclipse.struts.editor.modeler.model.StrutsConfigDiagram.differedSynchronize(StrutsConfigDiagram.java:118) at com.genuitec.eclipse.struts.editor.multipage.StrutsConfigEditor.createPages(StrutsConfigEditor.java:292) at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:241) at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:609) at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:384) at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:552) at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:283) at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:126) at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:268) at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65) at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:391) at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1102) at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1051) at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1256) at org.eclipse.ui.internal.PartStack.add(PartStack.java:442) at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:109) at org.eclipse.ui.internal.EditorSashContainer.addEditor(EditorSashContainer.java:60) at org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorAreaHelper.java:212) at org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAreaHelper.java:202) at org.eclipse.ui.internal.EditorManager.createEditorTab(EditorManager.java:758) at org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:665) at org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:628) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2360) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2295) at org.eclipse.ui.internal.WorkbenchPage.access$9(WorkbenchPage.java:2287) at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.java:2273) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2268) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2249) at org.eclipse.ui.ide.IDE.openEditor(IDE.java:371) at org.eclipse.ui.ide.IDE.openEditor(IDE.java:334) at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:251) at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:131) at org.eclipse.jdt.internal.ui.actions.OpenActionUtil.open(OpenActionUtil.java:49) at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:169) at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:153) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:222) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:198) at org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:296) at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$4.open(PackageExplorerPart.java:869) at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:741) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1044) at org.eclipse.core.runtime.Platform.run(Platform.java:783) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:148) at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:739) at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:968) at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1067) at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:243) at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:238) at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:277) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3080) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2713) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:367) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163) 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:585) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334) at org.eclipse.core.launcher.Main.basicRun(Main.java:278) at org.eclipse.core.launcher.Main.run(Main.java:973) at org.eclipse.core.launcher.Main.main(Main.java:948)
Riyad KallaMemberCan you paste the result of MyEclipse > About > COnfiguration SUmmary for me, also the contents of your struts-config.xml file.
mwunderlichMemberSure, no problem. Here you go:
*** Date: Sat Mar 04 09:20:01 GMT 2006
*** System properties:
OS=WindowsXP
OS version=5.1
Java version=1.5.0_05*** MyEclipse details:
MyEclipse Enterprise WorkbenchVersion: 4.0.3 GA
Build id: 20051025-4.0.3-GA*** Eclipse details:
ObjectWeb Lomboz
An Eclipse based IDE for J2EE Development
Version: 1.0.0This program and the accompanying materials are
made available under the terms of the
Eclipse Public License v1.0http://www.eclipse.org/legal/epl-v10.html
Eclipse Project SDKVersion: 3.1.1
Build id: M20050929-0840Eclipse Platform
Version: 3.1.1
Build id: M20050929-0840Eclipse Java Development Tools
Version: 3.1.1
Build id: M20050929-0840Eclipse Graphical Editing Framework
Version: 3.1
Build id: 200509301327Eclipse RCP
Version: 3.1.1
Build id: M20050929-0840Eclipse Plug-in Development Environment
Version: 3.1.1
Build id: M20050929-0840Eclipse startup command=-os
win32
-ws
win32
-arch
x86
-launcher
F:\eclipse\eclipse.exe
-name
Eclipse
-showsplash
600
-exitdata
cb8_6c
-vm
C:\Programme\Java\jdk1.5.0_05\bin\javaw.exe=======================================================
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd"> <struts-config> <data-sources /> <form-beans > </form-beans> <global-exceptions /> <global-forwards > <forward name="unknown" path="/unknown.jsp" /> </global-forwards> <action-mappings> <action attribute="courseSearchForm" input="/courseSearch.jsp" name="courseSearchForm" path="/courseSearch" scope="request" type="eclipse.kickstart.struts.action.CourseSearchAction"> <forward name="success" path="/results.jsp" /> </action> </action-mappings> <message-resources parameter="eclipse.kickstart.struts.ApplicationResources" /> </struts-config>
mwunderlichMemberI might have found what causes the error with displaying struts-config.xml. I created a new project, so that I could move on. I was working away happily, until I pressed “Ctrl+Shift+F4” to close all editors. After this operation I can’t display struts-config.xml anymore and instead I get the error message “Unable to create this part due to an internal error.”
Cheers,
M.
Riyad KallaMemberIf you restart using the -clean command line argument, does it start behaving again?
mwunderlichMember@support-rkalla wrote:
If you restart using the -clean command line argument, does it start behaving again?
I tried that, but it doesn’t change. I still can’t display struts-config.
Cheers,
Martin
Riyad KallaMemberI can’t reproduce this to save my life. Let’s try a clean workspace: File > Switch Workspace > C:\tempworkspace, hit OK to restart. Then create a new project, add Struts caps to it, then paste the above into your struts-config.xml file and open a bunch of files and close them with CTRL-SHIFT-F4, did it still die? I can open it just fine.
mwunderlichMemberI tried the above procedure, on a different machine and with a clean installation of Eclipse and MyEclipse. Everything’s fine now and I can even see the visual editor for the Struts stuff (looks lovely). So, I guess there’s a problem with the installation on the other system and I’ll to solve it by reinstalling the IDE.
Cheers,
Martin
Riyad KallaMemberKeep me posted with what happens, very strange.
mwunderlichMemberAlright, so the sage continues:
I tried removing the whole eclipse directory on the initial machine and uninstalling MyEclipse. I reinstalled eclipse and MyEclipse on top of it. One strange thing I noticed was that MyEclipse wouldn’t copy the features and plug-ins into the correct directory and I had to move them manually from MyEclipse/eclipse/plug-ins to the correct directory in my eclipse installation directory.
Anyway, I created a new web project, added structs capabilities and tried opening the struts-config.xml file. Now I get a dialog box informing me: “An error has occurred. See error log for more details.” So, what error log is it talking about and where can I find it?
Please find the config summary below.Cheers,
Martin
PS: I have tried starting with “eclipse.exe -clean”.
PPS: Isn’t ironic that IDEs are supposed to improve your productivity.*** Date: Thu Mar 09 15:32:37 GMT 2006
*** System properties:
OS=WindowsXP
OS version=5.1
Java version=1.5.0_05*** MyEclipse details:
MyEclipse Enterprise WorkbenchVersion: 4.1.1 GA
Build id: 20060228-4.1.1-GA*** Eclipse details:
Eclipse SDKVersion: 3.1.1
Build id: M20050929-0840Eclipse Project SDK
Version: 3.1.1
Build id: M20050929-0840Eclipse Platform
Version: 3.1.1
Build id: M20050929-0840Eclipse Java Development Tools
Version: 3.1.1
Build id: M20050929-0840Eclipse Graphical Editing Framework
Version: 3.1
Build id: 200602241621Eclipse RCP
Version: 3.1.1
Build id: M20050929-0840Eclipse Plug-in Development Environment
Version: 3.1.1
Build id: M20050929-0840Eclipse startup command=-os
win32
-ws
win32
-arch
x86
-launcher
F:\eclipse\eclipse.exe
-name
Eclipse
-showsplash
600
-exitdata
20c_64
-vm
C:\Programme\Java\jdk1.5.0_05\bin\javaw.exe
Riyad KallaMemberMyEclipse wouldn’t copy the features and plug-ins into the correct directory and I had to move them manually from MyEclipse/eclipse/plug-ins to the correct directory in my eclipse installation directory.
Ahh, this is what is breaking your setup, you are not *suppose* to do this. MyEclipse is an Eclipse extension, you manage extensions from Help > Software Updates > Manage Configuration, you DO NOT want to go ripping MyEclipse apart and dumping it into your eclipse/plugins directory.
Go erase everything again. Unzip Eclipse, then Unzip or install MyEclipse. If you use the MyEclipse installer it will install inside of Eclipse automatically for you, if you used manual install, fire up Eclipse and point it at the MyEclipse directory as a new extension (from the menu I mentioned above).
mwunderlichMemberOK, I’ll give it a try. I did use the MyEclipse installer, though.
Cheers,
M.
mwunderlichMemberI got rid of the error now by reinstalling. I still get the error message “Invalid XML detected”, when double clicking on the icons of the Struts elements in the outline window. So, basically I am back to where I started…
Here’s my struts-config:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd"> <struts-config> <data-sources /> <form-beans > <form-bean name="testingForm" type="com.martin.struts.form.TestingForm" /> </form-beans> <global-exceptions /> <global-forwards > </global-forwards> <action-mappings > <action attribute="testingForm" input="/form/testing.jsp" name="testingForm" path="/testing" scope="request" type="com.martin.struts.action.TestingAction" /> </action-mappings> <message-resources parameter="com.martin.struts.ApplicationResources" /> </struts-config>
Riyad KallaMemberThe problem is something in your workspace (if -clean isn’t fixing it). You have been trying reinstalls of MyEclipse, Eclipse and new workspaces back and forth but never together (except on that other machine you tried it on and it worked). This is the problem.
You need to install MyEclipse and Eclipse to clean brand new dirs that have never existed before (don’t just humor me, but actually do that part even though it seems silly) and then create a new workspace. Then use File > Import to pull your projects and settings from the old workspace in. That should get you up and running.
This most likely is a case of the workspace going sour, and since we are troubleshooting remotely I’m giving you the big-bomb approach of all-new stuff so you can get back working again ASAP and not need to troubleshoot every little thing yourself, otherwise I would try may less drastic measures if I was standing there.
Thanks for hanging in there so long, this has got to be costing you hair left and right already.
mwunderlichMemberHi again,
After a few more experiments, I think there’s something seriously wrong the the installtion on that troublesome machine. I tried creating a new dir, as suggested, on a different partition even. I installed eclipse and MyEclipse there and still got the XML error message when trying to work in the graphical editor for Struts. Then I installed everything on yet another machine and it’s working fine again.
I am not sure, if the culprit is really the workspace. I tried using a completely new ws and still get the same error message. Now I am only wondering, how to get things running without a complete reinstallation of the operating system on a newly formatted hard disk.
Cheers,
M.
-
AuthorPosts