On 2/7/07, Matt Raible <[EMAIL PROTECTED]> wrote:
On 2/2/07, Fan <[EMAIL PROTECTED]> wrote:
>
> 1) I think I should change the CLEAN_INSET to REFRESH, should it be alright ?

I don't know - there's only one way to find out!

>
> 2) Does Appfuse come with the EXPORT operation ? I searched through the
> pom.xml, it seems like does not have EXPORT operation being specified

mvn dbunit:export will export the database to
target/dbunit/export.xml.  You can override the destination by using a
-Ddest parameter:

mvn dbunit:export -Ddest=sample-data.xml


FWIW - I've added this to the FAQ:

http://appfuse.org/display/APF/FAQ#FAQ-dbunitexporting

Matt

>
> 3) When I run the "mvn jetty:run-war" from the web module, I have the
> following error when I run the "mvn test -Dtest=PersonManagerTest'
> successfully.

It looks like you need to run "mvn install" on your core module first.

Matt

>
>
> et/erpfuse-webapp-1.0-SNAPSHOT.war!/ to
> D:\source\erp\erpfuse\web\target\work\we
> bapp
> 2007-02-02 23:16:51.484:/:INFO:  Loading Spring root WebApplicationContext
> [erpfuse] ERROR [main] ContextLoader.initWebApplicationContext(205) |
> Context in
> itialization failed
> org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find
> clas
> s [org.appfuse.service.impl.PersonManagerImpl] for bean with name
> 'personManager
> ' defined in ServletContext resource [/WEB-INF/applicationContext.xml];
> nested e
> xception is java.lang.ClassNotFoundException:
> org.appfuse.service.impl.PersonMan
> agerImpl
> Caused by:
> java.lang.ClassNotFoundException: org.appfuse.service.impl.PersonManagerImpl
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>         at
> org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassL
> oader.java:195)
>         at
> org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassReal
> m.java:255)
>         at
> org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassReal
> m.java:274)
>         at
> org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassReal
> m.java:274)
>         at
> org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader.
> java:214)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>         at
> org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoade
> r.java:358)
>         at
> org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoade
> r.java:320)
>         at org.springframework.util.ClassUtils.forName(ClassUtils.java:177)
>         at
> org.springframework.beans.factory.support.AbstractBeanDefinition.reso
> lveBeanClass(AbstractBeanDefinition.java:317)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.resolve
> BeanClass(AbstractBeanFactory.java:1008)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.isBeanC
> lassMatch(AbstractBeanFactory.java:1036)
>         at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.
> getBeanNamesForType(DefaultListableBeanFactory.java:165)
>         at
> org.springframework.context.support.AbstractApplicationContext.getBea
> nNamesForType(AbstractApplicationContext.java:689)
>         at
> org.springframework.context.support.AbstractApplicationContext.invoke
> BeanFactoryPostProcessors(AbstractApplicationContext.java:395)
>         at
> org.springframework.context.support.AbstractApplicationContext.refres
> h(AbstractApplicationContext.java:328)
>         at
> org.springframework.web.context.support.AbstractRefreshableWebApplica
> tionContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
>         at
> org.springframework.web.context.ContextLoader.createWebApplicationCon
> text(ContextLoader.java:246)
>         at
> org.springframework.web.context.ContextLoader.initWebApplicationConte
> xt(ContextLoader.java:184)
>         at
> org.springframework.web.context.ContextLoaderListener.contextInitiali
> zed(ContextLoaderListener.java:49)
>         at
> org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.
> java:447)
>         at
> org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.jav
> a:1133)
>         at
> org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:
> 420)
>         at
> org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:461
> )
>         at
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
> 38)
>         at
> org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection
> .java:156)
>         at
> org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHan
> dlerCollection.java:120)
>         at
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
> 38)
>         at
> org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection
> .java:156)
>         at
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
> 38)
>         at
> org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:
> 119)
>         at org.mortbay.jetty.Server.doStart(Server.java:210)
>         at
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
> 38)
>         at
> org.mortbay.jetty.plugin.Jetty6PluginServer.start(Jetty6PluginServer.
> java:134)
>         at
> org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMo
> jo.java:327)
>         at
> org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.
> java:272)
>         at
> org.mortbay.jetty.plugin.Jetty6RunWar.execute(Jetty6RunWar.java:67)
>         at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
> nManager.java:412)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
> ultLifecycleExecutor.java:534)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
> Goal(DefaultLifecycleExecutor.java:488)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
> ltLifecycleExecutor.java:458)
>         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)
> 2007-02-02 23:16:52.265::WARN:  failed
> [EMAIL PROTECTED]/,file:/D:/source/
> erp/erpfuse/web/target/work/webapp/}
> 2007-02-02 23:16:52.265::WARN:  failed [EMAIL PROTECTED]
> 2007-02-02 23:16:52.265::WARN:  failed [EMAIL PROTECTED]
> 2007-02-02 23:16:52.359::INFO:  Started SelectChannelConnector @
> 0.0.0.0:8080
> 2007-02-02 23:16:52.359::WARN:  failed [EMAIL PROTECTED]
> [INFO] Jetty server exiting.
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Failure
>
> Embedded error: Cannot find class
> [org.appfuse.service.impl.PersonManagerImpl] f
> or bean with name 'personManager' defined in ServletContext resource
> [/WEB-INF/a
> pplicationContext.xml]; nested exception is
> java.lang.ClassNotFoundException: or
> g.appfuse.service.impl.PersonManagerImpl
> [INFO]
> ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 19 seconds
> [INFO] Finished at: Fri Feb 02 23:16:52 SGT 2007
> [INFO] Final Memory: 12M/25M
> [INFO]
> ------------------------------------------------------------------------
> 2007-02-02 23:16:52.546::INFO:  Shutdown hook executing
> 2007-02-02 23:16:52.546::INFO:  Shutdown hook complete
>
>
>
>
>
> Matt Raible-3 wrote:
> >
> > You could modify the hibernate3 plugin so it doesn't run anymore.  Just
> > comment out its <execution> configuration in your pom.xml. If you don't
> > want
> > to clear the database before inserting data with DbUnit, you'll change
> > change from using CLEAN_INSERT to one of DbUnit's other operations:
> >
> > http://dbunit.sourceforge.net/components.html#databaseoperation
> >
> > The recommended approach is to simply add your sample data to
> > src/main/resources/sample-data.xml.  It should be possible to export from
> > your database with dbunit and copy the file over sample-data.xml if you
> > want
> > to do things that way.  If you can't figure out how to do this with Maven
> > and the DbUnit Plugin[1], please enter an issue in JIRA and we'll try to
> > add
> > instructions.
> >
> > Thanks,
> >
> > Matt
> >
> > [1] http://mojo.codehaus.org/dbunit-maven-plugin/
> >
> > On 2/1/07, Fan <[EMAIL PROTECTED]> wrote:
> >>
> >>
> >> Everytime I run this command, the new users added by me will be deleted.
> >>
> >> 1) Does this command always re-create the database tables ?
> >>
> >> 2)Any other option to start the application without re-creating the
> >> tables
> >> or deleting the data ?
> >>
> >>
> >>
> >> Matt Raible-3 wrote:
> >> >
> >> > If you have all the artifacts downloaded, no - you shouldn't need to
> >> > connect. Use -o to work offline with Maven.  For example:
> >> >
> >> > mvn jetty:run-war -o
> >> >
> >> > Matt
> >> >
> >> > On 1/30/07, Fan <[EMAIL PROTECTED]> wrote:
> >> >>
> >> >> Do I need to get connected with the internet in order to run "mvn
> >> >> jetty:run-war" ?
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> Matt Raible-3 wrote:
> >> >> >
> >> >> > You need to run "mvn jetty:run-war" from the directory that has the
> >> >> > Jetty Plugin defined in its pom.xml.  Running it from the web module
> >> >> > should fix the problem.
> >> >> >
> >> >> > Matt
> >> >> >
> >> >> > On 1/28/07, Fan <[EMAIL PROTECTED]> wrote:
> >> >> >>
> >> >> >> I had successfully run "mvn integration-test" with the following
> >> info:
> >> >> >>
> >> >> >> run-all-tests:
> >> >> >> [INFO] Executed tasks
> >> >> >> [INFO]
> >> >> >> [INFO]
> >> >> >> [INFO]
> >> >> >>
> >> >>
> >> ------------------------------------------------------------------------
> >> >> >> [INFO] Reactor Summary:
> >> >> >> [INFO]
> >> >> >>
> >> >>
> >> ------------------------------------------------------------------------
> >> >> >> [INFO] AppFuse Modular Application ...........................
> >> SUCCESS
> >> >> >> [1.610s]
> >> >> >> [INFO] AppFuse Modular Application - Core ....................
> >> SUCCESS
> >> >> >> [6.000s]
> >> >> >> [INFO] AppFuse Modular Application - Web (Struts 2) ..........
> >> SUCCESS
> >> >> >> [1:19.344
> >> >> >> s]
> >> >> >> [INFO]
> >> >> >>
> >> >>
> >> ------------------------------------------------------------------------
> >> >> >> [INFO]
> >> >> >>
> >> >>
> >> ------------------------------------------------------------------------
> >> >> >> [INFO] BUILD SUCCESSFUL
> >> >> >> [INFO]
> >> >> >>
> >> >>
> >> ------------------------------------------------------------------------
> >> >> >> [INFO] Total time: 1 minute 27 seconds
> >> >> >> [INFO] Finished at: Sun Jan 28 23:42:26 SGT 2007
> >> >> >> [INFO] Final Memory: 37M/63M
> >> >> >> [INFO]
> >> >> >>
> >> >>
> >> ------------------------------------------------------------------------
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >> But when I ran "mvn jetty:run-war", it hit the following error:
> >> >> >>
> >> >> >> [INFO] Scanning for projects...
> >> >> >> [INFO] Reactor build order:
> >> >> >> [INFO]   AppFuse Modular Application
> >> >> >> [INFO]   AppFuse Modular Application - Core
> >> >> >> [INFO]   AppFuse Modular Application - Web (Struts 2)
> >> >> >> [INFO] Searching repository for plugin with prefix: 'jetty'.
> >> >> >> [INFO]
> >> >> >>
> >> >>
> >> ------------------------------------------------------------------------
> >> >> >> [ERROR] BUILD ERROR
> >> >> >> [INFO]
> >> >> >>
> >> >>
> >> ------------------------------------------------------------------------
> >> >> >> [INFO] The plugin 'org.apache.maven.plugins:maven-jetty-plugin'
> >> does
> >> >> not
> >> >> >> exist o
> >> >> >> r no valid version could be found
> >> >> >> [INFO]
> >> >> >>
> >> >>
> >> ------------------------------------------------------------------------
> >> >> >> [INFO] For more information, run Maven with the -e switch
> >> >> >> [INFO]
> >> >> >>
> >> >>
> >> ------------------------------------------------------------------------
> >> >> >> [INFO] Total time: < 1 second
> >> >> >> [INFO] Finished at: Sun Jan 28 23:43:35 SGT 2007
> >> >> >> [INFO] Final Memory: 1M/3M
> >> >> >> [INFO]
> >> >> >>
> >> >>
> >> ------------------------------------------------------------------------
> >> >> >> --
> >> >> >> View this message in context:
> >> >> >>
> >> http://www.nabble.com/mvn-jetty%3Arun-war-tf3131555s2369.html#a8676744
> >> >> >> 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/mvn-jetty%3Arun-war-tf3131555s2369.html#a8709199
> >> >> 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/mvn-jetty%3Arun-war-tf3131555s2369.html#a8744876
> >> 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
> >
> >
>
> --
> View this message in context: 
http://www.nabble.com/mvn-jetty%3Arun-war-tf3131555s2369.html#a8769281
> 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



--
http://raibledesigns.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to