- This topic has 3 replies, 2 voices, and was last updated 18 years, 5 months ago by Brian Fernandes.
-
AuthorPosts
-
nclemeurMemberSince upgrading MyEclipse (please see version details at the end of this email), I have some problem to generate hibernate mappings. I can connect to the database (DB2) with the database explorer, the wizard to generate the mappings seems to work fine, but as soon as I hit finish, I have this error:
Error 2006-05-25 12:19:11.380 An internal error occurred during: "Generating Artifacts". java.lang.IllegalArgumentException: Path must include project and resource name: / at org.eclipse.core.internal.utils.Assert.isLegal(Assert.java:60) at org.eclipse.core.internal.resources.Workspace.newResource(Workspace.java:1562) at org.eclipse.core.internal.resources.Container.getFile(Container.java:125) at com.genuitec.eclipse.hibernate.util.HibernateUtils.getConfigFile(HibernateUtils.java:311) at com.genuitec.eclipse.hibernate.util.HTUtils.getConsoleConfiguration(HTUtils.java:165) at com.genuitec.eclipse.hibernate.util.HTUtils.getConsoleConfiguration(HTUtils.java:154) at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob.run(GenerateArtifactsJob.java:198) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)
I am also including the content of .myhibernatedata file at then of this message.
would anyone know a workaround?
BTW, I have a seconde workspace where it is working fine altough I am using Oracle in that one.
Cheers
Nicolas
== MyEclipse details
*** Date: Thu May 25 12:20:48 EST 2006
*** System properties:
OS=WindowsXP
OS version=5.1
Java version=1.5.0*** MyEclipse details:
MyEclipse Enterprise WorkbenchVersion: 4.1.1 GA
Build id: 20060228-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:\eclipse\eclipse-3.1.2\eclipse.exe
-name
Eclipse
-showsplash
600
-exitdata
dbc_64
-vm
C:\Sun\jdk1.5.0\bin\javaw.exe.myhibernatdata file
# #Thu May 25 12:19:11 EST 2006 springDaoFile= genVersionTag=false daoSFId= configFile= sessionFactoryId= profile= libInstallFolder= addLibs2Classpath=false jndiPath= genBasicCompId=false addLibs2Project=false keyGenerator=assigned createConfigFile=false basePersistenceClass= version=3.0 useJavaTypes=true reSettingsFile=/hcpdWeb/hibernate.reveng.xml
Brian FernandesModeratorHi,
Thanks for all the detail up front.
It looks like your hibernate config file hasn’t been set. I don’t know how this could have come about, but to fix it, do the following:
Bring up your project properties (right click on the project and choose Properties) then go to the MyEclipse-Hibernate page. Use the browse button to reselect your hibernate config file and click OK. RE should work fine now.If you continue to experience a problem, do let us know.
Best,
Brian.
nclemeurMemberThanks a lot, this solved my problem. I still had a little problem because in the hibernate-config file I am using my own db2dialect and the RE engine could not find the class (the class is present in that project) for that dialect. But reverting to a defaut Db2 dialect cured the problem.
Thank you very much for the quick response, it really helped.
PS: are there any plan to have a way to define a custom strategy class for the RE engine like it is possible in the original tools from the hibernate team?
Brian FernandesModeratorI still had a little problem because in the hibernate-config file I am using my own db2dialect and the RE engine could not find the class (the class is present in that project) for that dialect. But reverting to a defaut Db2 dialect cured the problem.
We will investigate supporting this case in the furture. So you have the source for your custon dialect in your project’s source folder? If you still need to get this going, a quick and dirty solution is to export your dialect to a JAR file and add that JAR file to the list of driver JARs that you are using to Reverse engineer. Now that we have someone who wants this, we will look at supporting this out of the box later 🙂
PS: are there any plan to have a way to define a custom strategy class for the RE engine like it is possible in the original tools from the hibernate team?
Yes, it’s on the cards for sure. It might make the 5.0 GA release, but management has not committed that feature to a time line. Thanks for asking, it helps somewhat while prioritizing 🙂
Best,
Brian. -
AuthorPosts