facebook

4.0 GA – JSP validation question

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 15 posts - 1 through 15 (of 23 total)
  • Author
    Posts
  • #235963 Reply

    Jim Hazen
    Member

    MyEclipse seems to have trouble with the following simple JSP page. The error changes from not being able to find javax.servlet.html to undefined symbol : ServletException. Running validate on the JSP says there is an error however none are then listed in the Problems tab. JSP deploys fine. This is basically just the MyEclipse JSP template.

    
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>Test</title>
    </head>
    <body>
    Please choose an application.
    <p>
    <a href="/hello">Hello</a>
    <p>
    <a href="/hello2">Hello2</a>
    </body>
    </html>
    
    #235965 Reply

    Scott Anderson
    Participant

    I took this example, pasted it into a JSP file in a MyEclipse web project and told it to run validation. It validated without errors at all. I’m going to guess that the project you’ve got this in isn’t a MyEclipse web project. Could that be it? If it’s not a web project you won’t have the proper libraries on your build path for the file to compile properly.

    Also, if problems aren’t showing up in the Problems view, please check the filter settings for the view and make sure that all the MyEclipse markers are selected for display and that no other filter setting would strip them out. The filters are accessed off of the view’s menu bar by pressing the downward pointing triangle and selecting Filters…

    #235967 Reply

    Jim Hazen
    Member

    I’m pretty sure I’m creating a MyEclipse web project. File/New/Project/MyEclipse/Web Project. Ctrl-N. Starts the new file wizard starting at a ME JSP file. Continue, pick defaults. MyJsp.jsp created, error, package javax.servlet.http does not exist. Nothing in Problems tab. All filters are checked (*.ajsym, .*, *.class, .JETEmitters, gen). Editor is MyEclipse JSP designer. I poked around a little. There is a one other JSP file in another project without this problem. There doesn’t appear to be anything different with this file vs the others. Other files within the same project have problems.

    There are a few errors in the log. Don’t know if they could be related. I also installed ME 4 GA by via the following process. I had ME 4M3 installed, updated from M2 via update site. Uninstalled ME via the <home>/MyEclipse/MyEclipse-UninstallerData/Uninstall_MyEclipse_Enterprise_Workbench_v4.0 utility. Installed ME 4 GA via the installer. Started Eclipse 3.1.

    
    !ENTRY org.eclipse.ui 4 0 2005-08-29 15:09:27.247MyEclipse/MyEclipse-UninstallerData
    !MESSAGE Warning: Detected recursive attempt by part com.genuitec.eclipse.webdesigner.jsp to create itself (this is probably, but not necessarily, a bug)
    !STACK 1
    org.eclipse.ui.PartInitException: Warning: Detected recursive attempt by part com.genuitec.eclipse.webdesigner.jsp to create itself (this is probably, but not necessarily, a bug)
        at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:543)
        at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:214)
        at org.eclipse.ui.internal.EditorManager.findEditor(EditorManager.java:477)
        at org.eclipse.ui.internal.EditorManager.findEditor(EditorManager.java:402)
        at org.eclipse.ui.internal.EditorManager.findEditor(EditorManager.java:372)
        at org.eclipse.ui.internal.WorkbenchPage.findEditor(WorkbenchPage.java:1772) 
    
    
     !ENTRY org.eclipse.ui.workbench 4 2 2005-08-29 16:25:48.670
    !MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.ui.workbench".
    !STACK 0
    java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0
        at java.util.Vector.get(Vector.java:710)
        at com.genuitec.eclipse.webdesigner2.properties.WebdesignerPropertySheet.createControl(WebdesignerPropertySheet.java:131)
        at org.eclipse.ui.views.properties.PropertySheet.doCreatePage(PropertySheet.java:128)
        at org.eclipse.ui.part.PageBookView.createPage(PageBookView.java:315)
        at org.eclipse.ui.part.PageBookView.partActivated(PageBookView.java:613)
    
    #235968 Reply

    Scott Anderson
    Participant

    I had ME 4M3 installed, updated from M2 via update site. Uninstalled ME via the <home>/MyEclipse/MyEclipse-UninstallerData/Uninstall_MyEclipse_Enterprise_Workbench_v4.0 utility. Installed ME 4 GA via the installer. Started Eclipse 3.1.

    From the looks of the log entry and the behaviors you’re reporting the issue is that the installation has been corrupted. The first thing I’d try is restarting with -clean as detailed here: http://myeclipseide.com/FAQ+index-myfaq-yes-id_cat-30.html#343

    If that doesn’t end the odd behaviors and log entries I’d highly recommend that you create a fresh, new Eclipse installation and then run only the 4.0 GA installer and point to that. That’s a bit more of a “big hammer”, but will definately correct this problem.

    #235972 Reply

    Jim Hazen
    Member

    -clean didn’t help. I realize the release notes also advocate the “big hammer” option. But I have plugins other than ME and it always takes longer than I’d like to admit to get them all working right. I was hoping that upgrading ME wouldn’t cause me all this extra work. Sigh, looks like it’s hammer time.

    #235973 Reply

    Jim Hazen
    Member

    Grr. Hammer didn’t quite work. The ME “Run Validation” works fine. The non ME “Validate JSP” has problems. There is no longer a red x in the Navigator. However, there is still a red x, line 1 of the editor. “cannot find symbol: symbol: HttpServletResponse. …”

    I’m running the Linux version on JDK 1.5.0_04.

    Looking at the project settings, the build path includes a J2EE 1.4 Library Container pointing to valid and available jars in the ME distribution. Don’t know why there’s some problem finding the libs later on.

    #235974 Reply

    Scott Anderson
    Participant

    The marker might be “left over” from the bad installation. Try right clicking on the project in the Package Explorer view and selecting MyElipse > Remove Validation Markers. Now, revalidate the file and see if they reoccur.

    #235975 Reply

    Jim Hazen
    Member

    A modify and save brings the marker back after they’ve been cleared. This is only in the editor though, the navigator which should be tied to the editor doesn’t show an error.

    ME validation passes, yet the editor error remains. Imports of other javax classes and usage within <%%> jsp declaration yeilds yellow squiggles. For some reason the editor seems really confused, while everyone else seems happy.

    #235978 Reply

    Riyad Kalla
    Member

    Jim do you have any plugins that start with com.ibm.see or com.ibm.wtp in your Eclipse plugins folder?

    Also what is the exact warning message for some of the squiggles? If they are HTML messages, you can turn off HTML validation to get rid of them.

    #235979 Reply

    Jim Hazen
    Member

    I was able to get rid of my HTML squiggles. Still no luck on the red x and not finding various javax.servlet classes. No ibm plugins, this is stock Eclipse 3.1 + ME 4.0 GA.

    #235980 Reply

    Jim Hazen
    Member

    The project’s /web/.classpath is listed below

    
    [jim@vader ~/workspace/foo]$ cat .classpath
    <?xml version="1.0" encoding="UTF-8"?>
    <classpath>
            <classpathentry output="web/WEB-INF/classes" kind="src" path="src"/>
            <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
            <classpathentry kind="con" path="com.genuitec.eclipse.j2eedt.core.J2EE14_CONTAINER"/>
            <classpathentry kind="output" path="web/WEB-INF/classes"/>
    </classpath>
    
    #235984 Reply

    Jim Hazen
    Member

    Another oddity. I tried to add Spring support to a project and it failed to copy all the expected files. I was in the middle of another bug report when the eclipse error log showed something strange.

    !ENTRY com.genuitec.eclipse.springframework 1 0 2005-08-29 18:51:24.750
    !MESSAGE Unable to find Spring MEContainer Jar: /home/jim/MyEclipse/eclipse/plugins/com.genuitec.eclipse.springframework_3.9.211/data/1.2/lib/spring-aop.jar

    (many other failures)

    Now /home/jim/MyEclipse/eclipse/plugins/com.genuitec.eclipse.springframework_4.0.0/data/1.2/lib/spring-aop.jar does exist. Perhaps ME thinks it’s running the wrong version.
    About MyEclipse shows that that about box thinks it’s running 4.0.0 GA. Also the problem with ME forgetting your subscription info in M3 has gone away. So I think I’m running 4.0 GA, but parts of ME still think it’s M3.

    Any clue how to fix that?

    #235985 Reply

    Jim Hazen
    Member

    @support-rkalla wrote:

    Jim do you have any plugins that start with com.ibm.see or com.ibm.wtp in your Eclipse plugins folder?

    Looking a little harder. There aren’t any plugins in the Eclipse plugins folder. However there are entries in workspace/.metadata/.plugins. I’ve moved this dir away and restarted Eclipse. The following com.ibm dirs then reappear:
    com.ibm.etools.validation/
    com.ibm.etools.xmlcatalog/
    com.ibm.sse.model/
    com.ibm.sse.snippets/

    Creating a new project with the same name as an existing project was able to work once in eliminating my editor path problems. However when I tried again on another project it didn’t work.

    #235986 Reply

    Riyad Kalla
    Member

    ahhh, I’ve run this down with someone in another thread before, are you using the GA release? If not please upgrade, then be sure to restart with -clean, THEN we need to go through a few MyEclipse settings to hit “Restore Defaults” under Window > Preferences > MyEclipse.

    1) First go to J2EE Projects > Library Sets, go to both the 1.3 and 1.4 sets hitting Restore Defaults.
    2) Now go to Project Capabilities, work your way down the list hitting Restore Defaults for each property panel and sub-panel so all the libraries update their paths to the correct default locations (not the old ones).
    3) Now open up your project build path and remove the J2EE 1.4 library, then click Add Library > MyEclipse Library and add it back, hit OK, let your project rebuild.

    I’d like to add that step #2 will fix the Spring issue, I just checked my Upgraded install of 4.0, and half my Spring libraries were empty too until I hit “Restore Defaults” and bam they all filled out with correct values. So most of these issues might just be a simple upgrade/dirty cache issue.

    #235997 Reply

    Jim Hazen
    Member

    Half way there. The Spring jars copy correctly now, but the editor classpath is still hosed. Somehow I was able to kick something into debug mode for a few minutes and saw something that could explain things.

    
    !ENTRY com.genuitec.eclipse.wdt.jsp.debug 1 1 2005-08-29 20:52:26.478
    !MESSAGE SEVERE: Env: Compile: javaFileName=/tmp/myeclipse-jspcc//org/apache/jsp/login_jsp.java
    
    
    !ENTRY com.genuitec.eclipse.wdt.jsp.debug 1 1 2005-08-29 20:52:26.480
    !MESSAGE     classpath=/data1/jim/local/jdk1.5.0_04/jre/lib/rt.jar:...
    cp=/data1/jim/local/eclipse/./startup.jar
    cp=/data1/jim/local/jdk1.5.0_04/jre/lib/rt.jar
    cp=/data1/jim/local/jdk1.5.0_04/jre/lib/jsse.jar
    cp=/data1/jim/local/jdk1.5.0_04/jre/lib/jce.jar
    cp=/data1/jim/local/jdk1.5.0_04/jre/lib/charsets.jar
    cp=/data1/jim/local/jdk1.5.0_04/jre/lib/ext/dnsns.jar
    cp=/data1/jim/local/jdk1.5.0_04/jre/lib/ext/sunpkcs11.jar
    cp=/data1/jim/local/jdk1.5.0_04/jre/lib/ext/sunjce_provider.jar
    cp=/data1/jim/local/jdk1.5.0_04/jre/lib/ext/localedata.jar    cp=/home/jim/workspace/home/jim/MyEclipse/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.0/data/libraryset/1.4/activation.jar    cp=/home/jim/workspace/home/jim/MyEclipse/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.0/data/libraryset/1.4/jboss-saaj.jar    cp=/home/jim/workspace/home/jim/MyEclipse/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.0/data/libraryset/1.4/mail.jar    cp=/home/jim/workspace/home/jim/MyEclipse/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.0/data/libraryset/1.4/javax.servlet.jar    cp=/home/jim/workspace/home/jim/MyEclipse/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.0/data/libraryset/1.4/jboss-jaxrpc.jar    cp=/home/jim/workspace/home/jim/MyEclipse/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.0/data/libraryset/1.4/javax.servlet.jsp.jar cp=/home/jim/workspace/home/jim/MyEclipse/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.0/data/libraryset/1.4/namespace.jar    cp=/home/jim/workspace/home/jim/MyEclipse/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.0/data/libraryset/1.4/xml-apis.jar    cp=/home/jim/workspace/home/jim/MyEclipse/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.0/data/libraryset/1.4/jboss-j2ee.jar    cp=/home/jim/workspace/home/jim/MyEclipse/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.0/data/libraryset/1.4/jboss-jsr77.jar 
    

    For some reason Eclipse thinks that the MyEclipse distro is rooted in the workspace dir and not the root filesystem. This appears to be a crazy internal thing. I’ve tried everything, including importing all the external jars by hand. No luck. There isn’t any chance the jars themselves could work given jar -tf and not work when trying to be used on the classpath is there?

Viewing 15 posts - 1 through 15 (of 23 total)
Reply To: 4.0 GA – JSP validation question

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