Appfuse中一个非常大的问题.org.dbunit.dataset.NoSuchTableException: user_role至今我还没看到一个非常明确的解决的方法.

wenjjing2lianee 2009-01-26 05:37:12
我的环境是:Appfuse-1.9.3,tomcat5.5,mysql5.0,jdk 1.5;
我这几天都在研究Appfuse,不过在配置Appfuse环境的时候还是没问题,那很多的博客上都有明确的说明.那都很顺利.
当我运行ant new时还是顺利的,工程都建好了,但是当我运行ant setup test-all时问题出来了.
org.dbunit.dataset.NoSuchTableException: user_role
at org.dbunit.database.DatabaseDataSet.getTableMetaData(DatabaseDataSet.java:192)
at org.dbunit.operation.DeleteAllOperation.execute(DeleteAllOperation.java:98)
at org.dbunit.operation.CompositeOperation.execute(CompositeOperation.java:67)
at org.dbunit.ant.Operation.execute(Operation.java:171)
at org.dbunit.ant.DbUnitTask.execute(DbUnitTask.java:272)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
at org.apache.tools.ant.Main.runBuild(Main.java:758)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)

Total time: 7 seconds
其实我有一两次运行ant setup test-all都成功的生成了脚本,但是后来我把这个工程删了,想重新再试一次,就总是出现上面同样一个问题.
也就再也无法解决, 网上也有好多人碰到这个问题(数不清),不过也有解决方案,但试了都没用.
比如:陈海青的Appfuse,Running On Oracle时出现NoSuchTableException错误的解决.
http://hhrz.3322.org/content/view/127_49.html
还有就是运行这个命令:
setup-tomcat deploy
ant setup -Ddatabase.username=foo -Ddatabase.password=bar
http://www.blogjava.net/tufanshu/archive/2006/04/07/39904.html
搞了我好久了,还是没得解决,都快被这个搞晕了,希望有用过Appfuse的高手能能够把这个问题解决.
真的感激不尽!
...全文
310 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
Knuuy 2012-03-05
  • 打赏
  • 举报
回复
我也想知道了
miaoliujun 2009-02-02
  • 打赏
  • 举报
回复
你在数据库中建个user_role这个表
goosman 2009-01-27
  • 打赏
  • 举报
回复
没有用过, 不过看异常是少个user_role表的样子.
碰到这种问题
1. 完全删除目前完成的部分, 重头再来一次, 因为可能是你的误删.
2. google, 异常信息+框架名
AppFuse - Providing integration and style to open source Java. ----------------------------------------------------------------------------- Developer notes on setting up your IDE to work with AppFuse are contained below. Instructions currently existing for Eclipse and IDEA. Netbeans is on the roadmap; you're more than welcome to create them in the meantime. To begin, download Maven 2.0.9, install it, and add $M2_HOME/bin to your $PATH. Create a MAVEN_OPTS environment variable and set its value to: -Xms512M -Xmx512M All issues should be logged in JIRA at http://issues.appfuse.org. Get your questions answered on the mailing list at http://appfuse.org/forums. Eclipse 3.2+: ---------- From the command line, cd into the appfuse directory and run: mvn eclipse:eclipse -DdownloadSources=true Get a cup of coffee or soda (or even better, a beer!) while you wait for Maven to download all the dependencies. Eclipse needs to know the path to the local maven repository. Therefore the classpath variable M2_REPO has to be set. Execute the following command: mvn -Declipse.workspace= eclipse:add-maven-repo You can also define the M2_REPO classpath variable inside Eclipse. From the menu bar, select Window > Preferences. Select the Java > Build Path > Classpath Variables page. Add a new one with a name of M2_REPO and Path of to your local Maven repository (/Users/${username}/.m2/repository on OS X and C:\Documents and Settings\${username}\.m2\repository on Windows). To setup hierarchical projects in Eclipse 3.2+, perform the following steps: 1. Rename appfuse/data/.project file to something else. 2. Go to File -> Import -> General -> Existing Projects and browse to your workspace and the appfuse/data root. Because there is no .project file, Eclipse will show all the subprojects as being available. Select them and click ok. 3. Rename the appfuse/data/.project back and refresh your left pane in Eclipse. 4. Repeat these steps for the "web" directory. IDEA 6.0+: ---------- From the command line, cd into the appfuse directory and type "mvn idea:idea". Get a cup of coffee or soda (or even better, a beer!) while you wait for Maven to download all the dependencies. After opening your project in IDEA, you may need to modify your Project JDK.
Appfuse是由Matt Raible开发的一个指导性的入门级J2EE框架,它对如何集成流行的Spring、Hibernate、iBatis、struts、Xdoclet、junit 等基础框架给出了示范。提供了对Taperstry和JSF的支持。   AppFuse一个集成了当前最流行的Web应用框架的一个更高层次的Web开发框架,也 可以说是一个Web开发基础平台,它与它所集成的各种框架相比,它提供了一部分所有Web系统开发过程都需要开发的一些功能,如登陆、用户密码加密,用 户管理、根据不同的用户可以展现不同的菜单,可以自动生成40%-60%左右的代码,自带了默认的一些在CSS设定的样式,使用这些样式能很快的改变整 个系统的外观,还有自动化测试的功能。   它最大的价值就是为我们提供了一个Web开发的新的方式和思路,尽管这些技术在国外都已进很流行了,但在国内能够将Hibernate、 Struts、Spring、DBUnit、Ant、Log4J、Struts Menu、Xdoclet、SiteMesh、Velocity、JUnit、JSTL、WebWork这些技术集成到一个框架的还不多见,所以即使不 使用它的全部功能,它也给我们提供了一个很好的借鉴、学习的机会。   通过关注AppFuse,我们可以看到目前国外的主流开发都使用了哪些技术,开发方式是什么样的,可能达到什么样的结果,而在以前,是很少能够看到这样完整的例子的。   AppFuse的另一个启示是:我们可以依靠开源软件的功能降低开发成本,而且可以阅读开源软件的代码提高所在团队的整体实力。

67,513

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