You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Craig R. McClanahan" <cr...@apache.org> on 2002/07/08 18:31:28 UTC

[jelly] Problems running unit tests?

I'm trying to build jelly using the default Ant target (JDK 1.4.0_01, Ant
1.4.1, Maven b4), but I get many cases of the following type of exception:

  Testcase: testExample1 took 0.16 sec
      Caused an ERROR
  loader constraints violated when linking org/xml/sax/ContentHandler class

coming from line 516 of XMLParser.java in the getXMLReader() method.  I
get similar failures when trying to use JDK 1.3.a or Ant 1.5b3 instead).
Any ideas what's going on?

(I thought using Maven was supposed to get rid of this kind of problem :-).

Craig



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [jelly] Problems running unit tests?

Posted by Jason van Zyl <ja...@zenplex.com>.
On Mon, 2002-07-08 at 12:31, Craig R. McClanahan wrote:
> I'm trying to build jelly using the default Ant target (JDK 1.4.0_01, Ant
> 1.4.1, Maven b4), but I get many cases of the following type of exception:
> 
>   Testcase: testExample1 took 0.16 sec
>       Caused an ERROR
>   loader constraints violated when linking org/xml/sax/ContentHandler class
> 
> coming from line 516 of XMLParser.java in the getXMLReader() method.  I
> get similar failures when trying to use JDK 1.3.a or Ant 1.5b3 instead).
> Any ideas what's going on?
> 
> (I thought using Maven was supposed to get rid of this kind of problem :-).

Give me a few minutes. I've made a generated ant build. You can try it
in a couple minutes.

 
> Craig
> 
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
-- 
jvz.

Jason van Zyl
jason@apache.org
http://tambora.zenplex.org

In short, man creates for himself a new religion of a rational
and technical order to justify his work and to be justified in it.
  
  -- Jacques Ellul, The Technological Society


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Maven Wish (was: Re: [jelly] Problems running unit tests?)

Posted by Jason van Zyl <ja...@zenplex.com>.
On Mon, 2002-07-08 at 14:04, Craig R. McClanahan wrote:
> 
> 
> On 8 Jul 2002, Jason van Zyl wrote:
> 
> > > While I've got your attention, can I add a wish list item for Maven?
> >
> > Sure!
> >
> > > I'd
> > > like to be able to override the declared dependency version in some
> > > circumstances -- for example, I'm going to create a webapp that combines
> > > lots of different JARs that all depend on (say) commons-beanutils.jar, and
> > > I want to make sure that I can compile and test all the components against
> > > a single named version of beanutils.
> >
> > So each of the individual projects that contribute a JAR to the WAR may
> > use different versions of beanutils but you want to override this value
> > where the onus is on you to make sure things work? Just making sure I
> > understand. I don't think this would be problem and would certainly make
> > sense for integrations like you're describing.
> >
> 
> You've got it.  Basically, I don't want to just depend on our promises of
> backwards compatibility -- I'd like to physically compile all of the
> things that will go into the ultimate app against the same version of the
> shared dependencies and let the compiler give me early warnings about some
> of the potential problems.
> 
> In non-Mavenized builds, I accomplish this goal very simply, by overriding
> the individual properties like "commons-beanutils.jar" in my
> ${user.home}/build.properties file.  It would be nice to have some similar
> global override mechanism.

This is something where the 'reactor' might come in handy. The reactor
is going to be a mechanism that operates on 1..n projects in an
arbitrary fashion. You'll be able to use Jelly script and a workflow
semantics (yet to be decided, but Bob McWhirter is currently working on
a Zenplex sponsored effort to create a RETE based workflow engine) so
that you'll pretty much be able to do anything with a set of projects
i.e.a gump type build or glob a bunch of projects together to make a
WAR.

So you would list a set of projects, you could build them, automate some
form of integration using Jelly script, run some tests, send some
reports, publish other reports, package things up on success, notify on
failure or start the process again. Whatever. I think CI is incredibly
important and it's lot easier doing integration work when projects are
unified. I'm hoping that Reactor will be key in prompting people to use
Maven.

A very simple form of the reactor now works, but not good enough for
general consumption yet.

