Haeve you run a mvn install on you core component? It seems it can find the
class you generated in core.
Mike.
On 8/22/07, jaywalkable <[EMAIL PROTECTED]> wrote:
>
>
> Thanks Mike for your suggestion. I was able to run all the tests including
> the tutorial on the web successfully. Now I have started working with the
> appfuse plugin. I was able to run appfuse:gen in core module. But unable
> to
> run the same in web module. Please advise. The stack trace is given below.
>
> Thanks
> Rubel Ahammad
>
> The stack track
> ##################################################################
>
> Microsoft Windows XP [Version 5.1.2600]
> (C) Copyright 1985-2001 Microsoft Corp.
>
> C:\Documents and Settings\rubel>d:
>
> D:\>cd work
> The system cannot find the path specified.
>
> D:\>e:
>
> E:\>cd work
>
> E:\work>cd myproject
>
> E:\work\myproject>cd web
>
> E:\work\myproject\web>mvn appfuse:gen -Dentity=Department
> [INFO] Scanning for projects...
> [INFO] Searching repository for plugin with prefix: 'appfuse'.
> [INFO]
> -------------------------------------------------------------------------
> ---
> [INFO] Building AppFuse Modular Application - Web (Struts 2)
> [INFO] task-segment: [appfuse:gen]
> [INFO]
> -------------------------------------------------------------------------
> ---
> [INFO] Preparing appfuse:gen
> [INFO] [warpath:add-classes {execution: default}]
> [INFO] [native2ascii:native2ascii {execution: native2ascii-utf8}]
> [INFO] [native2ascii:native2ascii {execution: native2ascii-8859_1}]
> [INFO] [resources:resources]
> [INFO] Using default encoding to copy filtered resources.
> [INFO] [compiler:compile]
> [INFO] Compiling 1 source file to E:\work\myproject\web\target\classes
> [WARNING] POM for 'org.hibernate:jtidy:pom:r8-20060801:runtime' is
> invalid.
> It w
> ill be ignored for artifact resolution. Reason: Parse error reading POM.
> Reason:
> TEXT must be immediately followed by END_TAG and not START_TAG (position:
> START
> _TAG seen ...<licenses>\n\t\t\t<license>... @12:13) for project
> org.hibernate:j
> tidy at
> E:\maven2\repository\org\hibernate\jtidy\r8-20060801\jtidy-r8-20060801.p
> om
> [INFO] [appfuse:gen]
> [INFO] Assuming 'core' has hibernate.cfg.xml in its src/main/resources
> directory
>
> [INFO] E:\work\myproject\web/../core/src/main/resources/hibernate.cfg.xml
> not fo
> und within the project. Trying absolute path.
> [INFO] Configuration XML file loaded:
> E:\work\myproject\web\..\core\src\main\res
> ources\hibernate.cfg.xml
> [INFO] E:\work\myproject\web/../core/src/main/resources/hibernate.cfg.xml
> not fo
> und within the project. Trying absolute path.
> [INFO] Configuration XML file loaded:
> E:\work\myproject\web\..\core\src\main\res
> ources\hibernate.cfg.xml
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Unable to load class declared as <mapping
> class="org.appfuse.model.Depart
> ment"/> in the configuration:
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Trace
> org.hibernate.MappingException: Unable to load class declared as <mapping
> class=
> "org.appfuse.model.Department"/> in the configuration:
> at
> org.hibernate.cfg.AnnotationConfiguration.parseMappingElement(Annotat
> ionConfiguration.java:545)
> at
> org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.jav
> a:1479)
> at
> org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1458)
> at
> org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1432)
> at
> org.hibernate.cfg.Configuration.configure(Configuration.java:1386)
> at
> org.codehaus.mojo.hibernate3.configuration.AbstractComponentConfigura
> tion.doConfiguration(AbstractComponentConfiguration.java:74)
> at
> org.codehaus.mojo.hibernate3.configuration.AbstractComponentConfigura
> tion.getConfiguration(AbstractComponentConfiguration.java:37)
> at
> org.appfuse.mojo.HibernateExporterMojo.configureExporter(HibernateExp
> orterMojo.java:196)
> at
> org.appfuse.mojo.exporter.AppFuseGeneratorMojo.configureExporter(AppF
> useGeneratorMojo.java:109)
> at
> org.appfuse.mojo.HibernateExporterMojo.doExecute(HibernateExporterMoj
> o.java:244)
> at
> org.appfuse.mojo.HibernateExporterMojo.execute(HibernateExporterMojo.
> java:154)
> at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
> nManager.java:443)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
> ultLifecycleExecutor.java:539)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
> Goal(DefaultLifecycleExecutor.java:493)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
> ltLifecycleExecutor.java:463)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
> dleFailures(DefaultLifecycleExecutor.java:311)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
> ts(DefaultLifecycleExecutor.java:278)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
> fecycleExecutor.java:143)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
> 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: java.lang.ClassNotFoundException: org.appfuse.model.Department
> 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.RealmClassLoader.loadClass(RealmClassLoader.
> java:214)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:164)
> at
> org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:100)
>
> at
> org.hibernate.cfg.AnnotationConfiguration.parseMappingElement(Annotat
> ionConfiguration.java:542)
> ... 28 more
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 13 seconds
> [INFO] Finished at: Wed Aug 22 15:42:19 BDT 2007
> [INFO] Final Memory: 15M/27M
> [INFO]
> ------------------------------------------------------------------------
>
>
>
> Mike Horwitz wrote:
> >
> > It should not be necessary to create multiple modules - AppFuse does it
> to
> > allow users to select different persistence tiers. The data-common,
> > data-hibernate and service modules should all merge into your core
> module,
> > and the web-common + struts modules should merge into your web module.
> >
> > Mike.
> >
> > On 8/20/07, jaywalkable <[EMAIL PROTECTED]> wrote:
> >>
> >>
> >> Thanks Matt for your reply. When we create a modular project then we
> get
> >> two
> >> modules(core, web) which run with the help of appfuse's artifacts. On
> the
> >> tutorial part of appfuse website, we are instructed to write NEW POJO,
> >> DAo,
> >> Managers. In this case Pojo and DAO will be in the core module and
> >> managers
> >> will be in the web module. But appfuse source codes are separated in
> >> different module where core has two parts (data-common,
> data-hibernate),
> >> also there is a service module, and a web module(has more but we need
> to
> >> select common and any one from the remaining).
> >>
> >> Now my question is:
> >> Should we start a new project with appfuse's structure (with
> data-common,
> >> data-hibernate, service, web-common, web-struts modules)?
> >> OR
> >> Should we merge data-common, data-hibernate in core module, also merge
> >> web-common, web-struts with the web module?
> >>
> >>
> >> Thanks
> >> Rubel Ahammad
> >>
> >>
> >>
> >>
> >> mraible wrote:
> >> >
> >> > The alternative is to use "svn export" to get the sources into your
> >> > project, then look at AppFuse's dependencies and replace those in
> your
> >> > pom.xml with the ones from the dependency's pom.xml. Don't forget to
> >> > put the dependencies from AppFuse's root pom.xml into your root
> >> > pom.xml.
> >> >
> >> > Matt
> >> >
> >> > On 8/18/07, jaywalkable <[EMAIL PROTECTED]> wrote:
> >> >>
> >> >> Hi,
> >> >> I have created a struts 2 modular project using "mvn
> archetype:create"
> >> >> command. I was able to deploy and run the application. Now I would
> >> like
> >> >> to
> >> >> get full appfuse sources to customize them. I came to know that "mvn
> >> >> appfuse:full-source" command does will not work with modular
> project.
> >> >>
> >> >> What is the alternate way to get the sources so that I can work with
> >> this
> >> >> struts 2 modular project without any error.
> >> >>
> >> >> Thanks
> >> >> Rubel
> >> >> --
> >> >> View this message in context:
> >> >>
> >>
> http://www.nabble.com/what-is-the-alternate-to-%22mvn-appfuse%3Afull-source%22-for-struts-2-modular-project-tf4289928s2369.html#a12212482
> >> >> 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/what-is-the-alternate-to-%22mvn-appfuse%3Afull-source%22-for-struts-2-modular-project-tf4289928s2369.html#a12229919
> >> Sent from the AppFuse - User mailing list archive at Nabble.com.
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/what-is-the-alternate-to-%22mvn-appfuse%3Afull-source%22-for-struts-2-modular-project-tf4289928s2369.html#a12271862
> Sent from the AppFuse - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>