- This topic has 6 replies, 5 voices, and was last updated 19 years, 1 month ago by Brian Fernandes.
-
AuthorPosts
-
Jörg EichhornMemberHello,
when i open the struts-config.xml i get a message box saying:
Unable to load modules. Problem:null
In the .log file there is the following error:
!ENTRY com.genuitec.eclipse.cross.easystruts.eclipse 1 1 Aug 31, 2004 11:15:21.920 !MESSAGE !STACK 0 java.lang.NullPointerException at com.genuitec.struts.easystruts.core.StrutsProjectRegistry.loadModules(Unknown Source) at com.genuitec.struts.easystruts.core.StrutsProjectRegistry.registerModules(Unknown Source) at com.genuitec.struts.easystruts.core.StrutsProjectRegistry.getModuleRefList(Unknown Source) at com.genuitec.struts.easystruts.core.StrutsProjectRegistry.getModuleRefList(Unknown Source) at com.genuitec.struts.easystruts.core.StrutsProjectRegistry.getModuleRefs(Unknown Source) at com.genuitec.struts.easystruts.core.StrutsProjectRegistry.getModuleRef(Unknown Source) at com.genuitec.struts.easystruts.core.StrutsProjectRegistry.getModuleRef(Unknown Source) at com.genuitec.eclipse.struts.editor.multipage.StrutsConfigEditor.getModuleRef(Unknown Source) at com.genuitec.eclipse.struts.editor.multipage.StrutsConfigEditor.init(Unknown Source) at org.eclipse.ui.internal.EditorManager.createSite(EditorManager.java:721) at org.eclipse.ui.internal.EditorManager.openInternalEditor(EditorManager.java:780) at org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:585) at org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:573) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2201) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2134) at org.eclipse.ui.internal.WorkbenchPage.access$6(WorkbenchPage.java:2126) at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.java:2113) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2108) at org.eclipse.ui.ide.IDE.openEditor(IDE.java:299) at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:137) at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:110) at org.eclipse.jdt.internal.ui.actions.OpenActionUtil.open(OpenActionUtil.java:49) at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:164) at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:150) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:212) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:188) at org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:289) at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$4.open(PackageExplorerPart.java:490) at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:429) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:615) at org.eclipse.core.runtime.Platform.run(Platform.java:747) at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:427) at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:635) at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:731) at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:211) at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:206) at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:238) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2772) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2431) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1377) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:254) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:96) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:335) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:273) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:129) 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:183) at org.eclipse.core.launcher.Main.run(Main.java:644) at org.eclipse.core.launcher.Main.main(Main.java:628)
I am using Eclipse 3.0 final with MyEclipse 3.8.1+QF20040825.
After clicking ok in the message box, the struts-config.xml is loaded and i can edit it normally. Both source and design view work.
Thanks for help.
Jörg Eichhorn
support-michaelKeymasterThe stacktrace indicates a problem most likely while parsing the web.xml in search of an action servlet and module declarations. A few questions to help us isolate this problem:
1) Does your web.xml file exist under the WebProject’s <web-root> folder and is it properly formed?
2) Does the web.xml file include an action servlet entry?
3) Does the web.xml file include references to struts modules?
3a) If yes, are the module references valid. That is the path to the modules properly stated.
Jörg EichhornMemberHello,
yes, my web.xml is in the correct location a it is valid according to the dtd. I also have the action servlet entry included.
I only use the default module with multiple struts-config’s.I found out, that the problem is caused by the formatting of the param-value:
The first example work without any errors:
---- snip ---- <init-param> <param-name>config</param-name> <param-value>/WEB-INF/struts-config-1.xml,/WEB-INF/struts-config-2.xml</param-value> </init-param> ---- snip ----
This produces the error:
---- snip ---- <init-param> <param-name>config</param-name> <param-value> /WEB-INF/struts-config-1.xml, /WEB-INF/struts-config-2.xml </param-value> </init-param> ---- snip ----
The second example works fine with tomcat and it is valid on xml level. I think whitespaces inside of this element should be ignored by MyEclipse.
Jörg Eichhorn
P.S.: What do you mean with the “Insert” button. I cannot find it (or i’m kind of blind today).
support-michaelKeymasterJorg,
Thanks for isolating this problem. I agree that the original module form that you provided below should be handled by ME.
<param-value>/WEB-INF/struts-config-1.xml,/WEB-INF/struts-config-2.xml</param-value>
I have submitted a problem report based on this thread.
Regards,
Riyad KallaMemberFixed in 3.8.3
mredekerParticipantI am using 4.0.0GA and the problem is still there. Using the one line form does not give the error using the multiple line form produces the error.
Could you please verify if the bug returned in 4.0.0GA.Thanks,
–Marcus
Brian FernandesModeratormredeker,
Yes, the problem seems to have surfaced again in 4.0GA. The good news is that it has already been fixed in 4.0.1 due next week.
Thank you for reporting this, we’ll double check to make sure 🙂
Best,
Brian. -
AuthorPosts