> > > Since the webapp is all going to run
> > > out of a single WAR file (and therefore share a single copy of the
> > > beanutils JAR file), this is the only way I've got to ensure that I won't
> > > get method mismatches at runtime caused by compiling different packages
> > > against different versions of beanutils.
> >
> > Ok, that's a use case I'm sure many integrators will face. See what I
> > can pop in. Are you going to test it when I'm done ;-)
> >
> 
> Absolutely :-).
> 
> And, post-Struts-1.1-release, I'm going to evaluate switching Struts to
> use Maven as well.  Like Turbine et. al., Struts (and applications built
> on it) will run into this use case a lot, because Struts itself uses a
> pile of commons components.

Cool. I think the b5 release of Maven will be the place things start to
work for people. The generated build.xml files and gump descriptors
should work and we're trying to make it as easy to use as possible.
Jelly has made a world of difference and I believe b5 will kick some
serious ass.

> 
> Craig
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
-- 
jvz.

Jason van Zyl
jason@apache.org
http://tambora.zenplex.org

In short, man creates for himself a new religion of a rational
and technical order to justify his work and to be justified in it.
  
  -- Jacques Ellul, The Technological Society


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Maven Wish (was: Re: [jelly] Problems running unit tests?)

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On 8 Jul 2002, Jason van Zyl wrote:

> > While I've got your attention, can I add a wish list item for Maven?
>
> Sure!
>
> > I'd
> > like to be able to override the declared dependency version in some
> > circumstances -- for example, I'm going to create a webapp that combines
> > lots of different JARs that all depend on (say) commons-beanutils.jar, and
> > I want to make sure that I can compile and test all the components against
> > a single named version of beanutils.
>
> So each of the individual projects that contribute a JAR to the WAR may
> use different versions of beanutils but you want to override this value
> where the onus is on you to make sure things work? Just making sure I
> understand. I don't think this would be problem and would certainly make
> sense for integrations like you're describing.
>

You've got it.  Basically, I don't want to just depend on our promises of
backwards compatibility -- I'd like to physically compile all of the
things that will go into the ultimate app against the same version of the
shared dependencies and let the compiler give me early warnings about some
of the potential problems.

In non-Mavenized builds, I accomplish this goal very simply, by overriding
the individual properties like "commons-beanutils.jar" in my
${user.home}/build.properties file.  It would be nice to have some similar
global override mechanism.

> > Since the webapp is all going to run
> > out of a single WAR file (and therefore share a single copy of the
> > beanutils JAR file), this is the only way I've got to ensure that I won't
> > get method mismatches at runtime caused by compiling different packages
> > against different versions of beanutils.
>
> Ok, that's a use case I'm sure many integrators will face. See what I
> can pop in. Are you going to test it when I'm done ;-)
>

Absolutely :-).

And, post-Struts-1.1-release, I'm going to evaluate switching Struts to
use Maven as well.  Like Turbine et. al., Struts (and applications built
on it) will run into this use case a lot, because Struts itself uses a
pile of commons components.


Craig


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [jelly] Problems running unit tests?

Posted by Jason van Zyl <ja...@zenplex.com>.
On Mon, 2002-07-08 at 13:39, Craig R. McClanahan wrote:

> > I just did it for jelly now, I did it for betwixt first by mistake. Got
> > my betwixt betwixted :-)
> >
> 
> :-)
> 
> Hate to be a pest, but is there supposed to be a build.xml for jelly now?
> I only see build-legacy.xml (which of course still exhibits the problem
> for me, because it was just a copy).

Sorry, it's in there now. I removed/added to prevent the massive diff
and but forgot the add part :-)

> > > BTW, why does the generated build.xml for betwixt copy dependencies into a
> > > local lib directory instead of using the lib.repo repository?
> >
> > I am assuming that the user has no concept of lib.repo so that the build
> > will work out of the box. I can certainly add a warning if the property
> > and directory don't exist but I figured ease of use first. I would
> > certainly like to share resources and I like a central repository but we
> > haven't decided anything as a group and wasn't going to make any more
> > assumptions after the last round bickering.
> >
> 
> Makes sense.
> 
> While I've got your attention, can I add a wish list item for Maven?  

