Ok Matt. I'll check it out. Unfortunately ... actually, fortunately, I am off
on a week's vacation so I won't be able to check until I get back.

Cheers and thanks again,
Bob


mraible wrote:
> 
> You should make sure you don't have 2 hibernate.cfg.xml files in your
> classpath. The M5 version of full-source adds a file to your
> "src/test/resources" directory that shouldn't be there. This is fixed
> in RC1.
> 
> Matt
> 
> On 7/20/07, syg6 <[EMAIL PROTECTED]> wrote:
>>
>> After playing around with this problem a while longer I am starting to
>> suspect that 'exploding' Appfuse has caused my tests to stop working.
>>
>> In previous threads we talked about how Appfuse 'breaks' after running:
>>
>> 1. 'mvn war:inplace'
>> 2. 'mvn appfuse:full-source'
>> 3. 'mvn eclipse:eclipse'
>>
>> ... to get the Appfuse source and web files (jsp, css, etc.) in my
>> Eclipse
>> project. The problem was fixed by putting the following in my pom.xml:
>>
>> <dependency>
>>     <groupId>commons-lang</groupId>
>>     <artifactId>commons-lang</artifactId>
>>     <version>2.3</version>
>> </dependency>
>>
>> But my tests stopped working. I thought it was an error on my part (and
>> it
>> might well be of course ...) but after following these steps and changing
>> no
>> code at all my PersonControllerTest and PersonFormControllerTest have
>> stopped working.
>>
>> Mind you, if you already have a project started and have made changes,
>> these
>> changes are lost when you 'explode' Appfuse. (Which is why Matt
>> recommends
>> committing to CVS first). I found that the following files were
>> over-written:
>>
>> dispatcher-servlet.xml
>> sample-data.xml
>> ApplicationResources.properties
>> hibernate.cfg.xml
>>
>> But I re-entered my data in them and all should work. But it don't.
>>
>> PersonFormTest is saying ' Unknown entity: com.myco.myapp.model.Person'
>>
>> And PersonControllerTest's assertions fail.
>>
>> I've double and triple checked, the applicationContext.xml is correct,
>> there
>> is data in the database ... could there be another file that has been
>> over-written that I'm not aware of? I believe that the above list
>> contains
>> all of the config files that are over-written. Apart from them, my
>> Person,
>> PersonController and PersonControllerTest classes of course have to
>> exist,
>> which they do ...
>>
>> Anyone had this problem when 'exploding' Appfuse?
>>
>> Thanks!
>> Bob
>>
>>
>> syg6 wrote:
>> >
>> > Good to know that that web exists!
>> >
>> > Before receiving your email I took a shot at it and included the
>> following
>> > in my pom.xml:
>> >
>> > <dependency>
>> >   <groupId>org.apache.commons.lang</groupId>
>> >   <artifactId>commons-lang</artifactId>
>> >   <version>${commons.lang.version}</version>
>> > </dependency>
>> >
>> > But Maven complained saying that the artifact didn't exist, and to run:
>> >
>> > mvn install:install-file -DgroupId=org.apache.commons.lang
>> > -DartifactId=commons-lang -Dversion=2.3 -Dpackaging=jar
>>
>> > -Dfile=.../WEB-INF/lib/commons-lang-2.3.jar
>>
>> >
>> > Which I did and it now works! Unfortunately my test fails. :(
>> >
>> > But that's my problem, not yours!
>> >
>> > Cheers for all your help!
>> >
>> > Bob
>> >
>> >
>> > Michael Horwitz wrote:
>> >>
>> >> Help is at hand: http://mvnrepository.com/ . Search for the artifact
>> you
>> >> want and it helpfully gives you the snippet to include:
>> >>
>> >> <dependency>
>> >>     <groupId>commons-lang</groupId>
>> >>     <artifactId>commons-lang</artifactId>
>> >>     <version>2.3</version>
>> >> </dependency>
>> >>
>> >> The only thing you need to do is cut and paste, and then change the
>> >> version
>> >> to: <version>${commons.lang.version}</version>. And that is the
>> complete
>> >> cure to dizziness :-)
>> >>
>> >> Mike
>> >>
>> >> On 7/18/07, syg6 <[EMAIL PROTECTED]> wrote:
>> >>>
>> >>>
>> >>> That's what I originally was going to do but I am not sure how. First
>> >>> off,
>> >>> I
>> >>> am not sure why it's grabbing 2.1 when in the properties section of
>> >>> pom.xml
>> >>> we have:
>> >>>
>> >>> <commons.lang.version>2.3</commons.lang.version>
>> >>>
>> >>> Apparently Maven selects 2.1 because it's the 'shorter path' even
>> though
>> >>> we
>> >>> set this property. Oh well. convention over configuration!
>> >>>
>> >>> I see how to create a dependency for artifacts but how would I do it
>> for
>> >>> a
>> >>> jar? If I define a new dependency, where all the other dependencies
>> are,
>> >>> it
>> >>> would be like this:
>> >>>
>> >>> <dependencies>
>> >>> ...
>> >>>   <dependency>
>> >>>     <groupId>???</groupId>
>> >>>     <artifactId></artifactId>
>> >>>     <version>${commons.lang.version}</version>
>> >>>   </dependency>
>> >>> </dependencies>
>> >>>
>> >>> What do I put for groupId and artifactId?
>> >>>
>> >>> Maven makes me dizzy ...
>> >>>
>> >>> Bob
>> >>>
>> >>>
>> >>>
>> >>> Michael Horwitz wrote:
>> >>> >
>> >>> > Maven selects its dependencies not on highest version number, but
>> on
>> >>> > shortest path to dependency. i.e. if you have project dependencies
>> A
>> >>> > 1.0depends on B
>> >>> > 1.0 depends on C 1.2 and D 1.0 depends on C 1.1, then the
>> dependency
>> >>> in
>> >>> > your
>> >>> > classpath will be C 1.1 as it has the shortest path to your
>> project.
>> >>> >
>> >>> > The easiest way to sort this out without drowning in Maven
>> transitive
>> >>> > dependency nightmares is to include the dependency you want
>> directly
>> >>> in
>> >>> > your
>> >>> > project's pom.xml. It will override all other dependencies
>> inherited
>> >>> > transitively.
>> >>> >
>> >>> > Mike.
>> >>> >
>> >>> > On 7/18/07, syg6 <[EMAIL PROTECTED]> wrote:
>> >>> >>
>> >>> >>
>> >>> >> Well I can't get this thing to work.
>> >>> >>
>> >>> >> I ran a 'mvn -X' and 'commons-lang-2.1' comes up all over the
>> place.
>> >>> What
>> >>> >> I
>> >>> >> gather I need to do is find out which artifacts depend on '
>> >>> >> commons-lang-2.1'
>> >>> >> and exlcude them from the 'spring-modules-validation' artifact,
>> which
>> >>> >> depends on 'commons-lang-2.3' (or 2.2 minimum).
>> >>> >>
>> >>> >> The output for the 'mxn -X' command has a bunch of lines like
>> this:
>> >>> >>
>> >>> >> [DEBUG] Adding managed dependencies for unknown:xxxxxx
>> >>> >>
>> >>> >> ... followed by all the jars it needs. The following artifacts
>> list
>> >>> >> 'commons-lang:jar:2.1' :
>> >>> >>
>> >>> >> ehcache
>> >>> >> spring (which I understand as spring-aop, spring-dao, spring-jdbc,
>> >>> >> spring-remoting, spring-support)
>> >>> >> acegi-security-tiger
>> >>> >> displaytag
>> >>> >>
>> >>> >> So I tried exclusing them like this:
>> >>> >>
>> >>> >> <dependency>
>> >>> >>   <groupId>org.springmodules</groupId>
>> >>> >>   <artifactId>spring-modules-validation</artifactId>
>> >>> >>   <version>${springmodules.validation.version}</version>
>> >>> >>   <exclusions>
>> >>> >>     <exclusion>
>> >>> >>       <artifactId>ehcache</artifactId>
>> >>> >>       <groupId>net.sf.ehcache</groupId>
>> >>> >>     </exclusion>
>> >>> >>   </exclusions>
>> >>> >>
>> >>> >> And so on. But after doing this if I run 'mvn -X' again I still
>> see
>> >>> this:
>> >>> >>
>> >>> >> [DEBUG]  
>> org.springmodules:spring-modules-validation:jar:0.8:compile
>> >>> >> (selected for compile)
>> >>> >> [DEBUG]     commons-lang:commons-lang:jar:2.2:compile (removed -
>> >>> nearer
>> >>> >> found: 2.1)
>> >>> >>
>> >>> >> It's grabbing commons-lang-2.1 instead of 2.3.
>> >>> >>
>> >>> >> What gives? I've been puring over the Maven docs and I can't find
>> >>> >> anything
>> >>> >> like this ...
>> >>> >>
>> >>> >> Anyone?
>> >>> >>
>> >>> >> Cheers,
>> >>> >> Bob
>> >>> >>
>> >>> >>
>> >>> >>
>> >>> >> mraible wrote:
>> >>> >> >
>> >>> >> > On 7/17/07, syg6 <[EMAIL PROTECTED]> wrote:
>> >>> >> >>
>> >>> >> >> Hi Matt,
>> >>> >> >>
>> >>> >> >> I would have thought the opposite - it seems some library
>> (Spring
>> >>> >> >> validator)
>> >>> >> >> is somehow 'bundling' version 2.1 of commons-lang when in fact
>> it
>> >>> >> needs
>> >>> >> >> 2.3.
>> >>> >> >> It seems to me that I need to tell it to use 2.3, not 2.1.
>> >>> >> >
>> >>> >> > Sorry, I misunderstood. You sound like you know what you're
>> doing
>> >>> >> though.
>> >>> >> > ;-)
>> >>> >> >
>> >>> >> >>
>> >>> >> >> What I don't get is why this broke only after exploding
>> Appfuse,
>> >>> and
>> >>> >> who
>> >>> >> >> is
>> >>> >> >> 'including' version 2.1. I ran the 'mvn -X' command and
>> >>> >> >> 'commons-lang-2-1'
>> >>> >> >> is popping up all over the place. Is there any way to make
>> those
>> >>> apps
>> >>> >> >> that
>> >>> >> >> depend on 2.1 instead use 2.3? I am a Maven newb, as you can
>> >>> probably
>> >>> >> >> tell
>> >>> >> >
>> >>> >> > You can use <exclusions> to exclude commons-lang from those
>> >>> >> > dependencies. Is there a dependency that actually references 2.3
>> >>> and
>> >>> >> > it's just not getting picked up? If so, I've seen this happen
>> >>> before
>> >>> -
>> >>> >> > usually Maven picks the shortest path. That's the reason why
>> >>> putting
>> >>> >> > it in your pom.xml explicitly should fix the problem.
>> >>> >> >
>> >>> >> > Matt
>> >>> >> >
>> >>> >> >> ...
>> >>> >> >>
>> >>> >> >> Thanks!
>> >>> >> >> Bob
>> >>> >> >>
>> >>> >> >>
>> >>> >> >>
>> >>> >> >> mraible wrote:
>> >>> >> >> >
>> >>> >> >> > If you add an explicit dependency on commons-lang-2.1 to your
>> >>> >> pom.xml
>> >>> >> ,
>> >>> >> >> > it should fix any transitive dependency issues. The problem
>> is
>> >>> >> likely
>> >>> >> >> > because struts-menu (or another library) depends on a newer
>> >>> version
>> >>> >> of
>> >>> >> >> > commons-lang. You can run "mvn -X > mvn.log" to see the full
>> >>> >> >> > dependency list in mvn.log.
>> >>> >> >> >
>> >>> >> >> > Matt
>> >>> >> >> >
>> >>> >> >> > On 7/17/07, syg6 <[EMAIL PROTECTED]> wrote:
>> >>> >> >> >>
>> >>> >> >> >> I have been working with Appfuse M5 for a couple weeks now.
>> I
>> >>> had
>> >>> >> no
>> >>> >> >> >> problem
>> >>> >> >> >> with anything while working with the JAR-ed and WAR-ed
>> version.
>> >>> >> >> >>
>> >>> >> >> >> But then I have 'exploded' Appfuse into my Eclipse using
>> 'mvn
>> >>> >> >> >> appfuse:full-source' and 'mvn eclipse:eclipse'. And now when
>> I
>> >>> run
>> >>> >> >> 'mvn
>> >>> >> >> >> test
>> >>> >> >> >> -Dtest=PersonControllerTest' I get this error:
>> >>> >> >> >>
>> >>> >> >> >> java.lang.NoSuchFieldError: IS_JAVA_1_6
>> >>> >> >> >> at
>> >>> >> >> >>
>> >>> >> >> org.springmodules.validation.util.LibraryUtils.<clinit>(
>> >>> >> LibraryUtils.java:40)
>> >>> >> >> >>
>> >>> >> >> >>
>> http://forum.springframework.org/archive/index.php/t-35083.html
>> >>> >> This
>> >>> >> >> >> post
>> >>> >> >> >> seems to say that the Spring Validation framework has a
>> >>> dependency
>> >>> >> on
>> >>> >> >> >> commons-lang-2.1, whereas Appfuse uses commons-lang-2.3.
>> >>> >> >> >>
>> >>> >> >> >> But I can't find commons-lang-2.1 anywhere in Appfuse and
>> this
>> >>> >> wasn't
>> >>> >> >> >> happening before using the exploded verison of Appfuse.
>> >>> >> >> >>
>> >>> >> >> >> Btw, I am using Spring MVC Basic.
>> >>> >> >> >>
>> >>> >> >> >> Many thanks!
>> >>> >> >> >> Bob
>> >>> >> >> >> --
>> >>> >> >> >> View this message in context:
>> >>> >> >> >>
>> >>> >> >>
>> >>> >>
>> >>>
>> http://www.nabble.com/Problems-executing-controller-test-after-running-mvn-appfuse%3Afull-source-tf4097676s2369.html#a11652009
>> >>> >> >> >> 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/Problems-executing-controller-test-after-running-mvn-appfuse%3Afull-source-tf4097676s2369.html#a11652420
>> >>> >> >> 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/Problems-executing-controller-test-after-running-mvn-appfuse%3Afull-source-tf4097676s2369.html#a11666344
>> >>> >> 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/Problems-executing-controller-test-after-running-mvn-appfuse%3Afull-source-tf4097676s2369.html#a11666741
>> >>> 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/Problems-executing-controller-test-after-running-mvn-appfuse%3Afull-source-tf4097676s2369.html#a11711017
>>
>> 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/Problems-executing-controller-test-after-running-mvn-appfuse%3Afull-source-tf4097676s2369.html#a11714061
Sent from the AppFuse - User mailing list archive at Nabble.com.

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

Reply via email to