It's good to know this option. Thank you.
I checked the output file and find a lot of debug lines saying (removed -
nearer found: 2.0.5) regarding springframework. In the end, springframework
core is 2.0.5 is added into classpath.
Yongping
Mike Horwitz wrote:
>
> On Nov 27, 2007 6:23 PM, Yongping <[EMAIL PROTECTED]> wrote:
>
>>
>> It's a build error. So there is no chance to get a built war. Thanks
>> Yongping
>
>
> In that case run mvn with the -X option turned on and pipe the output to a
> file, e.g. mvn -X -Dmaven.test.skip=true jetty:run-war > mvn.log. Maven
> will
> log the classpath it uses when compiling - it should be easy to check
> which
> version of Spring is in the classpath.
>
> Mike
>
>>
>>
>>
>> Mike Horwitz wrote:
>> >
>> > Can you confirm that in the war built in the target directory the
>> Spring
>> > version is 2.5 for all spring jar files in WEB-INF/lib?
>> >
>> > Mike
>> >
>> > On 11/27/07, Yongping <[EMAIL PROTECTED]> wrote:
>> >>
>> >>
>> >> Actually I modified POM file in a couple places for using JPA. But
>> just
>> >> in
>> >> case, I checked my POM file and find:
>> >> <appfuse.version>2.0.1</appfuse.version>
>> >> <spring.version>2.5</spring.version>
>> >> Looks like the short-cut (maven.test.skip=true) caused problems on
>> >> dependencies (lib) but I just couldn't figure it out.
>> >> Please help.
>> >> Yongping
>> >>
>> >> mraible wrote:
>> >> >
>> >> > If you look in your pom.xml, does it have <spring.version>2.5</
>> >> > spring.version>. It looks like an older version of Spring may be in
>> >> > your classpath.
>> >> >
>> >> > Matt
>> >> >
>> >> > On Nov 26, 2007, at 9:01 PM, Yongping wrote:
>> >> >
>> >> >>
>> >> >> Thanks for your instructions. .war file is generated and loaded
>> >> >> into jetty
>> >> >> when running mvn jetty:run-war.
>> >> >> However if I run mvn jetty:run-war -Dmaven.test.skip=true I got the
>> >> >> following error:
>> >> >> [INFO] Preparing jetty:run-war
>> >> >> [INFO] [aspectj:compile {execution: default}]
>> >> >> [ERROR] The import
>> >> >> org.springframework.beans.factory.annotation.Autowired
>> >> >> cannot be resolved
>> >> >> [ERROR] The method findAnnotation(Method, Class ) in the type
>> >> >> AnnotationUtils is not applicable for the argu
>> >> >> ments (Class<User>, Class<Table>)
>> >> >> [INFO]
>> >> >>
>> ----------------------------------------------------------------------
>> >> >> --
>> >> >> [ERROR] BUILD ERROR
>> >> >> [INFO]
>> >> >>
>> ----------------------------------------------------------------------
>> >> >> --
>> >> >> [INFO] Compiler errors :
>> >> >> error at import
>> >> >> org.springframework.beans.factory.annotation.Autowired;
>> >> >> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> >> >> G:\source\koolist\src\main\java\com\koolist\app\dao\jpa
>> >> >> \UserDaoJpa.java:8:0::0
>> >> >> The import org.springframework.
>> >> >> beans.factory.annotation.Autowired cannot be resolved
>> >> >> error at Table table = AnnotationUtils.findAnnotation(User.class,
>> >> >> Table.class);
>> >> >> ^^^^^
>> >> >> G:\source\koolist\src\main\java\com\koolist\app\dao\jpa
>> >> >> \UserDaoJpa.java:81:0::0
>> >> >> The method findAnnotation(Meth
>> >> >> od, Class ) in the type AnnotationUtils is not applicable for the
>> >> >> arguments
>> >> >> (Class<User>, Class<Table>)
>> >> >> Any comments (I use Struts Basic)? Thanks a lot
>> >> >> Yongping
>> >> >>
>> >> >>
>> >> >> mraible wrote:
>> >> >>>
>> >> >>> Check for duplicate persistence.xml files in your source tree
>> (i.e.
>> >> >>> src/main/resource and src/test/resources). Also, make sure you run
>> >> >>> clean after running full-source.
>> >> >>>
>> >> >>> Matt
>> >> >>>
>> >> >>> On Nov 26, 2007, at 3:43 PM, Yongping wrote:
>> >> >>>
>> >> >>>>
>> >> >>>> It runs fine when I run mvn jetty:run-war in remote mode (using
>> >> >>>> embedded
>> >> >>>> war?).
>> >> >>>> However I run into a problem when running mvn clean first then
>> mvn
>> >> >>>> jetty:run-war after I downloaded full source code. Source code is
>> >> >>>> completely
>> >> >>>> downloaded with JPA implementation.
>> >> >>>> The error message looks like:
>> >> >>>> [ERROR] FATAL ERROR
>> >> >>>> [INFO]
>> >> >>>>
>> --------------------------------------------------------------------
>> >> >>>> --
>> >> >>>> --
>> >> >>>> [INFO] No name provided and several persistence units found
>> >> >>>> [INFO]
>> >> >>>>
>> --------------------------------------------------------------------
>> >> >>>> --
>> >> >>>> --
>> >> >>>> [INFO] Trace
>> >> >>>> javax.persistence.PersistenceException: No name provided and
>> several
>> >> >>>> persistence units found
>> >> >>>> at
>> >> >>>> org.hibernate.ejb.Ejb3Configuration.configure
>> >> >>>> (Ejb3Configuration.java:226)
>> >> >>>> at
>> >> >>>>
>> org.codehaus.mojo.hibernate3.configuration.JPAComponentConfiguration
>> >> >>>> .c
>> >> >>>> reateConfiguration(JPACompone
>> >> >>>> ntConfiguration.java:26)
>> >> >>>> at
>> >> >>>>
>> org.codehaus.mojo.hibernate3.configuration.AbstractComponentConfigur
>> >> >>>> at
>> >> >>>> ion.getConfiguration(Abstract
>> >> >>>> ComponentConfiguration.java:32)
>> >> >>>> at
>> >> >>>>
>> org.codehaus.mojo.hibernate3.exporter.Hbm2DDLExporterMojo.doExecute
>> >> >>>> (Hbm2DDLExporterMojo.java:87)
>> >> >>>> at
>> >> >>>> org.codehaus.mojo.hibernate3.HibernateExporterMojo.execute
>> >> >>>> (HibernateExporterMojo.java:140)
>> >> >>>> at
>> >> >>>> org.apache.maven.plugin.DefaultPluginManager.executeMojo
>> >> >>>> (DefaultPluginManager.java:443)
>> >> >>>> at
>> >> >>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals
>> >> >>>> (DefaultLifecycleExecutor.java:539)
>> >> >>>>
>> >> >>>> at
>> >> >>>>
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithL
>> >> >>>> if
>> >> >>>> ecycle(DefaultLifecycleExecut
>> >> >>>> or.java:480)
>> >> >>>> at
>> >> >>>>
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifec
>> >> >>>> yc
>> >> >>>> le(DefaultLifecycleExecutor.j
>> >> >>>> ava:896)
>> >> >>>> at
>> >> >>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle
>> >> >>>> (DefaultLifecycleExecutor.java:739
>> >> >>>> )
>> >> >>>> at
>> >> >>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals
>> >> >>>> (DefaultLifecycleExecutor.java:510)
>> >> >>>>
>> >> >>>> at
>> >> >>>>
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalon
>> >> >>>> eG
>> >> >>>> oal(DefaultLifecycleExecutor.
>> >> >>>> java:493)
>> >> >>>> at
>> >> >>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal
>> >> >>>> (DefaultLifecycleExecutor.java:463)
>> >> >>>> at
>> >> >>>>
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHa
>> >> >>>> nd
>> >> >>>> leFailures(DefaultLifecycleEx
>> >> >>>> ecutor.java:311)
>> >> >>>> at
>> >> >>>>
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegme
>> >> >>>> nt
>> >> >>>> s(DefaultLifecycleExecutor.ja
>> >> >>>> va:278)
>> >> >>>> at
>> >> >>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute
>> >> >>>> (DefaultLifecycleExecutor.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
>> >> >>>> (DelegatingMethodAccessorImpl.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)
>> >> >>>>
>> >> >>>> I am not quite familiar with Maven. Not sure if something wrong
>> with
>> >> >>>> configuration in POM file.
>> >> >>>> Thanks a lot for help.
>> >> >>>> Yongping
>> >> >>>> --
>> >> >>>> View this message in context:
>> http://www.nabble.com/-2.01-problem-
>> >> >>>> occurred-when-running-mvn-jetty%3Arun-war-against-local-source-
>> >> >>>> resource-tf4878473s2369.html#a13960717
>> >> >>>> Sent from the AppFuse - User mailing list archive at Nabble.com.
>> >> >>>>
>> >> >>>>
>> --------------------------------------------------------------------
>> >> >>>> -
>> >> >>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> >>>> For additional commands, e-mail: [EMAIL PROTECTED]
>> >> >>>>
>> >> >>>
>> >> >>>
>> ---------------------------------------------------------------------
>> >> >>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> >>> For additional commands, e-mail: [EMAIL PROTECTED]
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>
>> >> >> --
>> >> >> View this message in context: http://www.nabble.com/-2.01-problem-
>> >> >> occurred-when-running-mvn-jetty%3Arun-war-against-local-source-
>> >> >> resource-tf4878473s2369.html#a13964356
>> >> >> Sent from the AppFuse - User mailing list archive at Nabble.com.
>> >> >>
>> >> >>
>> ---------------------------------------------------------------------
>> >> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> >> For additional commands, e-mail: [EMAIL PROTECTED]
>> >> >>
>> >> >
>> >> >
>> ---------------------------------------------------------------------
>> >> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >> >
>> >> >
>> >> >
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/-2.01-problem-occurred-when-running-mvn-jetty%3Arun-war-against-local-source-resource-tf4878473s2369.html#a13973338
>> >> 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/-2.01-problem-occurred-when-running-mvn-jetty%3Arun-war-against-local-source-resource-tf4878473s2369.html#a13976692
>> 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/-2.01-problem-occurred-when-running-mvn-jetty%3Arun-war-against-local-source-resource-tf4878473s2369.html#a13979877
Sent from the AppFuse - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]