Sure!

> I'd
> like to be able to override the declared dependency version in some
> circumstances -- for example, I'm going to create a webapp that combines
> lots of different JARs that all depend on (say) commons-beanutils.jar, and
> I want to make sure that I can compile and test all the components against
> a single named version of beanutils. 

So each of the individual projects that contribute a JAR to the WAR may
use different versions of beanutils but you want to override this value
where the onus is on you to make sure things work? Just making sure I
understand. I don't think this would be problem and would certainly make
sense for integrations like you're describing.

> Since the webapp is all going to run
> out of a single WAR file (and therefore share a single copy of the
> beanutils JAR file), this is the only way I've got to ensure that I won't
> get method mismatches at runtime caused by compiling different packages
> against different versions of beanutils.

Ok, that's a use case I'm sure many integrators will face. See what I
can pop in. Are you going to test it when I'm done ;-)

> Craig
> 
> 
> > > Craig
> > >
> > >
> > > > > Craig
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> > > > > For additional commands, e-mail: <ma...@jakarta.apache.org>
> > > > --
> > > > jvz.
> > > >
> > > > Jason van Zyl
> > > > jason@apache.org
> > > > http://tambora.zenplex.org
> > > >
> > > > In short, man creates for himself a new religion of a rational
> > > > and technical order to justify his work and to be justified in it.
> > > >
> > > >   -- Jacques Ellul, The Technological Society
> > > >
> > > >
> > > > --
> > > > To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> > > > For additional commands, e-mail: <ma...@jakarta.apache.org>
> > > >
> > > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> > > For additional commands, e-mail: <ma...@jakarta.apache.org>
> > --
> > jvz.
> >
> > Jason van Zyl
> > jason@apache.org
> > http://tambora.zenplex.org
> >
> > In short, man creates for himself a new religion of a rational
> > and technical order to justify his work and to be justified in it.
> >
> >   -- Jacques Ellul, The Technological Society
> >
> >
> > --
> > To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> > For additional commands, e-mail: <ma...@jakarta.apache.org>
> >
> >
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
-- 
jvz.

Jason van Zyl
jason@apache.org
http://tambora.zenplex.org

In short, man creates for himself a new religion of a rational
and technical order to justify his work and to be justified in it.
  
  -- Jacques Ellul, The Technological Society


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [jelly] Problems running unit tests?

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On 8 Jul 2002, Jason van Zyl wrote:

> Date: 08 Jul 2002 13:24:22 -0400
> From: Jason van Zyl <ja...@zenplex.com>
> Reply-To: Jakarta Commons Developers List <co...@jakarta.apache.org>
> To: Jakarta Commons Developers List <co...@jakarta.apache.org>
> Subject: Re: [jelly] Problems running unit tests?
>
> On Mon, 2002-07-08 at 13:14, Craig R. McClanahan wrote:
> >
> >
> > On 8 Jul 2002, Jason van Zyl wrote:
> >
> > > Date: 08 Jul 2002 13:03:04 -0400
> > > From: Jason van Zyl <ja...@zenplex.com>
> > > Reply-To: Jakarta Commons Developers List <co...@jakarta.apache.org>
> > > To: Jakarta Commons Developers List <co...@jakarta.apache.org>
> > > Subject: Re: [jelly] Problems running unit tests?
> > >
> > > On Mon, 2002-07-08 at 12:31, Craig R. McClanahan wrote:
> > > > I'm trying to build jelly using the default Ant target (JDK 1.4.0_01, Ant
> > > > 1.4.1, Maven b4), but I get many cases of the following type of exception:
> > > >
> > > >   Testcase: testExample1 took 0.16 sec
> > > >       Caused an ERROR
> > > >   loader constraints violated when linking org/xml/sax/ContentHandler class
> > > >
> > > > coming from line 516 of XMLParser.java in the getXMLReader() method.  I
> > > > get similar failures when trying to use JDK 1.3.a or Ant 1.5b3 instead).
> > > > Any ideas what's going on?
> > > >
> > > > (I thought using Maven was supposed to get rid of this kind of problem :-).
> > >
> > > Try the ant build.xml file now. It should pull down whatever you need
> > > and just build the jar.
> > >
> >
> > Did you do this for jelly?  I only saw a checkin for betwixt.
>
> I just did it for jelly now, I did it for betwixt first by mistake. Got
> my betwixt betwixted :-)
>

