facebook

[Closed] Problem on using Hibernate Reverse Engineering

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

    jchow
    Member

    Hi,

    I am using myeclipse version 5.0 GA and eclipse SDK 3.2
    After finished all the steps on Hibernate Reverse Engineering wizard, it prompt errors.
    When I retry “Hibernate Reverse Engineering…” by right click to table name. No dialog box appear again.
    I try to reinstall myeclipse, but it doesn’t help!

    How can I solve the problem? Thanks!

    Regards,

    #257623 Reply

    Brian Fernandes
    Moderator

    jchow,

    An error will be logged describing why the RE isn’t working for you.
    Can you clear your existing error log and then try the “Hibernat Reverse Engineering” action? Then paste any stack trace(s) that might appear in the error log here.

    More instructions are available here: Posting Guidelines

    Best,
    Brian.

    #257699 Reply

    jchow
    Member

    The project name original is mm2-web. Last week I changed to mm-web2.
    thanks

    The log as below:
    ——————————————————————————-

    !ENTRY com.genuitec.eclipse.hibernate 1 0 2006-08-28 09:40:29.453
    !MESSAGE Cannot create file
    !STACK 1
    org.eclipse.core.internal.resources.ResourceException: Resource /mm2-web does not exist.
    at org.eclipse.core.internal.resources.Resource.checkExists(Resource.java:311)
    at org.eclipse.core.internal.resources.Resource.checkAccessible(Resource.java:187)
    at org.eclipse.core.internal.resources.Project.checkAccessible(Project.java:142)
    at org.eclipse.core.internal.resources.File.create(File.java:112)
    at org.eclipse.core.internal.resources.File.create(File.java:179)
    at com.genuitec.eclipse.hibernate.wizards.NewHibernateRETypeMappingWizardPage.getRESettingsFile(NewHibernateRETypeMappingWizardPage.java:297)
    at com.genuitec.eclipse.hibernate.wizards.NewHibernateRETypeMappingWizardPage.updatedDOMREDefinition(NewHibernateRETypeMappingWizardPage.java:241)
    at com.genuitec.eclipse.hibernate.wizards.NewHibernateRETypeMappingWizardPage.refreshPage(NewHibernateRETypeMappingWizardPage.java:206)
    at com.genuitec.eclipse.hibernate.wizards.NewHibernateMappingWizard.projectChanged(NewHibernateMappingWizard.java:130)
    at com.genuitec.eclipse.hibernate.wizards.NewHibernateArtifactWizardPage.loadProjectProperties(NewHibernateArtifactWizardPage.java:584)
    at com.genuitec.eclipse.hibernate.wizards.NewHibernateArtifactWizardPage.updatePackageFragmentRoot(NewHibernateArtifactWizardPage.java:494)
    at com.genuitec.eclipse.hibernate.wizards.NewHibernateArtifactWizardPage.init(NewHibernateArtifactWizardPage.java:857)
    at com.genuitec.eclipse.hibernate.wizards.NewHibernateMappingWizard.createPageControls(NewHibernateMappingWizard.java:136)
    at org.eclipse.jface.wizard.WizardDialog.createPageControls(WizardDialog.java:614)
    at org.eclipse.jface.wizard.WizardDialog.createContents(WizardDialog.java:502)
    at org.eclipse.jface.window.Window.create(Window.java:426)
    at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1124)
    at com.genuitec.eclipse.hibernate.action.NewHibernateMappingAction.basicRun(NewHibernateMappingAction.java:40)
    at com.genuitec.eclipse.core.ui.action.LicenseValidatingAction.run(Unknown Source)
    at com.genuitec.eclipse.hibernate.action.NewHibernateMappingAction.run(NewHibernateMappingAction.java:51)
    at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:254)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:539)
    at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488)
    at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:400)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95)
    at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
    at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
    at org.eclipse.core.launcher.Main.run(Main.java:977)
    at org.eclipse.core.launcher.Main.main(Main.java:952)
    !SUBENTRY 1 org.eclipse.core.resources 4 368 2006-08-28 09:40:29.453
    !MESSAGE Resource /mm2-web does not exist.

    !ENTRY org.eclipse.ui 4 4 2006-08-28 09:40:29.546
    !MESSAGE Unhandled event loop exception

    !ENTRY org.eclipse.ui 4 0 2006-08-28 09:40:29.546
    !MESSAGE java.lang.NullPointerException
    !STACK 0
    java.lang.NullPointerException
    at org.eclipse.wst.sse.core.internal.model.ModelManagerImpl.calculateURIResolver(ModelManagerImpl.java:486)
    at org.eclipse.wst.sse.core.internal.model.ModelManagerImpl._commonGetModel(ModelManagerImpl.java:307)
    at org.eclipse.wst.sse.core.internal.model.ModelManagerImpl.getModelForEdit(ModelManagerImpl.java:1002)
    at com.genuitec.eclipse.springhibernate.configuration.SpringBeansConfigFile.configureModel(SpringBeansConfigFile.java:66)
    at com.genuitec.eclipse.springhibernate.configuration.SpringBeansConfigFile.<init>(SpringBeansConfigFile.java:49)
    at com.genuitec.eclipse.hibernate.util.HibernateREFile.<init>(HibernateREFile.java:16)
    at com.genuitec.eclipse.hibernate.wizards.NewHibernateRETypeMappingWizardPage.updatedDOMREDefinition(NewHibernateRETypeMappingWizardPage.java:251)
    at com.genuitec.eclipse.hibernate.wizards.NewHibernateRETypeMappingWizardPage.refreshPage(NewHibernateRETypeMappingWizardPage.java:206)
    at com.genuitec.eclipse.hibernate.wizards.NewHibernateMappingWizard.projectChanged(NewHibernateMappingWizard.java:130)
    at com.genuitec.eclipse.hibernate.wizards.NewHibernateArtifactWizardPage.loadProjectProperties(NewHibernateArtifactWizardPage.java:584)
    at com.genuitec.eclipse.hibernate.wizards.NewHibernateArtifactWizardPage.updatePackageFragmentRoot(NewHibernateArtifactWizardPage.java:494)
    at com.genuitec.eclipse.hibernate.wizards.NewHibernateArtifactWizardPage.init(NewHibernateArtifactWizardPage.java:857)
    at com.genuitec.eclipse.hibernate.wizards.NewHibernateMappingWizard.createPageControls(NewHibernateMappingWizard.java:136)
    at org.eclipse.jface.wizard.WizardDialog.createPageControls(WizardDialog.java:614)
    at org.eclipse.jface.wizard.WizardDialog.createContents(WizardDialog.java:502)
    at org.eclipse.jface.window.Window.create(Window.java:426)
    at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1124)
    at com.genuitec.eclipse.hibernate.action.NewHibernateMappingAction.basicRun(NewHibernateMappingAction.java:40)
    at com.genuitec.eclipse.core.ui.action.LicenseValidatingAction.run(Unknown Source)
    at com.genuitec.eclipse.hibernate.action.NewHibernateMappingAction.run(NewHibernateMappingAction.java:51)
    at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:254)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:539)
    at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488)
    at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:400)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95)
    at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
    at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
    at org.eclipse.core.launcher.Main.run(Main.java:977)
    at org.eclipse.core.launcher.Main.main(Main.java:952)

    #257702 Reply

    Brian Fernandes
    Moderator

    jchow,

    Here’s what you need to do.

    1) Open the project properties for mm-web2, go to the MyEclipse > Hibernate page and reseelct the hibernate.cfg.xml file in the mm-web2 project.
    2) When you bring up the RE wizard, on Page 2, notice the Rev-eng settings file field right at the top of the wizard. Click Setup > Use Existing and point it to the hibernate.reveng.xml file in your current project (i.e. in mm-web2)

    The problem is that the project properties are pointing to hibernate resources in your old project (mm2-web) which does not exist anymore an you need to update these two properties by hand. We will look into improving the error reporting in this area and possibly doing some automatic refactoring here if possible.

    Let us know if you require furthe rassistance,

    Best,
    Brian.

    #257766 Reply

    jchow
    Member

    Hi Brian,

    I finished to step1, but cannot bring up RE wizard (that you described in step2). I view the .log file, the exception as the same as I posted previously (27-Aug).
    Please advice! Thanks

    Regards,
    jchow

    #257768 Reply

    Brian Fernandes
    Moderator

    jchow,

    That is odd, it shouldn’t fail to open as you described. I’ve filed a PR on this for internal investigation.

    To get you started immediately, open the .myhibernatedata file in your current project and find the line which says reSettingsFile=… and delete the entire line and save the file.

    Close and reopen your project and then try invoking the wizard.

    Let us know how it goes,

    Best,
    Brian.

    #257882 Reply

    jchow
    Member

    Brian,

    After remove the line, RE wizard can open. Thanks!

    Regards,
    jchow

    #257984 Reply

    Brian Fernandes
    Moderator

    jchow,

    Gald it works. As promised, we’ll improve that part in the next release. Thank you for your patience.

    Best,
    Brian.

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: [Closed] Problem on using Hibernate Reverse Engineering

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