facebook

JSP validation not working

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 11 posts - 16 through 26 (of 26 total)
  • Author
    Posts
  • #223167 Reply

    Scott,

    The error messages that I posted earlier and that you quoted in your last reply was I think caused by me launching a fresh instance of eclipse that didn’t have MyEclipse installed yet. When I launched eclipse, I referenced my existing workspace which had had MyEclipse persectives and views open.

    Keith

    #223169 Reply

    Starting from my new installation of eclipse 3.0.1, MyEclipse 2.8.2 w/ QF2, I upgraded to MyEclipse 2.8.3.

    The validation is now kinda of working. When I edit a JSP file, it shows a red square in the righthand margin of the JSP editor that there is an error. But, there is no error icon in the left margin and there is no error icon associated with the file in the Navigator view. These icons use to show up.

    I then ran MyEclipse > Run Validation in the context menu on the project in the Navigator view. I received the following errors in the .log file:

    
    !ENTRY com.ibm.etools.validation 4 0 Jan 19, 2005 17:46:32.804
    !MESSAGE
    *** ERROR ***: Wed Jan 19 17:46:32 PST 2005    java.lang.NoClassDefFoundError
     
    !ENTRY com.ibm.etools.validation 4 0 Jan 19, 2005 17:47:22.17
    !MESSAGE
    *** ERROR ***: Wed Jan 19 17:47:22 PST 2005    java.lang.NoClassDefFoundError
    

    Since I upgraded to 3.8.3, I have recieved the following errors (including the ones above):

    
    !SESSION Jan 19, 2005 17:38:30.650 ---------------------------------------------
    eclipse.buildId=M200409161125
    java.version=1.4.2_06
    java.vendor=Sun Microsystems Inc.
    BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
                                                                                                                                                                               
    !ENTRY org.eclipse.core.runtime 4 2 Jan 19, 2005 17:38:30.650
    !MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.runtime".
    !STACK 0
    java.lang.NullPointerException
            at org.eclipse.ui.internal.ViewFactory.destroyView(ViewFactory.java:411)
            at org.eclipse.ui.internal.ViewFactory.releaseView(ViewFactory.java:498)
            at org.eclipse.ui.internal.ViewFactory$1.run(ViewFactory.java:334)
            at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:616)
            at org.eclipse.core.runtime.Platform.run(Platform.java:747)
            at org.eclipse.ui.internal.ViewFactory.busyRestoreView(ViewFactory.java:273)
            at org.eclipse.ui.internal.ViewFactory$2.run(ViewFactory.java:530)
            at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
            at org.eclipse.ui.internal.ViewFactory.restoreView(ViewFactory.java:528)
            at org.eclipse.ui.internal.Perspective.showView(Perspective.java:1593)
            at org.eclipse.ui.internal.WorkbenchPage.busyShowView(WorkbenchPage.java:773)
            at org.eclipse.ui.internal.WorkbenchPage.access$9(WorkbenchPage.java:753)
            at org.eclipse.ui.internal.WorkbenchPage$13.run(WorkbenchPage.java:3051)
            at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
            at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:3048)
            at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:3028)
            at com.genuitec.eclipse.core.MyEclipseWebsiteView.showUrl(Unknown Source)
            at com.genuitec.eclipse.core.ui.action.OpenMyEclipseHomeActionDelegate.run(Unknown Source)
            at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:276)
            at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:206)
            at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:915)
            at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:866)
            at org.eclipse.jface.action.ActionContributionItem$7.handleEvent(ActionContributionItem.java:785)
            at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
            at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:954)
            at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2595)
            at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2298)
            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:185)
            at org.eclipse.core.launcher.Main.run(Main.java:704)
            at org.eclipse.core.launcher.Main.main(Main.java:688)
                                                                                                                                                                               
    !ENTRY com.ibm.etools.validation 4 0 Jan 19, 2005 17:39:06.553
    !MESSAGE
    *** ERROR ***: Wed Jan 19 17:39:06 PST 2005    java.lang.NoClassDefFoundError: com/rc/retroweaver/runtime/ClassLiteral
                                                                                                                                                                               
    !ENTRY com.ibm.etools.validation 4 0 Jan 19, 2005 17:39:42.140
    !MESSAGE
    *** ERROR ***: Wed Jan 19 17:39:42 PST 2005    java.lang.NoClassDefFoundError
                                                                                                                                                                               
    !ENTRY org.eclipse.webbrowser 2 0 Jan 19, 2005 17:41:33.343
    !MESSAGE Internal browser is not operational
    !STACK 0
    org.eclipse.swt.SWTError: No more handles (java.lang.UnsatisfiedLinkError: /home/kdf/eclipse/plugins/org.eclipse.swt.gtk_3.0.1/os/linux/x86/libswt-mozilla-gtk-3063.so: libxpcom.so: cannot open shared object file: No such file or directory)
            at org.eclipse.swt.SWT.error(SWT.java:2717)
            at org.eclipse.swt.SWT.error(SWT.java:2616)
            at org.eclipse.swt.browser.Browser.<init>(Browser.java:119)
            at org.eclipse.webbrowser.internal.WebBrowserUtil.isInternalBrowserOperational(Unknown Source)
            at org.eclipse.webbrowser.internal.BrowserManager.addInternalBrowser(Unknown Source)
            at org.eclipse.webbrowser.internal.BrowserManager.setupDefaultBrowsers(Unknown Source)
            at org.eclipse.webbrowser.internal.BrowserManager.loadBrowsers(Unknown Source)
            at org.eclipse.webbrowser.internal.BrowserManager.getWebBrowsers(Unknown Source)
            at org.eclipse.webbrowser.internal.BrowserContentProvider.getElements(Unknown Source)
            at org.eclipse.jface.viewers.StructuredViewer.getRawChildren(StructuredViewer.java:532)
            at org.eclipse.jface.viewers.StructuredViewer.getFilteredChildren(StructuredViewer.java:477)
            at org.eclipse.jface.viewers.StructuredViewer.getSortedChildren(StructuredViewer.java:585)
            at org.eclipse.jface.viewers.TableViewer.internalRefresh(TableViewer.java:465)
            at org.eclipse.jface.viewers.TableViewer.internalRefresh(TableViewer.java:449)
            at org.eclipse.jface.viewers.StructuredViewer$7.run(StructuredViewer.java:924)
            at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:862)
            at org.eclipse.jface.viewers.CheckboxTableViewer.preservingSelection(CheckboxTableViewer.java:281)
            at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:922)
            at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:881)
            at org.eclipse.jface.viewers.TableViewer.inputChanged(TableViewer.java:416)
            at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:238)
            at org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1059)
            at org.eclipse.webbrowser.internal.BrowserTableComposite.createWidgets(Unknown Source)
            at org.eclipse.webbrowser.internal.BrowserTableComposite.<init>(Unknown Source)
            at org.eclipse.webbrowser.internal.WebBrowserPreferencePage.createContents(Unknown Source)
            at org.eclipse.jface.preference.PreferencePage.createControl(PreferencePage.java:217)
            at org.eclipse.jface.preference.PreferenceDialog$12.run(PreferenceDialog.java:1008)
            at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:616)
            at org.eclipse.core.runtime.Platform.run(Platform.java:747)
            at org.eclipse.jface.preference.PreferenceDialog.showPage(PreferenceDialog.java:1003)
            at org.eclipse.jface.viewers.StructuredViewer$3.run(StructuredViewer.java:450)
            at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:616)
            at org.eclipse.core.runtime.Platform.run(Platform.java:747)
            at org.eclipse.jface.viewers.StructuredViewer.firePostSelectionChanged(StructuredViewer.java:448)
            at org.eclipse.jface.viewers.StructuredViewer.handlePostSelect(StructuredViewer.java:708)
            at org.eclipse.jface.viewers.StructuredViewer$5.widgetSelected(StructuredViewer.java:726)
            at org.eclipse.jface.util.OpenStrategy.firePostSelectionEvent(OpenStrategy.java:200)
            at org.eclipse.jface.util.OpenStrategy.access$4(OpenStrategy.java:195)
            at org.eclipse.jface.util.OpenStrategy$3.run(OpenStrategy.java:349)
            at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
            at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:106)
            at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:2572)
            at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2301)
            at org.eclipse.jface.window.Window.runEventLoop(Window.java:668)
            at org.eclipse.jface.window.Window.open(Window.java:648)
            at org.eclipse.ui.internal.OpenPreferencesAction.run(OpenPreferencesAction.java:72)
            at org.eclipse.jface.action.Action.runWithEvent(Action.java:881)
            at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:915)
            at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:866)
            at org.eclipse.jface.action.ActionContributionItem$7.handleEvent(ActionContributionItem.java:785)
            at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
            at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:954)
            at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2595)
            at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2298)
            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:185)
            at org.eclipse.core.launcher.Main.run(Main.java:704)
            at org.eclipse.core.launcher.Main.main(Main.java:688)
                                                                                                                                                                               
    !ENTRY org.eclipse.webbrowser 1 0 Jan 19, 2005 17:41:33.345
    !MESSAGE true/false
                                                                                                                                                                               
    !ENTRY com.ibm.etools.validation 4 0 Jan 19, 2005 17:43:07.334
    !MESSAGE
    *** ERROR ***: Wed Jan 19 17:43:07 PST 2005    java.lang.NoClassDefFoundError
                                                                                                                                                                               
    !ENTRY com.ibm.etools.validation 4 0 Jan 19, 2005 17:46:32.804
    !MESSAGE
    *** ERROR ***: Wed Jan 19 17:46:32 PST 2005    java.lang.NoClassDefFoundError
                                                                                                                                                                               
    !ENTRY com.ibm.etools.validation 4 0 Jan 19, 2005 17:47:22.17
    !MESSAGE
    *** ERROR ***: Wed Jan 19 17:47:22 PST 2005    java.lang.NoClassDefFoundError
    

    Now in MyEclipse, each time I save a JSP file, get the following error msg:

    
    Error Jan 19, 2005 18:10:51.664 
    *** ERROR ***: Wed Jan 19 18:10:51 PST 2005    java.lang.NoClassDefFoundError
    
    #223172 Reply

    Riyad Kalla
    Member

    *** ERROR ***: Wed Jan 19 17:39:06 PST 2005 java.lang.NoClassDefFoundError: com/rc/retroweaver/runtime/ClassLiteral

    Is this your class?

    org.eclipse.swt.SWTError: No more handles (java.lang.UnsatisfiedLinkError: /home/kdf/eclipse/plugins/org.eclipse.swt.gtk_3.0.1/os/linux/x86/libswt-mozilla-gtk-3063.so: libxpcom.so: cannot open shared object file: No such file or directory)

    There is a workaround in the “FAQ” section of the “Web Projects” quickstart guide in our Documentation section. IIRC this is fixed in 3.8.4, the problem is SWT Browser widget is freaking out at your version of Firefox/Mozilla as it needs <=1.6 to run. In Eclipse 3.1 plat I believe this widget was beefed up so this shouldn’t occur moving forward.

    #223176 Reply

    This is not from my (or defined in my) project and I am not sure where it came from. I haven’t seen it since either.

    *** ERROR ***: Wed Jan 19 17:39:06 PST 2005 java.lang.NoClassDefFoundError: com/rc/retroweaver/runtime/ClassLiteral

    Here is the last thing I tried:

    – I went back to my original eclipse/MyEclipse and workspace. I deleted my project and closed my other projects. I then upgraded it to MyEclipse 3.8.3.

    – Next, I checked out my project again from CVS. It is setup as a Java Project

    – I went into the project properties > MyEclipse Validation, checked the override validation preferences and checked all of the validators.

    – I ran the MyEclipse > Remove all validation markers
    Then I ran the MyEclipse > Run Validation

    – I received validation errors for HTML and XML.

    I unchecked the validation for the XML validation because I couldn’t resolve those errors.

    – I then fixed some of the HTML errors.

    I am still not seeing JSP validation errors even if I create them. But, I do notice this error in the error log everytime I save a JSP file or run validation:

    
    !ENTRY com.ibm.etools.validation 4 0 Jan 19, 2005 22:50:04.890
    !MESSAGE
    *** ERROR ***: Wed Jan 19 22:50:04 PST 2005    java.lang.NoClassDefFoundError
     
    !ENTRY com.ibm.etools.validation 4 0 Jan 19, 2005 22:53:36.786
    !MESSAGE
    *** ERROR ***: Wed Jan 19 22:53:36 PST 2005    java.lang.NoClassDefFoundError
    

    Eventually, I turned off the HTML validation, because the validation was flagging errors that were not real errors. For example, if I have JSP fragment with just a <table>…</table> defined, it will flag this with a warning because it is not a complete HTML file (I guess.)

    Now, every time I run the validation or save a JSP error, I still get the error that I showed above. I think this error is linked to the JSP validation not working.

    Am I missing something in my project that com.ibm.etools.validation is expecting to run in MyEclipse that I don’t have defined?

    I noticed that if I create a new J2EE > Web Project it has a lot more builders defined. And other JAR files.

    I still don’t understand why it stopped working at the end of last December. weird.

    #223186 Reply

    Riyad Kalla
    Member

    I unchecked the validation for the XML validation because I couldn’t resolve those errors.

    TIP: For files like XDoclet merge files and other naturally invalid XML files, you can mark them as ‘derived’ under file properties and the validator will ignore them; this will allow you to keep validation turned on while ignoring specific files.

    I still don’t understand why it stopped working at the end of last December. weird.

    That makes two of us. Try restarting MyEclipse by adding the -vm argument and pointing at a valid JDK, like so:
    eclipse.exe -vm C:\j2sdk1.4.2_06\bin\javaw.exe

    The JSP validator needs to be able to run/find javac.exee either by you pointing it to a JDK install by way of the -vm argument, or by having the JDK’s bin dir in the system PATH.

    #223223 Reply

    That makes two of us. Try restarting MyEclipse by adding the -vm argument and pointing at a valid JDK, like so:
    eclipse.exe -vm C:\j2sdk1.4.2_06\bin\javaw.exe

    The JSP validator needs to be able to run/find javac.exee either by you pointing it to a JDK install by way of the -vm argument, or by having the JDK’s bin dir in the system PATH.

    I have JAVA_HOME defined as JAVA_HOME=/usr/java/j2sdk1.4.2_06 and I have $JAVA_HOME/bin defined in my PATH. I also tested eclipse by specifying the -vm as you recommended. Again, it still doesn’t work. As soon as I run validation under MyEclipse, I get the error message “java.lang.NoClassDefFoundError ” from “com.ibm.etools.validation” that I reported previously.

    I am running sun’s java sdk j2sdk1.4.2_06

    Is there somewhere that I need to specify the java compiler. Or, is the compiler specified somewhere? At one point a while back, I changed the internal references in eclipse of the SDK from j2sdk1.4.2_05 to j2sdk1.4.2_06. Is it possible that somewhere eclipse is still pointing at the old compiler?

    I am not having any problems with eclipse compiling and detecting compilation errors with .java files.

    TIP: For files like XDoclet merge files and other naturally invalid XML files, you can mark them as ‘derived’ under file properties and the validator will ignore them; this will allow you to keep validation turned on while ignoring specific files.

    Thanks. I have a couple invalid xml files in my project that I use in my unit tests. I have one question though. In the Eclipse documentation it says that derived files will not be be maintained in cvs. Is this true? If so, that is a problem because the invalid xml files need to live in my cvs repository.

    Thanks,

    #223228 Reply

    Riyad Kalla
    Member

    In the Eclipse documentation it says that derived files will not be be maintained in cvs. Is this true? If so, that is a problem because the invalid xml files need to live in my cvs repository.

    Yes it is true, but I think it means if you try and Add them they will be ignored, if they are already added I don’t know if Eclipse will still update/commit them against CVS, you can give it a whirl.

    I get the error message “java.lang.NoClassDefFoundError ” from “com.ibm.etools.validation” that I reported previously.

    If you look in your Eclipse plugins dir (not the MyEclipse one, but the Eclipse one) do you have ANY com.ibm.* plugins? I wonder if WTP might be conflicting with MyEclipse…

    #223238 Reply

    You are not going to believe it. I think the Java or Eclipse gods finally decided I had been tortured enough. It is working again. I am not sure what I did, but it works. Here is what I did:

    – I removed the resin.jar from my project. It was an external JAR located in the resin 3 distribution (3.0.10). I only removed it because I wanted to find out if I had anything dependent on it.

    – I restarted eclipse for the millionth time with the -clean option, I have done this many times before.

    – I went into the Project menu and turned off Build Automatically.

    – I cleaned the project. I unclicked the start build immediately.

    – I then went to the Project menu and said Build Project.

    This time, I didn’t get the java.lang.NoClassDefFoundError error. Instead I got several “com.genuitec.eclipse.wdt.jsp.jasper.compiler.Compiler ā
    SEVERE: Javac exception ” errors and the error icons showed up in my JSP files. So I think it is working.

    I then turned the “Build Automatically” back on.

    So I think the problem was that my project was not building properly before or the resin.jar was some how affecting the JSP compilation. But really I have no idea.

    Okay. Hopefully it will stay fixed.

    I have a few questions about the HTML validation, and then I think we are done.

    When HTML validator validates a JSP file that was intended to be included in another JSP file (fragment), it flags some of the html tags in the file with warning icons saying the html tag is not valid at the point. I think it is because the html tag is not contained inside of a <body> tag. Is there any way to modify that behavior?

    Secondly, do these warnings get counted in the Maximum validation messages that you set in the project preferences under MyEclipse-validation?

    Is there an upper limit to the maximum number validation messages?

    thanks for your help.

    #223241 Reply

    Riyad Kalla
    Member

    I am not sure what I did, but it works. Here is what I did:

    Hahha

    I think it is because the html tag is not contained inside of a <body> tag. Is there any way to modify that behavior?

    That ‘derived’ trick applies to all validators, you can just mark your fragments as derived and the validator should ignore them.

    Secondly, do these warnings get counted in the Maximum validation messages that you set in the project preferences under MyEclipse-validation?

    When you are in an editor, LEFT-hand margin validation errors are counted in the problems view, RIGHT-hand margin validation errors are not counted anywhere and are only displayed in that file on the right hand side. They are called “reconciler markers” or errors or what have you.

    Is there an upper limit to the maximum number validation messages?

    Yes it is controlled by editing the properties of the problem view (click down arrow in top right corner of problems, Filters… > Then set the max visible problems)

    #223266 Reply

    Thanks for your help the past two days on this issue.

    In regards to the derived turning off the validators,

    TIP: For files like XDoclet merge files and other naturally invalid XML files, you can mark them as ‘derived’ under file properties and the validator will ignore them; this will allow you to keep validation turned on while ignoring specific files.

    I have a suggestion. There could be a specific option to disable validation on a per file or folder basis, like “dont validate”. My concern about using the derived option for this is that it has other meanings in Eclipse too. And someone might use it override validation and then discover the tool is not doing other things that aren’t performed on derived files. A good example of this is that cvs will not automatically add them to the repository.

    #223269 Reply

    Riyad Kalla
    Member

    keith,
    You are absolutely right and we have on our todo list to take the ‘derived’ functionality and move to another flag that we add just like you said ‘don’t validate’. I don’t think we were fully aware of where derived was used, but based on it’s Eclipse platform definition it really sounded like a good fit at first glance. We’ll take care of this in a future release (hopefully by 3.9).

Viewing 11 posts - 16 through 26 (of 26 total)
Reply To: JSP validation not working

You must be logged in to post in the forum log in