On 1/20/07, jarmstrong <[EMAIL PROTECTED]> wrote:
Matt, Yes, I am using the modular archetype. I i did 'cd core' then 'mvn hibernate3:hbm2ddl' and it errored with the following: 'The dialect was not set. Set the property hibernate.dialect' In the /project/core/pom.xml there is not a hibernate.dialect but it is defined in /project/pom.xml file. Is it not inheriting this declaration/do I have to move it?
You may have to run "mvn install -N" from the top-level directory first? You should be able to 1) create the archetype and 2) run "mvn" from the top-level directory. It'll run all the unit tests (and integration tests in Tomcat). I just tried it with the following command from the QuickStart Guide and it seems to work. mvn archetype:create -DarchetypeGroupId=org.appfuse -DarchetypeArtifactId=appfuse-modular-struts -DremoteRepositories=http://static.appfuse.org/repository -DarchetypeVersion=1.0-m2 -DgroupId=com.mycompany -DartifactId=modular-struts [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] ------------------------------------------------------------------------ [INFO] AppFuse Modular Application ........................... SUCCESS [11.962s][INFO] AppFuse Modular Application - Core .................... SUCCESS [13.936s][INFO] AppFuse Modular Application - Web (Struts 2) .......... SUCCESS [1:21.857s] [INFO] ------------------------------------------------------------------------ [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1 minute 48 seconds [INFO] Finished at: Sat Jan 20 13:27:36 MST 2007 [INFO] Final Memory: 47M/508M [INFO] ------------------------------------------------------------------------ alotta:~/modular-struts mraible$ Matt
Yes I did generate this after you released 2.0-m2 the same weekend, ran into these issues, then re-generated it Thursday, still referencing m2. Thanks - Jared Matt Raible-3 wrote: > > If you used the basic-struts archetype to create your project, that's > quite strange. Did you do this after we released 2.0-m2? If you're > using the modular archetype, it should be in core/src/main/resources. > > You can also create the file manually - it's pretty simple: > > <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate > Configuration DTD 3.0//EN" > "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> > > <hibernate-configuration> > <session-factory> > <mapping class="org.appfuse.model.User"/> > <mapping class="org.appfuse.model.Role"/> > </session-factory> > </hibernate-configuration> > > Matt > > On 1/20/07, jarmstrong <[EMAIL PROTECTED]> wrote: >> >> The hibernate.cfg.xml in src/main/resources , is actually missing. Is >> there a >> way I can get mvn to generate this? >> >> >> >> Matt Raible-3 wrote: >> > >> > On 1/20/07, jarmstrong <[EMAIL PROTECTED]> wrote: >> >> >> >> Hrm... actually no, instead it errors saying "No hibernate.cfg.xml >> >> configuration provided. Annotated classes/packages is only >> configurable >> >> via >> >> hibernate.cfg.xml" >> > >> > There should be a hibernate.cfg.xml in src/main/resources. >> > >> >> >> >> FYI, i manually ran the SQL script to populate the tables, and ran >> "mvn >> >> jetty:run-war" then it started reporting that the jetty plugin was not >> >> available. Ok, so i went to /web/ and run the same command. Now it >> >> reports >> >> that the dependancy paths are not available 'xxxxxx-core' and mvn >> >> recommends >> >> that i manually specify them. >> > >> > For the modular archetype, you may need to run "mvn install -N" from >> > the top-level, then cd into core, run "mvn install" and then cd into >> > web and run "mvn jetty:run-war". We don't have to do these steps in >> > the AppFuse project, so there's probably some improvements we can make >> > in these archetypes. >> > >> >> >> >> I am getting the same errors when trying to build the AppFuse examples >> >> from >> >> SVN. >> > >> > Strange. Is it specifically the "create tables bug" you're talking >> > about. I still think this may be related to the hibernate3 plugin, >> > but it also might be something we're doing wrong. >> > >> > Matt >> > >> >> >> >> Is there some core step i am missing here, or is this a discrepancy >> with >> >> what MVN is finding? Perhaps I need to delete my entire MVN repo and >> >> start >> >> over? >> >> >> >> >> >> >> >> Matt Raible-3 wrote: >> >> > >> >> > If you run "mvn hibernate3:hbm2ddl", does it create the tables? >> >> > >> >> > Matt >> >> > >> >> > On 1/20/07, jarmstrong <[EMAIL PROTECTED]> wrote: >> >> >> >> >> >> Matt, >> >> >> >> >> >> It appears i am having a similiar issue and I think it has >> something >> >> to >> >> >> do >> >> >> with the version of MySQL I am running. (MySQL 5.0.21-community-nt) >> >> >> Apparently it is creating the database schema , but is failing when >> >> >> trying >> >> >> to add any tables. Now I also noticed that this mySQL install also >> >> does >> >> >> not >> >> >> allow me to create any tables with mixed case, however I dont have >> >> that >> >> >> issue with any of my other windows based mySQL installs. >> >> >> >> >> >> - Jared >> >> >> >> >> >> >> >> >> >> >> >> Matt Raible-3 wrote: >> >> >> > >> >> >> > There seems to be a bug in the hibernate3 plugin (or a >> >> >> > misconfiguration in AppFuse). If you run "mvn >> hibernate3:hbm2ddl", >> >> it >> >> >> > should fix your problem. For some reason, it doesn't run the >> first >> >> >> > time. >> >> >> > >> >> >> > Matt >> >> >> > >> >> >> > On 1/18/07, lanpham <[EMAIL PROTECTED]> wrote: >> >> >> >> >> >> >> >> Hi , >> >> >> >> >> >> >> >> I wasjust trying out appfuse2.0 and Maven to build a >> Basic-struts2 >> >> app >> >> >> >> but >> >> >> >> ran into some problems. >> >> >> >> >> >> >> >> I followed the tutorial and got an error when run "mvn >> >> >> integration-test" >> >> >> >> >> >> >> >> Here is logging : >> >> >> >> (It did create the appfuse database on mysql but it did not >> created >> >> >> any >> >> >> >> tables at all.) >> >> >> >> Anyone has any idea? >> >> >> >> >> >> >> >> [INFO] [compiler:compile] >> >> >> >> [INFO] Nothing to compile - all classes are up to date >> >> >> >> [INFO] [resources:testResources] >> >> >> >> [INFO] Using default encoding to copy filtered resources. >> >> >> >> [INFO] [compiler:testCompile] >> >> >> >> [INFO] Nothing to compile - all classes are up to date >> >> >> >> [INFO] [dbunit:operation {execution: default}] >> >> >> >> [INFO] >> >> >> >> >> >> >> >> >> >> ------------------------------------------------------------------------ >> >> >> >> [ERROR] BUILD ERROR >> >> >> >> [INFO] >> >> >> >> >> >> >> >> >> >> ------------------------------------------------------------------------ >> >> >> >> [INFO] Error executing database operation: CLEAN_INSERT >> >> >> >> >> >> >> >> Embedded error: user_role >> >> >> >> [INFO] >> >> >> >> >> >> >> >> >> >> ------------------------------------------------------------------------ >> >> >> >> [INFO] Trace >> >> >> >> org.apache.maven.lifecycle.LifecycleExecutionException: Error >> >> >> executing >> >> >> >> database >> >> >> >> operation: CLEAN_INSERT >> >> >> >> at >> >> >> >> >> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa >> >> >> >> ultLifecycleExecutor.java:559) >> >> >> >> at >> >> >> >> >> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi >> >> >> >> fecycle(DefaultLifecycleExecutor.java:475) >> >> >> >> at >> >> >> >> >> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau >> >> >> >> ltLifecycleExecutor.java:454) >> >> >> >> at >> >> >> >> >> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan >> >> >> >> dleFailures(DefaultLifecycleExecutor.java:306) >> >> >> >> at >> >> >> >> >> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen >> >> >> >> ts(DefaultLifecycleExecutor.java:273) >> >> >> >> at >> >> >> >> >> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi >> >> >> >> fecycleExecutor.java:140) >> >> >> >> at >> >> >> org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322) >> >> >> >> at >> >> >> org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115) >> >> >> >> at org.apache.maven.cli.MavenCli.main(MavenCli.java:256) >> >> >> >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native >> >> Method) >> >> >> >> at >> >> >> >> >> >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. >> >> >> >> java:39) >> >> >> >> at >> >> >> >> >> >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces >> >> >> >> sorImpl.java:25) >> >> >> >> at java.lang.reflect.Method.invoke(Method.java:585) >> >> >> >> at >> >> >> >> >> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) >> >> >> >> at >> >> org.codehaus.classworlds.Launcher.launch(Launcher.java:255) >> >> >> >> at >> >> >> >> >> >> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) >> >> >> >> >> >> >> >> at >> >> org.codehaus.classworlds.Launcher.main(Launcher.java:375) >> >> >> >> Caused by: org.apache.maven.plugin.MojoExecutionException: Error >> >> >> >> executing >> >> >> >> datab >> >> >> >> ase operation: CLEAN_INSERT >> >> >> >> at >> >> >> >> >> >> org.codehaus.mojo.dbunit.OperationMojo.execute(OperationMojo.java:110 >> >> >> >> ) >> >> >> >> at >> >> >> >> >> >> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi >> >> >> >> nManager.java:412) >> >> >> >> at >> >> >> >> >> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa >> >> >> >> ultLifecycleExecutor.java:534) >> >> >> >> ... 16 more >> >> >> >> Caused by: org.dbunit.dataset.NoSuchTableException: user_role >> >> >> >> at >> >> >> >> >> >> org.dbunit.database.DatabaseDataSet.getTableMetaData(DatabaseDataSet. >> >> >> >> java:192) >> >> >> >> at >> >> >> >> >> >> org.dbunit.operation.DeleteAllOperation.execute(DeleteAllOperation.ja >> >> >> >> va:98) >> >> >> >> at >> >> >> >> >> >> org.dbunit.operation.CompositeOperation.execute(CompositeOperation.ja >> >> >> >> va:67) >> >> >> >> at org.dbunit.ant.Operation.execute(Operation.java:183) >> >> >> >> at >> >> >> >> >> >> org.codehaus.mojo.dbunit.OperationMojo.execute(OperationMojo.java:101 >> >> >> >> ) >> >> >> >> ... 18 more >> >> >> >> [INFO] >> >> >> >> >> >> >> >> >> >> ------------------------------------------------------------------------ >> >> >> >> [INFO] Total time: 5 seconds >> >> >> >> [INFO] Finished at: Fri Jan 19 00:32:07 EST 2007 >> >> >> >> [INFO] Final Memory: 10M/19M >> >> >> >> [INFO] >> >> >> >> >> >> >> >> >> >> ------------------------------------------------------------------------ >> >> >> >> >> >> >> >> C:\Java\Proj\basic-struts2> >> >> >> >> >> >> >> >> >> >> >> >> -- >> >> >> >> View this message in context: >> >> >> >> >> >> >> >> >> >> http://www.nabble.com/Problem-creating-Basic-struts2-tf3038417s2369.html#a8444550 >> >> >> >> Sent from the AppFuse - User mailing list archive at Nabble.com. >> >> >> >> >> >> >> >> >> >> --------------------------------------------------------------------- >> >> >> >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> >> >> >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> >> >> >> >> >> >> >> >> > >> >> >> > >> >> >> > -- >> >> >> > http://raibledesigns.com >> >> >> > >> >> >> > >> >> --------------------------------------------------------------------- >> >> >> > To unsubscribe, e-mail: [EMAIL PROTECTED] >> >> >> > For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> > >> >> >> > >> >> >> > >> >> >> >> >> >> -- >> >> >> View this message in context: >> >> >> >> >> >> http://www.nabble.com/Problem-creating-Basic-struts2-tf3038417s2369.html#a8468109 >> >> >> Sent from the AppFuse - User mailing list archive at Nabble.com. >> >> >> >> >> >> >> --------------------------------------------------------------------- >> >> >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> >> >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> >> >> >> >> >> > >> >> > >> >> > -- >> >> > http://raibledesigns.com >> >> > >> >> > >> --------------------------------------------------------------------- >> >> > To unsubscribe, e-mail: [EMAIL PROTECTED] >> >> > For additional commands, e-mail: [EMAIL PROTECTED] >> >> > >> >> > >> >> > >> >> >> >> -- >> >> View this message in context: >> >> >> http://www.nabble.com/Problem-creating-Basic-struts2-tf3038417s2369.html#a8468522 >> >> Sent from the AppFuse - User mailing list archive at Nabble.com. >> >> >> >> --------------------------------------------------------------------- >> >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> >> >> > >> > >> > -- >> > http://raibledesigns.com >> > >> > --------------------------------------------------------------------- >> > To unsubscribe, e-mail: [EMAIL PROTECTED] >> > For additional commands, e-mail: [EMAIL PROTECTED] >> > >> > >> > >> >> -- >> View this message in context: >> http://www.nabble.com/Problem-creating-Basic-struts2-tf3038417s2369.html#a8468636 >> Sent from the AppFuse - User mailing list archive at Nabble.com. >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > -- > http://raibledesigns.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Problem-creating-Basic-struts2-tf3038417s2369.html#a8468812 Sent from the AppFuse - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- http://raibledesigns.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