:-)

Hate to be a pest, but is there supposed to be a build.xml for jelly now?
I only see build-legacy.xml (which of course still exhibits the problem
for me, because it was just a copy).

> > BTW, why does the generated build.xml for betwixt copy dependencies into a
> > local lib directory instead of using the lib.repo repository?
>
> I am assuming that the user has no concept of lib.repo so that the build
> will work out of the box. I can certainly add a warning if the property
> and directory don't exist but I figured ease of use first. I would
> certainly like to share resources and I like a central repository but we
> haven't decided anything as a group and wasn't going to make any more
> assumptions after the last round bickering.
>

Makes sense.

While I've got your attention, can I add a wish list item for Maven?  I'd
like to be able to override the declared dependency version in some
circumstances -- for example, I'm going to create a webapp that combines
lots of different JARs that all depend on (say) commons-beanutils.jar, and
I want to make sure that I can compile and test all the components against
a single named version of beanutils.  Since the webapp is all going to run
out of a single WAR file (and therefore share a single copy of the
beanutils JAR file), this is the only way I've got to ensure that I won't
get method mismatches at runtime caused by compiling different packages
against different versions of beanutils.

Craig


> > Craig
> >
> >
> > > > Craig
> > > >
> > > >
> > > >
> > > > --
> > > > To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> > > > For additional commands, e-mail: <ma...@jakarta.apache.org>
> > > --
> > > jvz.
> > >
> > > Jason van Zyl
> > > jason@apache.org
> > > http://tambora.zenplex.org
> > >
> > > In short, man creates for himself a new religion of a rational
> > > and technical order to justify his work and to be justified in it.
> > >
> > >   -- Jacques Ellul, The Technological Society
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> > > For additional commands, e-mail: <ma...@jakarta.apache.org>
> > >
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> > For additional commands, e-mail: <ma...@jakarta.apache.org>
> --
> jvz.
>
> Jason van Zyl
> jason@apache.org
> http://tambora.zenplex.org
>
> In short, man creates for himself a new religion of a rational
> and technical order to justify his work and to be justified in it.
>
>   -- Jacques Ellul, The Technological Society
>
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [jelly] Problems running unit tests?

Posted by Jason van Zyl <ja...@zenplex.com>.
On Mon, 2002-07-08 at 13:14, Craig R. McClanahan wrote:
> 
> 
> On 8 Jul 2002, Jason van Zyl wrote:
> 
> > Date: 08 Jul 2002 13:03:04 -0400
> > From: Jason van Zyl <ja...@zenplex.com>
> > Reply-To: Jakarta Commons Developers List <co...@jakarta.apache.org>
> > To: Jakarta Commons Developers List <co...@jakarta.apache.org>
> > Subject: Re: [jelly] Problems running unit tests?
> >
> > On Mon, 2002-07-08 at 12:31, Craig R. McClanahan wrote:
> > > I'm trying to build jelly using the default Ant target (JDK 1.4.0_01, Ant
> > > 1.4.1, Maven b4), but I get many cases of the following type of exception:
> > >
> > >   Testcase: testExample1 took 0.16 sec
> > >       Caused an ERROR
> > >   loader constraints violated when linking org/xml/sax/ContentHandler class
> > >
> > > coming from line 516 of XMLParser.java in the getXMLReader() method.  I
> > > get similar failures when trying to use JDK 1.3.a or Ant 1.5b3 instead).
> > > Any ideas what's going on?
> > >
> > > (I thought using Maven was supposed to get rid of this kind of problem :-).
> >
> > Try the ant build.xml file now. It should pull down whatever you need
> > and just build the jar.
> >
> 
> Did you do this for jelly?  I only saw a checkin for betwixt.

I just did it for jelly now, I did it for betwixt first by mistake. Got
my betwixt betwixted :-)
 
