facebook

MyEclipse 9.1: Spring wiht Hibernate and Reverse Engineering

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

    Fripp
    Member

    Hi,
    I have problem to configure project.
    add capability: Spring 2.0, Hiberante 3.1
    db: PostgresSql
    IDE: MyEclipse 9.1

    When I try to make the Reverse Engineering the output console is:

    ERROR Worker-10 org.hibernate.util.XMLHelper – Error parsing XML: C:\…\applicationContext.xml(2) Document is invalid: no grammar found.
    2011-09-27 17:46:50,785 ERROR Worker-10 org.hibernate.util.XMLHelper – Error parsing XML: C:\…\applicationContext.xml(2) Document root element “beans”, must match DOCTYPE root “null”.

    in the log:

    !ENTRY org.eclipse.ui 4 0 2011-09-27 17:46:51.304
    !MESSAGE Unable to create editor ID com.genuitec.eclipse.springframework.springconfigeditor: Invalid thread access
    !STACK 0
    org.eclipse.swt.SWTException: Invalid thread access
        at org.eclipse.swt.SWT.error(SWT.java:4083)
        at org.eclipse.swt.SWT.error(SWT.java:3998)
        at org.eclipse.swt.SWT.error(SWT.java:3969)
        at org.eclipse.swt.widgets.Widget.error(Widget.java:468)
        at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:359)
        at org.eclipse.swt.widgets.Widget.checkParent(Widget.java:279)
        at org.eclipse.swt.widgets.Widget.<init>(Widget.java:149)
        at org.eclipse.swt.widgets.Control.<init>(Control.java:108)
        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:637)
        at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
        at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
        at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:289)
        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:2102)
        at com.genuitec.eclipse.springhibernate.configuration.SpringBeansConfigFile.getXMLModelFromOpenEditors(SpringBeansConfigFile.java:128)
        at com.genuitec.eclipse.springhibernate.configuration.SpringBeansConfigFile.configureModel(SpringBeansConfigFile.java:71)
        at com.genuitec.eclipse.springhibernate.configuration.SpringBeansConfigFile.<init>(SpringBeansConfigFile.java:61)
        at com.genuitec.eclipse.springhibernate.configuration.SpringBeansConfigFile.<init>(SpringBeansConfigFile.java:55)
        at com.genuitec.eclipse.hibernate.wizards.MEDAOExporter.doStart(MEDAOExporter.java:154)
        at com.genuitec.eclipse.hibernate.tool.hbm2x.VAbstractExporter.start(VAbstractExporter.java:97)
        at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob$3.execute(GenerateArtifactsJob.java:631)
        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:54)
    
    !ENTRY org.eclipse.core.jobs 4 2 2011-09-27 17:46:51.354
    !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:4083)
        at org.eclipse.swt.SWT.error(SWT.java:3998)
        at org.eclipse.swt.SWT.error(SWT.java:3969)
        at org.eclipse.swt.widgets.Widget.error(Widget.java:468)
        at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:359)
        at org.eclipse.swt.widgets.Widget.checkParent(Widget.java:279)
        at org.eclipse.swt.widgets.Widget.<init>(Widget.java:149)
        at org.eclipse.swt.widgets.Control.<init>(Control.java:108)
        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:787)
        at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:486)
        at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
        at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:289)
        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:2102)
        at com.genuitec.eclipse.springhibernate.configuration.SpringBeansConfigFile.getXMLModelFromOpenEditors(SpringBeansConfigFile.java:128)
        at com.genuitec.eclipse.springhibernate.configuration.SpringBeansConfigFile.configureModel(SpringBeansConfigFile.java:71)
        at com.genuitec.eclipse.springhibernate.configuration.SpringBeansConfigFile.<init>(SpringBeansConfigFile.java:61)
        at com.genuitec.eclipse.springhibernate.configuration.SpringBeansConfigFile.<init>(SpringBeansConfigFile.java:55)
        at com.genuitec.eclipse.hibernate.wizards.MEDAOExporter.doStart(MEDAOExporter.java:154)
        at com.genuitec.eclipse.hibernate.tool.hbm2x.VAbstractExporter.start(VAbstractExporter.java:97)
        at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob$3.execute(GenerateArtifactsJob.java:631)
        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:54)
    

    I have tried with various versions of Spring and Hibernate but the result is the same.
    An equal configuration wiht MyEclipse 5.5.1 works, the Hibernate Reverse soo.

    #320003 Reply

    support-swapna
    Moderator

    Fripp ,

    Sorry that you are seeing this issue with MyEclipse.

    1) Can you switch to a new workspace, create a new project,try the hibernate reverse engineering process and check if this issue persists?

    2) Clear the contents of the .log file which is located at <workspace dir>/.metadata/.log , replicate the issue and paste the entire contents of .log file here.

    Let me know how it works for you.

    #320007 Reply

    Fripp
    Member

    Ok, thanks.

    1)switch workspace
    2)new project java
    3)add spring capability, 2.0, use userLibrary
    spring.jar
    spring-hibernate3.jar
    asm.jar
    cglib-2.1.jar
    dom4j-1.6.jar
    ehcache-1.1.jar
    hibernate3.jar
    4)add hibernate capability, 3.0, use userLibrary,
    -spring configuration file (applicationContext.xml)
    -use exisisting spring configuration file
    5)Dialect postgresSql not found in mylibrary while wiht hibernate 3.3 found org.hibernate.dialect.PostgresPlusDialect and I rename dialect in the applicationContext wiht org.hibernate.dialect.PostgresSQLDialect.
    6)I retry reverse wiht DAO spring …
    log in .metadata is empty
    log in console is:

    2011-09-28 11:18:35,963 ERROR Worker-10 org.hibernate.util.XMLHelper - Error parsing XML: C:\workspace\progettoCGILTestHibernate\testHibernateSpringReverse\applicationContext.xml(2) Document is invalid: no grammar found.
    2011-09-28 11:18:35,964 ERROR Worker-10 org.hibernate.util.XMLHelper - Error parsing XML: C:\workspace\progettoCGILTestHibernate\testHibernateSpringReverse\applicationContext.xml(2) Document root element "beans", must match DOCTYPE root "null".
    
    #320047 Reply

    Brian Fernandes
    Moderator

    Fripp,

    After switching your workspace, do you still see the errors you reported in your first post? Those would indicate a serious issue.

    The errors you see now, should be ignorable – your classes should be generated and the beans should be correctly defined in the applicationContext.xml file. Can you please confirm if classes are being generated and your applicationContext.xml file is modified with the DAO reference?

    #320053 Reply

    Fripp
    Member

    After switching my workspace log in .metadata is empty.

    then it is ignorabile ERROR paste in the precedent post, this is more important . Thanks!!

    When I do Reverse, the window pop up it opens and then it is closed, without showing errors.

    If I can reverse wiht MyEclipse Derby Connection, the generation pojo and DAO it correctly happens and my applicationContext.xml file is modified with the DAO reference!

    Is a issue of Driver? If yes, why does it work in the myEclipse 5.5 ?
    a lot of graces

    #320092 Reply

    Brian Fernandes
    Moderator

    Fripp,

    I’m afraid your response was not clear.

    1) Are your classes generated? If yes, no problem.

    2) Do you still see the errors that you reported in your first post? If no, then we have no problem.

    3) Is it working with Derby but not with your other database?

    Could you please clarify explicitly?

    #320097 Reply

    Fripp
    Member

    ok

    1) No, isn’t generated.
    2) No, this is not problem more.
    3) Yes, I working with Derby but not with my other database (PostgresSql)

    thanks

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: MyEclipse 9.1: Spring wiht Hibernate and Reverse Engineering

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