facebook

JPA reverse engineering – invalid thread access – error

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #308477 Reply

    Balazs D. Toth
    Participant

    Hi,
    This stands for both MyEclipse 8.5 and MyEclipse for Spring 8.5.
    When I have to REGENERATE JPA classes from a table (because of table changes), and
    ‘Entity Bean Generation -> Update persistance.xml with generated entities’ option is ENABLED, then the following error occurs: An internal error occurred during: “Generating Artifacts”. – invalid thread access.
    I don’t know it’s an error or a facilty, but I’d like to let the others know, that the above-mentioned option shouldn’t be enabled during repeated JPA reverse engineeering.
    Balazs Toth

    #308478 Reply

    Balazs,
    I could not replicate the issue at my end. I tested with MyEclipse 8.5 and MySql. Can you give some more information regarding the issue?
    1. Can you copy paste your installation details from MyEclipse > Installation Summary > Installation Details?
    2. What is the database you are using and what is the change made to the table?
    3. Are there any errors logged in the log file located at workspace dir > .metadata > .log? Please clear the file, save it and then regenerate JPA classes to get relevant errors.

    #308481 Reply

    Balazs D. Toth
    Participant

    1. That damned MyEclise for Spring 8.5 is working now OK, but MyEclipse 8.5 is still not working. The installation details.
    *** Date:
    2010. május 19. 14:20:52 CEST

    ** System properties:
    OS=WindowsXP
    OS version=5.1.0
    Java version=1.6.0_13

    *** MyEclipse details:
    MyEclipse Enterprise Workbench
    Version: 8.5
    Build id: 8.5-20100319

    *** Eclipse details:
    MyEclipse Enterprise Workbench

    Version: 8.5
    Build id: 8.5-20100319

    Eclipse startup command=-os
    win32
    -ws
    win32
    -arch
    x86
    -showsplash
    -launcher
    D:\Program Files\Genuitec\MyEclipse 8.x Latest\myeclipse.exe
    -name
    Myeclipse
    –launcher.library
    D:\Program Files\Genuitec\MyEclipse 8.x Latest\../Common/plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519\eclipse_1206.dll
    -startup
    D:\Program Files\Genuitec\MyEclipse 8.x Latest\../Common/plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
    -install
    D:/Program Files/Genuitec/MyEclipse 8.x Latest
    -configuration
    configuration
    -vm
    D:/Program Files/Genuitec/Common/binary/com.sun.java.jdk.win32.x86_1.6.0.013/jre/bin/client/jvm.dll

    2. MySQL database, a new column is included in a table (InnoDB)

    3. The log.

    !ENTRY org.eclipse.ui 4 0 2010-05-19 14:13:42.753
    !MESSAGE Unable to create editor ID org.eclipse.wst.xml.ui.internal.tabletree.XMLMultiPageEditorPart: Invalid thread access
    !STACK 0
    org.eclipse.swt.SWTException: Invalid thread access
    at org.eclipse.swt.SWT.error(SWT.java:3884)
    at org.eclipse.swt.SWT.error(SWT.java:3799)
    at org.eclipse.swt.SWT.error(SWT.java:3770)
    at org.eclipse.swt.widgets.Widget.error(Widget.java:463)
    at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:355)
    at org.eclipse.swt.widgets.Widget.checkParent(Widget.java:275)
    at org.eclipse.swt.widgets.Widget.<init>(Widget.java:146)
    at org.eclipse.swt.widgets.Control.<init>(Control.java:105)
    at org.eclipse.swt.widgets.Scrollable.<init>(Scrollable.java:75)
    at org.eclipse.swt.widgets.Composite.<init>(Composite.java:95)
    at org.eclipse.ui.internal.PartPane.createControl(PartPane.java:148)
    at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:634)
    at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:462)
    at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
    at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:286)
    at org.eclipse.ui.internal.EditorManager.findEditor(EditorManager.java:403)
    at org.eclipse.ui.internal.EditorManager.findEditor(EditorManager.java:381)
    at org.eclipse.ui.internal.WorkbenchPage.findEditor(WorkbenchPage.java:2096)
    at com.genuitec.eclipse.springhibernate.configuration.SpringBeansConfigFile.getXMLModelFromOpenEditors(SpringBeansConfigFile.java:129)
    at com.genuitec.eclipse.springhibernate.configuration.SpringBeansConfigFile.configureModel(SpringBeansConfigFile.java:72)
    at com.genuitec.eclipse.springhibernate.configuration.SpringBeansConfigFile.<init>(SpringBeansConfigFile.java:62)
    at com.genuitec.eclipse.hibernate.util.PersistenceFile.<init>(PersistenceFile.java:33)
    at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob$3.execute(GenerateArtifactsJob.java:467)
    at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:64)
    at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:95)
    at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob.run(GenerateArtifactsJob.java:419)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

    !ENTRY org.eclipse.core.jobs 4 2 2010-05-19 14:13:42.768
    !MESSAGE An internal error occurred during: “Generating Artifacts”.
    !STACK 0
    org.eclipse.swt.SWTException: Invalid thread access
    at org.eclipse.swt.SWT.error(SWT.java:3884)
    at org.eclipse.swt.SWT.error(SWT.java:3799)
    at org.eclipse.swt.SWT.error(SWT.java:3770)
    at org.eclipse.swt.widgets.Widget.error(Widget.java:463)
    at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:355)
    at org.eclipse.swt.widgets.Widget.checkParent(Widget.java:275)
    at org.eclipse.swt.widgets.Widget.<init>(Widget.java:146)
    at org.eclipse.swt.widgets.Control.<init>(Control.java:105)
    at org.eclipse.swt.widgets.Scrollable.<init>(Scrollable.java:75)
    at org.eclipse.swt.widgets.Composite.<init>(Composite.java:95)
    at org.eclipse.ui.internal.PartPane.createControl(PartPane.java:148)
    at org.eclipse.ui.internal.EditorReference.getEmptyEditor(EditorReference.java:779)
    at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:483)
    at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
    at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:286)
    at org.eclipse.ui.internal.EditorManager.findEditor(EditorManager.java:403)
    at org.eclipse.ui.internal.EditorManager.findEditor(EditorManager.java:381)
    at org.eclipse.ui.internal.WorkbenchPage.findEditor(WorkbenchPage.java:2096)
    at com.genuitec.eclipse.springhibernate.configuration.SpringBeansConfigFile.getXMLModelFromOpenEditors(SpringBeansConfigFile.java:129)
    at com.genuitec.eclipse.springhibernate.configuration.SpringBeansConfigFile.configureModel(SpringBeansConfigFile.java:72)
    at com.genuitec.eclipse.springhibernate.configuration.SpringBeansConfigFile.<init>(SpringBeansConfigFile.java:62)
    at com.genuitec.eclipse.hibernate.util.PersistenceFile.<init>(PersistenceFile.java:33)
    at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob$3.execute(GenerateArtifactsJob.java:467)
    at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:64)
    at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:95)
    at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob.run(GenerateArtifactsJob.java:419)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

    #308483 Reply

    Balazs D. Toth
    Participant

    Shalini,
    I consulted one of my colleagues, and he also met the problem. He adviced me to check if the persistance.xml file is open and close it.
    It helped with the problematic MyEclipse 8.5. BUT with MyEclipse for Spring 8.5, which suddenly got well, it is still open.
    Afterall it must be something with the open (edited) persistance.xml file. We waisted days for the problem, so I don’t feel like dealing with it any more.
    Balazs Toth

    #308502 Reply

    Balazs,
    Its good to know that you are all set but I still could not replicate this at my end.
    I shall escalate this to the dev team member. They will get back to you on this.

    #308601 Reply

    Brian Fernandes
    Moderator

    Balazs,

    Sorry to hear you are running into this issue, we do need to fix it. I have a couple of questions:

    1) You mentioned problems during “regeneration” – does that mean that each time you start MyEclipse it works fine the first time but is problematic for subsequent attempts to reverse engineer?

    2) Is your persistence.xml file open or closed during RE?

    3) Do you reverse engineer in the background (the RE job is backgroundable) or do you let the job complete?

    4) Do you invoke the RE process from the DB Browser view by selecting a table or do you invoke it from the project itself using the MyEclipse > Generate Entities & DAOs context menu action?

    #308614 Reply

    Balazs D. Toth
    Participant

    Brian,
    here are the answers.
    1. I mean, that for some reason (table modification) I regenerate the previously generated JPA classes. This the first action after starting MyEclipse. I haven’t tried to generate new JPA classes. (I’m not sure, but maybe, that deleting the definition of class in question from persistance.xml helped. This is why persistance.xml is left open? I’m confused.)
    2. As I wrote earlier we concluded, that the cause of the problem is the open persistance.xml file. Though sometimes still works while persistance.xml is open, I don’t know why and when.
    3. I never use background processing, I like to see what is happening.
    4. I tried both versions, no difference at all. If it doesn’t want to work, then it doesn’t work.
    Balazs

    #308734 Reply

    Brian Fernandes
    Moderator

    Balazs,

    Thanks for the detailed steps and the prompt reply. Hopefully we will now be able to reproduce this problem and possibly put in a fix for the next release. Will let you know if we make any progress on this issue.

    #310262 Reply

    NickCase
    Participant

    I just had this issue as well. however:

    I wasn’t re-engineering, I was generating new entities.
    My persistence.xml wasn’t open, but my applicationContext.xml was

    I closed all my editors and re-ran with the update persistence.xml checked and it worked.

    I hope this helps to find the issue.

    Nick

    #310274 Reply

    Nick,
    What is the version of MyEclipse that you are using? Can you copy paste your installation details from MyEclipse > Installation Summary > Installation Details?

Viewing 10 posts - 1 through 10 (of 10 total)
Reply To: JPA reverse engineering – invalid thread access – error

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