facebook

validation causing a java.lang.StackOverflowError

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

    I am seeing the following error in the Eclipse log file everytime I save a Java source file in one of my projects.

    !ENTRY com.ibm.etools.validation 4 0 Feb 16, 2005 13:48:32.239
    !MESSAGE
    *** ERROR ***: Wed Feb 16 13:48:32 PST 2005 java.lang.StackOverflowError

    The project is Java project. I also get the error if I rebuild the project.

    I looked at the .project file and I see the following builder defined, which I think is from MyEclipse:

    <buildCommand>
    <name>com.ibm.etools.validation.validationbuilder</name>
    <arguments>
    </arguments>
    </buildCommand>

    I posted a message to one of the eclipse newsgroups and they said that “com.ibm.etools.validation” is not a class in the Eclipse IDE. I did find this class or package buried in the MyEclipse code base. So, I think it is coming from MyEclipse.

    Please help me resolve this error.

    I am running Eclipse 3.0.1, MyEclipse 3.8.4 and the Sun SDK 1.4.2_06 on a Red Hat Linux Enterprise 3 system.

    #225342 Reply

    Riyad Kalla
    Member

    keith,
    If you navigate to project properties, MyEclipse-Validate and turn off all validation, does that do the trick?

    #225392 Reply

    Hi,

    The problem still exists after I turned off all validation. I went to project properties, MyEclipse-Validate dialog. On the screen, I did the following:

    – Checked: Override validation preferences
    – Unchecked: both “Run validation…” checkboxes
    – Unchecked all of the validators

    I still get the error in the log. I discovered that I even get the error message if I save a text (*.txt) file. I get it when I save a Java source file too.

    #225393 Reply

    Riyad Kalla
    Member

    Hrrm.. try and remove the builder and see if that does the trick, if you cannot remove it from the Builder gui, open up the .project file and remove it with a text editor, then close and reopen the project (check builders, make sure its gone) and see if the problem went away.

    #225398 Reply

    It didn’t make any difference.

    First I tried unchecking the builders. I found two builders that were related to MyEclipse in project properties > Builders:

    – Structured Document and Model Builder
    – Validation

    When I uncheck one or both builders, I get a new folder in my project labeled “.externalToolBuilders”. In that folder, it has a file for each builder that I unchecked. For the validation builder, the file is labeled “com.ibm.etools.validation.validationbuilder.launch”. This file is an xml file that contains the xml:

    
    <?xml version="1.0" encoding="UTF-8"?>
    <launchConfiguration type="org.eclipse.ui.externaltools.ProgramBuilderLaunchConfigurationType">
    <booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="false"/>
    <mapAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS"/>
    <stringAttribute key="org.eclipse.ui.externaltools.ATTR_DISABLED_BUILDER" value="com.ibm.etools.validation.validationbuilder"/>
    </launchConfiguration>
    

    When I unchecked them, the .project file was modified to contain the following descriptor tags:

    
            <buildCommand>
                <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
                <arguments>
                    <dictionary>
                        <key>LaunchConfigHandle</key>
                        <value><project>/.externalToolBuilders/com.ibm.sse.model.structuredbuilder.launch</value>
                    </dictionary>
                </arguments>
            </buildCommand>
            <buildCommand>
                <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
                <arguments>
                    <dictionary>
                        <key>LaunchConfigHandle</key>
                        <value><project>/.externalToolBuilders/com.ibm.etools.validation.validationbuilder.launch</value>
                    </dictionary>
                </arguments>
            </buildCommand>
    
    

    Even though I unchecked them, the problem still exists.

    Now here is something interesting. When I close and then open the project again, another “Validation” builder appears and it is checked so MyEclipse didn’t like it missing. Also, when I checked the MyEclipse-validation pane, the checkboxes went back to the default, ie, the override validation preferences became unchecked.

    BTW, when I override the validation preferences and then rebuild the project by running Project / Clean…, the project validation preferences will be reset to the default, ie, the override checkbox becomes unchecked.

    So now at this poin I have four builders. The original Java Builder, the two builders that I unchecked and a new Validation builder that is checked.

    To clean up this mess, I closed the project and editted the .project file.

    Now, I am back to normal, but the problem still exists.

    Next, I try closing the project and then editting the .project file. This time I remove the descriptor tags for the validation and structure builder. The tags I remove are these:

    
                    <buildCommand>
                            <name>com.ibm.sse.model.structuredbuilder</name>
                            <arguments>
                            </arguments>
                    </buildCommand>
                    <buildCommand>
                            <name>com.ibm.etools.validation.validationbuilder</name>                        <arguments>
                            </arguments>
                    </buildCommand>
    

    Then I open my project. I check project properties / Builders. It now only shows one builder “Java Builder”

    I even tried quiting and restarting eclipse. The same problem exists when I edit a text file or java source file. When I save it, I get the same StackOverflow error.

    #225400 Reply

    Riyad Kalla
    Member

    Keith,
    What are your shortcut arguments used to launch MyEclipse? Please paste the entire command here for us to see.

    #225401 Reply

    Do you mean what are the arguments that I pass to eclipse when I start it? If so, here is what I specify when I launch eclipse:

    /home/kdf/eclipse/eclipse -vmargs -Xmx128M

    #225402 Reply

    Riyad Kalla
    Member

    Hrrm, try 256, if that doesn’t clear the problem up I’ll kick this back to the devs.

    #225404 Reply

    I tried changing the max memory from 128 to 256. It made no difference. I then checked to see if there was a newer Sun sdk. There was, but it didn’t fix it either. Here is the jvm version that I am running now:

    [kdf@vader kdf]$ java -version
    java version “1.4.2_07”
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_07-b05)
    Java HotSpot(TM) Client VM (build 1.4.2_07-b05, mixed mode)
    [kdf@vader kdf]$

    #225419 Reply

    Riyad Kalla
    Member

    keith,
    Did this start just recently? Can you track it down to a change you made?

    The developers I’ve shown this to are stumped and would really appreciate a reproducable case so they can bang on it and fix it if need be.

    You didn’t install WTP did you?

    #225425 Reply

    First off, what is WTP?

    I only have two plugins installed:

    – MyEclipse
    – Eimp

    I don’t know when it started. I did make a major change to my project. Let me explain what I did and maybe that will shed some light on the problem.

    Originally, the project was a single Eclipse Java project (also a single CVS module.) This project contained a common Java source tree (directory) and two Web applications in non-standard places.

    I exported this project out of CVS and split it up into separate projects. These new projects consisted of:

    – One Eclipse Java project, labeled common, that contains the common source tree for the entire Web site plus other supporting files. There are no JSP files in this project. There are static HTML and XML files though.

    – One MyEclipse Web application project for each Web application. Files were moved into standard places. These projects are configured to have a dependancy on the common project.

    These projects were then checked into CVS and then checked out again.

    As a part of this work, I fixed all of the warnings and MyEclipse validation errors that use to show up. It was after this I started noticing the stackoverflow errors. They could have been occuring before, but I wouldn’t have noticed because of the other messages in the log due to the MyEclipse validation errors.

    I am not sure what to do to reproduce it because there isn’t anything in the log that points to a specific cause.

    #225426 Reply

    Riyad Kalla
    Member

    First off, what is WTP?

    Web Tools Project (from Eclipse.org)

    – One Eclipse Java project, labeled common, that contains the common source tree for the entire Web site plus other supporting files. There are no JSP files in this project. There are static HTML and XML files though.

    – One MyEclipse Web application project for each Web application. Files were moved into standard places. These projects are configured to have a dependancy on the common project.

    Sounds good so far…

    I am not sure what to do to reproduce it because there isn’t anything in the log that points to a specific cause.

    Let’s try a sanity check… shut down MyEclipse, edit the shortcut you use to start it and add -clean to the front of the command line args, start it up, then shut it down and you can remove clean (this forces it to rebuild the plugin cache).

    Now start it back up, go to File > Switch Workspace and choose a new temp location, like /tmp/testingEclipse and hit OK, let Eclipse restart. Create a new Web Project, add some artifacts that normall causes validation errors in your other project. Now navigate to /tmp/testingEclipse/.metadata/.log and see if there are stack overflow exceptions. If not, try and open your OLD workspace backup (delete the log file before hand just to make tracking messages easier) and see if it is gone, or if it is back… if it IS back, go back to your testing workspace (the one without problems) And check all 3 of those projects out into that workspace… start editing and working, check the log file, are there overflow exceptions again?

    #225646 Reply

    jrmihalick
    Member

    I am also having similar problems. We have some large XML files (for use with DBUnit) in our project hierarchy and when the Structured Document and Model Builder latches onto those files, LOOKOUT! Memory consumption of the JVM skyrockets and your machine becomes a paperweight. I have no option but to kill Eclipse. I have not yet seen the StackOverflowError, but I’m sure I would have eventually get it. While troubleshooting this problem, I turned off all of the myEclipse validation items that I thought could be having an impact. So as of right now, I have following Project->MyEclipse-Validation settings in my project:

    DTD Validator (enabled)
    HTML Syntax Validator (disabled)
    JSP Validator (disabled)
    XML Schema Validator (enabled)
    XML Validator (disabled)

    In particular, I was hoping that disabling the XML Validator would fix my problems, but it didn’t. The Structured Document and Model Builder still wanted to run on those large XML files. So, then, I decided to try to disable the Structured Model and Document Builder. Right now under Project->Builders, I have the following:

    Pydev Builder (enabled)
    WebClasspathBuilder (enabled)
    Java Builder (enabled)
    J2EEProjectValidator (enabled)
    DeploymentDescriptorValidator (enabled)
    NOP JSP Builder (enabled)
    Validation (enabled)
    Structured Document and Model Builder (enabled)

    So now I will uncheck Structured Document and Model Builder (SDMB) and restart Eclipse…

    First of all, when I exit Eclipse after unchecking that option, it starts consuming major amounts of memory again, so I have to kill Eclipse using the Windows Task Manager. If I exit Eclipse without unchecking the SDMB, everything is fine.

    In any event, regardless of what I seem to do, whenever Eclipse starts up again, the SDMB is still selected. What are my options here? The SDMB is starting to remind me of some nasty viruses I have dealt with in the past! 😉

    Here are my command line arguments:

    C:\Java\eclipse3_0\eclipse\eclipse.exe -vm C:\Java\jdk1.5.0_01\bin\java.exe -data c:\java\eclipse_workspace -vmargs -Xmx512M

    (Incidentally, I have tried starting with the -clean option, and I still have the problem)

    Here is my .project file (after I manually removed the buildCommand duplicates as posted above — since I had the same problem initially):

    <?xml version=”1.0″ encoding=”UTF-8″?>
    <projectDescription>
    <name>AMS_trunk</name>
    <comment></comment>
    <projects>
    </projects>
    <buildSpec>
    <buildCommand>
    <name>org.python.pydev.PyDevBuilder</name>
    <arguments>
    </arguments>
    </buildCommand>
    <buildCommand>
    <name>com.genuitec.eclipse.j2eedt.core.WebClasspathBuilder</name>
    <arguments>
    </arguments>
    </buildCommand>
    <buildCommand>
    <name>org.eclipse.jdt.core.javabuilder</name>
    <arguments>
    </arguments>
    </buildCommand>
    <buildCommand>
    <name>com.genuitec.eclipse.j2eedt.core.J2EEProjectValidator</name>
    <arguments>
    </arguments>
    </buildCommand>
    <buildCommand>
    <name>com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator</name>
    <arguments>
    </arguments>
    </buildCommand>
    <buildCommand>
    <name>de.bb.bje.eclipse.IncrementalJspBuilder</name>
    <arguments>
    </arguments>
    </buildCommand>
    <buildCommand>
    <name>com.ibm.etools.validation.validationbuilder</name>
    <arguments>
    </arguments>
    </buildCommand>
    </buildSpec>
    <natures>
    <nature>com.genuitec.eclipse.j2eedt.core.webnature</nature>
    <nature>org.eclipse.jdt.core.javanature</nature>
    <nature>org.python.pydev.pythonNature</nature>
    <nature>com.genuitec.eclipse.cross.easystruts.eclipse.easystrutsnature</nature>
    </natures>
    </projectDescription>

    If you need a copy of my Configuration Details (from Help -> About Eclipse Platform), I can provide it. I am running on Windows XP, Java 1.5.0_01, Eclipse 3.0.1. myEclipse 3.8.4

    Thanks,
    Jason

    #225647 Reply

    Riyad Kalla
    Member

    Neither Eclipse 3.0.x or MyEclipse 3.8.x are certified on JDK 5.0, so I’m wondering what would happen if you installed Sun JDK (not IBM) 1.4.2_07 and gave it a try?

    TIP: When installing the JDK, if you unselect all the JRE files, it will just unzip the JDK to a dir and not tamper with your registry settings, so you can safely do that, then adjust your -vm switch to point at it.

    Also could you paste your Window > Prefs > MyEclipse version here (it is more detailed than the Help > About version that is shown).

    #225662 Reply

    jrmihalick
    Member

    I can try another JVM, but I have a colleague on the same project (who is also a registered myEclipse user) who was running 1.4.2.x and has given up on myEclipse and removed it from his system because of the same problem I am having.

    Can you please tell me a guaranteed way to disable the SDMB? Eclipse just crashed on me again when it attempted to rebuild my workspace.

    Version: 3.8.4+QF2
    Build Id: 200502031200-3.8.4+QF2

Viewing 15 posts - 1 through 15 (of 21 total)
Reply To: validation causing a java.lang.StackOverflowError

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