- This topic has 7 replies, 2 voices, and was last updated 18 years ago by Riyad Kalla.
-
AuthorPosts
-
mcallawaMemberThe JSP preview pane does not work in some of my projects. Is there some setting or config I am missing? Between two projects that have identical directory structure and look similar, in one, the preview pane works and renders the jsp, and in the other, the preview is blank for all jsps and html pages.
In fact, if I copy a jsp from one project where it doesn’t render in the preview, to a project where the preview works, the jsp will render fine. (These are Struts projects, btw). When I click a preview pane (IE) it generates a log entry (see end).
The code and design views work in both. Summary follows:
*** Date:
Tuesday, December 5, 2006 11:58:13 AM MST** System properties:
OS=WindowsXP
OS version=5.1
Java version=1.5.0_09*** MyEclipse details:
MyEclipse Enterprise Workbench
Version: 5.1.0 GA
Build id: 20061111-5.1.0-GA*** Eclipse details:
MyEclipse Enterprise WorkbenchVersion: 5.1.0 GA
Build id: 20061111-5.1.0-GAEclipse Platform
Version: 3.2.1.r321_v20060921-b_XVA-INSQSyMtx
Build id: M20060921-0945Eclipse RCP
Version: 3.2.1.r321_v20060801-2ekW2BxmcpPUOoq
Build id: M20060921-0945Eclipse Java Development Tools
Version: 3.2.1.r321_v20060905-R4CM1Znkvre9wC-
Build id: M20060921-0945Eclipse Plug-in Development Environment
Version: 3.2.1.r321_v20060823-6vYLLdQ3Nk8DrFG
Build id: M20060921-0945Eclipse Project SDK
Version: 3.2.1.r321_v20060801-tQ1w49KnTArT0FZ
Build id: M20060921-0945Eclipse Graphical Editing Framework
Version: 3.2.1.v20060921
Build id: 20060921-1617Eclipse startup command=-os
win32
-ws
win32
-arch
x86
-launcher
C:\eclipse\eclipse.exe
-name
Eclipse
-showsplash
600
-exitdata
c7c_4c
-clean
-data
@noDefault
-product
com.genuitec.myeclipse.product.ide
-vm
C:\jdk1.5.0_09\bin\javaw.exe========error log entry from clicking on preview pane for IE ================
!ENTRY com.genuitec.eclipse.webdesigner3 4 0 2006-12-05 12:42:25.234
!MESSAGE
!STACK 0
java.lang.NullPointerException
at java.io.PrintWriter.write(PrintWriter.java:401)
at com.genuitec.eclipse.webdesigner3.editors.WebDesignerMultiPageEditor.generatePreviewHTML(WebDesignerMultiPageEditor.java:704)
at com.genuitec.eclipse.webdesigner3.editors.WebDesignerMultiPageEditor.previewPageChange(WebDesignerMultiPageEditor.java:608)
at com.genuitec.eclipse.webdesigner3.editors.WebDesignerMultiPageEditor.pageChange(WebDesignerMultiPageEditor.java:557)
at org.eclipse.ui.part.MultiPageEditorPart$2.widgetSelected(MultiPageEditorPart.java:232)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:952)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:937)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:709)
at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:3171)
at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:1953)
at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:288)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
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:336)
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)!ENTRY com.genuitec.eclipse.webdesigner3 4 0 2006-12-05 12:42:25.234
!MESSAGE Argument cannot be null
!STACK 0
java.lang.IllegalArgumentException: Argument cannot be null
at org.eclipse.swt.SWT.error(SWT.java:3358)
at org.eclipse.swt.SWT.error(SWT.java:3297)
at org.eclipse.swt.SWT.error(SWT.java:3268)
at org.eclipse.swt.browser.Browser.setUrl(Browser.java:1390)
at com.genuitec.eclipse.webdesigner3.editors.WebDesignerMultiPageEditor.previewPageChange(WebDesignerMultiPageEditor.java:611)
at com.genuitec.eclipse.webdesigner3.editors.WebDesignerMultiPageEditor.pageChange(WebDesignerMultiPageEditor.java:557)
at org.eclipse.ui.part.MultiPageEditorPart$2.widgetSelected(MultiPageEditorPart.java:232)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:952)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:937)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:709)
at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:3171)
at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:1953)
at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:288)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
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:336)
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)
Riyad KallaMemberHmm. Try and refresh both projects from the roots, then do a Project > Clean and clean both projects. Then try restarting using the -clean command line argument (make sure all the editors are closed) and try again.
Also I was going to say that it’s possible one project is correct setup as a Web/Struts project and the other isn’t, but then you said they were both Struts projects.
Something else ot check is under the project properties for both projects, go to MyEclipse > Web, and make sure the Web Root directory is setup correctly for each project, that is used to resolve the file paths so that can effect previews.
mcallawaMemberNo Luck. Did all your recommendations: refreshing, cleaning, re-launching w/clean option, etc. and it did not work. I had already noticed the MyEclipse ‘Web’ setting was wrong because the ‘bad’ project was copied from another one. Changing this setting did not help however, even going through the cleaning a second time. I even tried erasing the project off the HD, creating a new one and importing the files into the new project with no luck.
If I create a new project ‘test’ and give it Struts capabilities, and copy a .jsp from the ‘bad’ project over to it, it previews fine. There is something else that defines the preview – the error mentions the Struts bundle as being null – and I don’t know where to find this in the settings or other files. I have compared the properties and settings files between a ‘good’ project and a ‘bad’ one and can see no difference. Any suggestions?
Riyad KallaMemberIs it possible to create a copy of the broken project and simplify it down to something you can send me to debug?
mcallawaMemberCan do. Please give me an email address to send a zip file. There doesn’t seem to be a file attachment method on this reply screen.
Riyad KallaMembersupport@genuitec.com ATTN Riyad, with a link to this thread so I know why I’m receiving the file, and I’ll take a look right away.
mcallawaMemberJust sent you zipped “Struts Template” project. Trying to preview any of the .jsp’s in this project doesn’t work. What’s weird is, I derived other projects from this project and at least one of them has a preview that works and most others don’t – I don’t remember what I could have done differently.
Riyad KallaMemberMerrill,
I just got the project, and tried to preview the welcome.jsp file and noticed that there are NPEs getting thrown to the log file. I just sent th eproject to the design team to look at and see if they can figure out what is going on. Thank you for sending that along so quickly. -
AuthorPosts