在idea IDE里开发appfuse 2 project的一些问题

 

通过mvn生成的缺省的appfuse project,在idea里make project时(click工具栏中的“Make Project” ),会抛出下列错误:
src/main/resources/META-INF/persistence.xml
Cannot resolve class 'HibernatePersistence'.
 
原因是classpath里没有hibernate entity manager jar。解决方法是添加缺少的jars,具体步骤是:
1)选定你的project,然后click工具栏的“Settings”Button
2)选择“Project Settings” --> “Modules” --> “Dependencies” -->“Add” Button -->“Project Library…”
3)在弹出的窗口里,先创建一个class library:Click “Create Library…” button,input name “Hibernate Entity Manager”, and then click “Attach Jar Directories”,选定你的hibernate entity manager所在的目录即可
4)重新click “Make project” toolbar button,这时如果看到下列错误的话:
              src/main/webapp/WEB-INF/web.xml
              Cannot resolve sysbol /403.jsp
              Cannot resolve sysbol /error.jsp
              Cannot resolve sysbol /index.jsp
              Cannot resolve sysbol /404.jsp
       表示在web.xml有配置,但在webapp里找不到这几个文件,那你就要执行Step 5
5)通过命令 mvn war:inplace 来把dependent war的内容extract到你的project的src/main/webapp目录下,重新click “Make project” toolbar button,搞定!
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值