geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.com>
Subject Re: Dependency conflict of commons-lang (Geronimo 2.0.1)
Date Fri, 24 Aug 2007 07:25:11 GMT
I can think of 3 things to try:

1. If you are really daring download and build geronimo trunk.  In  
var/config/arttifact_aliases.properties add a line mapping commons- 
lang 2.0 to commons lang 2.3 (or whatever you want to use).  It would  
look like:

commons-lang/commons-lang/2.0/jar=commons-lang/commons-lang/2.3/jar

You'll have to install the correct commons-lang jar in the geronimo  
repository at the correct location.  This will make openjpa use  
commons-lang 2.3 which I assume won't break anything.  Unfortunately  
I added this capability a couple days after 2.0.1 was tagged.

2. in your geronimo plan, in the environment section, add a <hidden- 
classes> element to hide  the commons-lang classes from openjpa.  If  
you have an ear you may have to do this for both the ear level and  
war level plans.  IIRC ( I don't have the schema in front of me) the  
element would look something like
<hidden-classes>
      <filter>org.apache.commons.lang.</filter>
</hidden-classes>

This will prevent your app from seeing the commons-lang classes  
loaded by openjpa so it can see the ones in your app instead.

3. abandon all attempts to properly version your jars and simply copy  
the commons-lang 2.3 jar over the commons-lang 2.0 jar in the  
geronimo repository.  I really don't recommend this.

At one time the configurations were generally not version-dependent  
so if you included commons-lang 2.3 in the repo openjpa would use it  
as it would be the latest version, but that doesn't appear to be  
happening right now.

hope this helps
david jencks

On Aug 23, 2007, at 5:38 PM, songsp wrote:

>
> Hi,
>
> I downloaded 2.0.1 and deployed our application successfully.  
> However I
> noticed a dependency conflict between Geronimo and our application:  
> Geronimo
> uses openjpa, which depends on commons-lang 2.0; our application uses
> displaytag (http://displaytag.sourceforge.net/), which requires  
> commons-lang
> 2.1 or newer (latest version is 2.3). Now in our application, as  
> soon as I
> go to a page utilizing displaytag, I get an exception from displaytag:
>
> javax.servlet.jsp.JspTagException:
> You appear to have an INCOMPATIBLE VERSION of the commons-lang  
> library.
> Displaytag requires version 2.1 of this library, and you appear to  
> have a
> prior version in
> your classpath.  You must remove this prior version and ensure that  
> only
> version 2.1 is in
> your classpath.
> If commons-lang-x.jar is in your classpath, be sure to remove it.
>
> But I can't remove commons-lang 2.0 from the repository because  
> openjpa
> needs it. I can't disable openjpa either: it's a system module and  
> if I stop
> it from the console, the console itself becomes unusable (see
> https://issues.apache.org/jira/browse/GERONIMO-3401)
>
> Can anybody provide any suggestion in resolving this dependency  
> conflict?
>
> Thanks a lot!
> -- 
> View this message in context: http://www.nabble.com/Dependency- 
> conflict-of-commons-lang-%28Geronimo-2.0.1%29- 
> tf4320880s134.html#a12304601
> Sent from the Apache Geronimo - Users mailing list archive at  
> Nabble.com.
>


Mime
View raw message