- This topic has 7 replies, 3 voices, and was last updated 18 years, 6 months ago by Brian Fernandes.
-
AuthorPosts
-
Anselm McClainMemberI would like to use the “Create Hibernate Mapping” function within Database Explorer to generate Hibernate mapping files, objects, etc. I was able to use this for a previous project, but not it fails – I right click on a MySQL DB table, select “Create Mapping” and get nothing. When I look in the error log, I see a “Cannot create file” error:
org.eclipse.core.internal.resources.ResourceException: Resource /WebInventory does not exist.
[Full text below]
WebInventory was the *previous* name of my project. I renamed everything to techinventory when it became apparent that we might deploy this on the web and through a Swing GUI. I have checked all of my project properties and every option I can find, but I don’t see any remaining references to WebInventory. Somehow, however, MyEclipse’s Hibernate system still has the old name in mind.
Any suggestions of other options that will need to be flipped / config files that need to be edited?
Thanks!!! – ATM
************************************************************
MY ECLIPSE CONFIG INFO:
*** Date: Wed Mar 29 17:53:45 EST 2006*** System properties:
OS=WindowsXP
OS version=5.1
Java version=1.5.0_06*** MyEclipse details:
MyEclipse Enterprise WorkbenchVersion: 4.1.1 GA
Build id: 20060309-4.1.1-GA*** Eclipse details:
Eclipse SDKVersion: 3.1.2
Build id: M20060118-1600Eclipse Platform
Version: 3.1.2
Build id: M20060118-1600Eclipse RCP
Version: 3.1.2
Build id: M20060118-1600Eclipse Java Development Tools
Version: 3.1.2
Build id: M20060118-1600Eclipse Plug-in Development Environment
Version: 3.1.2
Build id: M20060118-1600Eclipse Project SDK
Version: 3.1.2
Build id: M20060118-1600Eclipse startup command=-os
win32
-ws
win32
-arch
x86
-launcher
C:\Program Files\eclipse\eclipse.exe
-name
Eclipse
-showsplash
600
-exitdata
1578_e0
-vm
C:\WINDOWS\System32\javaw.exe************************************************************
FULL ERROR (1 of 3 when I click the “Create Mapping” option):org.eclipse.core.internal.resources.ResourceException: Resource /WebInventory does not exist.
at org.eclipse.core.internal.resources.Resource.checkExists(Resource.java:304)
at org.eclipse.core.internal.resources.Resource.checkAccessible(Resource.java:172)
at org.eclipse.core.internal.resources.Project.checkAccessible(Project.java:124)
at org.eclipse.core.internal.resources.File.create(File.java:111)
at org.eclipse.core.internal.resources.File.create(File.java:183)
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:523)
at com.genuitec.eclipse.hibernate.wizards.NewHibernateArtifactWizardPage.updatePackageFragmentRoot(NewHibernateArtifactWizardPage.java:443)
at com.genuitec.eclipse.hibernate.wizards.NewHibernateArtifactWizardPage.init(NewHibernateArtifactWizardPage.java:689)
at com.genuitec.eclipse.hibernate.wizards.NewHibernateMappingWizard.createPageControls(NewHibernateMappingWizard.java:136)
at org.eclipse.jface.wizard.WizardDialog.createPageControls(WizardDialog.java:611)
at org.eclipse.jface.wizard.WizardDialog.createContents(WizardDialog.java:502)
at org.eclipse.jface.window.Window.create(Window.java:418)
at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:996)
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:246)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:538)
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:843)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3125)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2758)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:367)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163)
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:334)
at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
at org.eclipse.core.launcher.Main.run(Main.java:973)
at org.eclipse.core.launcher.Main.main(Main.java:948)
Haris PecoMemberamcclain,
You have to change ‘Java src folder’ in first page of MyEclipse Reveng wizard
Best regards
Anselm McClainMemberThank you for the quick response. Unfortunately, the wizard does not launch at all. As soon as I click on the “Create Hibernate Mapping” menu item, I see the error logged and nothing else happens.
I have seen the three-step wizard before this problem began occuring – I assume this is the reveng wizard you mention. Currently there is no way at all for me to access it.
Any further help, or is there another wizard or something I am missing?
Thank you again – ATM
Haris PecoMemberI have tried reproduce your case and I can’t do it
I change project name with refactor-rename on project – how you change project name ?Best
Anselm McClainMemberI too used the Refactor > Rename option to rename the project. I then went in and renamed several source folders, and had to clear out multiple references to the old package names, etc. in both code and Eclipse/MyEclipse options.
Not much was developed, however, so it wasn’t too big a deal. Are there any config files that I could load up and read/edit for how MyEclipse stores its project data? I know that there’s a reference remaining somewhere, but still no luck tracking it down…
Again, thanks for your help – Anselm
Anselm McClainMemberWow – looks like I was able to resolve it myself by renaming the project once again (to another, third name). That seems to have solved the problem as the wizard ran again. Must have forced some hidden property to update.
I’ll try some mappings and POJO generation and let you know if I get stuck again, but I appreciate the help and support!
Haris PecoMemberAnselm,
You can try find .myhibernatedata file in your project tree – rename reference from old project to new project
Warning – you can break complete myeclipse settings and then your only option is make project from beginningBest regards
Brian FernandesModeratorThere is a legacy issue with renaming projects in Hibernate, our datastructures include the project name in some paths which are not updated whe you rename the project.
If you do rename your project, fire up the Project properties page, go to MyEclipse-Hibernate and “reselect” your config file (it would still be pointing to your old project).
Sorry for the inconvenience caused, we’re looking at fixing these issues asap.
Best,
Brian. -
AuthorPosts