> BTW, why does the generated build.xml for betwixt copy dependencies into a
> local lib directory instead of using the lib.repo repository?

I am assuming that the user has no concept of lib.repo so that the build
will work out of the box. I can certainly add a warning if the property
and directory don't exist but I figured ease of use first. I would
certainly like to share resources and I like a central repository but we
haven't decided anything as a group and wasn't going to make any more
assumptions after the last round bickering.

> Craig
> 
> 
> > > Craig
> > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> > > For additional commands, e-mail: <ma...@jakarta.apache.org>
> > --
> > jvz.
> >
> > Jason van Zyl
> > jason@apache.org
> > http://tambora.zenplex.org
> >
> > In short, man creates for himself a new religion of a rational
> > and technical order to justify his work and to be justified in it.
> >
> >   -- Jacques Ellul, The Technological Society
> >
> >
> > --
> > To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> > For additional commands, e-mail: <ma...@jakarta.apache.org>
> >
> >
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
-- 
jvz.

Jason van Zyl
jason@apache.org
http://tambora.zenplex.org

In short, man creates for himself a new religion of a rational
and technical order to justify his work and to be justified in it.
  
  -- Jacques Ellul, The Technological Society


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [jelly] Problems running unit tests?

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On 8 Jul 2002, Jason van Zyl wrote:

> Date: 08 Jul 2002 13:03:04 -0400
> From: Jason van Zyl <ja...@zenplex.com>
> Reply-To: Jakarta Commons Developers List <co...@jakarta.apache.org>
> To: Jakarta Commons Developers List <co...@jakarta.apache.org>
> Subject: Re: [jelly] Problems running unit tests?
>
> On Mon, 2002-07-08 at 12:31, Craig R. McClanahan wrote:
> > I'm trying to build jelly using the default Ant target (JDK 1.4.0_01, Ant
> > 1.4.1, Maven b4), but I get many cases of the following type of exception:
> >
> >   Testcase: testExample1 took 0.16 sec
> >       Caused an ERROR
> >   loader constraints violated when linking org/xml/sax/ContentHandler class
> >
> > coming from line 516 of XMLParser.java in the getXMLReader() method.  I
> > get similar failures when trying to use JDK 1.3.a or Ant 1.5b3 instead).
> > Any ideas what's going on?
> >
> > (I thought using Maven was supposed to get rid of this kind of problem :-).
>
> Try the ant build.xml file now. It should pull down whatever you need
> and just build the jar.
>

Did you do this for jelly?  I only saw a checkin for betwixt.

BTW, why does the generated build.xml for betwixt copy dependencies into a
local lib directory instead of using the lib.repo repository?

Craig


> > Craig
> >
> >
> >
> > --
> > To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> > For additional commands, e-mail: <ma...@jakarta.apache.org>
> --
> jvz.
>
> Jason van Zyl
> jason@apache.org
> http://tambora.zenplex.org
>
> In short, man creates for himself a new religion of a rational
> and technical order to justify his work and to be justified in it.
>
>   -- Jacques Ellul, The Technological Society
>
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [jelly] Problems running unit tests?

Posted by Jason van Zyl <ja...@zenplex.com>.
On Mon, 2002-07-08 at 12:31, Craig R. McClanahan wrote:
> I'm trying to build jelly using the default Ant target (JDK 1.4.0_01, Ant
> 1.4.1, Maven b4), but I get many cases of the following type of exception:
> 
>   Testcase: testExample1 took 0.16 sec
>       Caused an ERROR
>   loader constraints violated when linking org/xml/sax/ContentHandler class
> 
> coming from line 516 of XMLParser.java in the getXMLReader() method.  I
> get similar failures when trying to use JDK 1.3.a or Ant 1.5b3 instead).
> Any ideas what's going on?
> 
> (I thought using Maven was supposed to get rid of this kind of problem :-).

Try the ant build.xml file now. It should pull down whatever you need
and just build the jar.
 
> Craig
> 
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
-- 
jvz.

Jason van Zyl
jason@apache.org
http://tambora.zenplex.org

In short, man creates for himself a new religion of a rational
and technical order to justify his work and to be justified in it.
  
  -- Jacques Ellul, The Technological Society


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>