程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> JAVA編程 >> 關於JAVA >> Generating Artifacts問題解決

Generating Artifacts問題解決

編輯:關於JAVA
 

在myeclipse中使用hibernate進行“Hibernate Reverse Engineering”報如下錯:

!ENTRY org.eclipse.core.jobs 4 2 2010-12-27 14:20:11.625
!MESSAGE An internal error occurred during: "Generating Artifacts".
!STACK 0
java.lang.IllegalArgumentException: Path must include project and resource name: /
at org.eclipse.core.runtime.Assert.isLegal(Assert.java:62)
at org.eclipse.core.internal.resources.Workspace.newResource(Workspace.java:1631)
at org.eclipse.core.internal.resources.Container.getFile(Container.java:123)
at com.genuitec.eclipse.hibernate.util.HibernateUtils.getConfigFile(HibernateUtils.java:510)
at com.genuitec.eclipse.hibernate.util.HTUtils.getConsoleConfigurationPreferences(HTUtils.java:184)
at com.genuitec.eclipse.hibernate.util.HTUtils.getConsoleConfiguration(HTUtils.java:175)
at com.genuitec.eclipse.hibernate.util.HTUtils.getConsoleConfiguration(HTUtils.java:165)
at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob.run(GenerateArtifactsJob.java:361)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

 

解決方案:

修改.myhibernatedata(工程下)文件裡面的configFile屬性

指定applicationContext.xml路徑。格式是/項目名稱/路徑/applicationContext.xml

 

.myhibernatedata文件

#
#Sat Sep 19 15:30:33 CST 2009
genBasicCompId=true
sessionFactoryName=liss.samples.myssh2.domain.HibernateSessionFactory
profile=
daoSFId=
version=3.3
jndiPath=
springDaoFile=
useJavaTypes=true
keyGenerator=increment
libInstallFolder=
addLibs2Project=false
genVersionTag=true
sessionFactoryId=
basePersistenceClass=
reSettingsFile=/myssh2/hibernate.reveng.xml
configFile=/myssh2/conf/applicationContext.xml
createConfigFile=false
addLibs2Classpath=false
baseDaoClass=BaseHibernateDAO

 

 
  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved