Thanks for the explanation on OSGi.
I figured out why opennms-webapp-jetty was including older versions of
some dependencies in
/opt/opennms/jetty-webapps/opennms-remoting/webstart/. It starts with
features/remote-poller having a dependency on dependencies/spring-web.
spring-web depends on hibernate (commons-collections) and other apache
commons libraries (digester, logging), and its these dependencies that
don't get overridden when the jnlp assembly is built, so the versions
defined in their poms are included.
I used "../../compile.pl -X -v" in features/remote-poller-jnlp/ to see
that it was included the old versions when building the jnlp assembly.
Then I used "compile.pl dependency:tree -Dverbose=true" inside
features/remote-poller/ to see where the old versions were getting
pulled in from. Not sure whether the dependency should be added in
dependencies/spring-web/pom.xml or in features/remote-poller/pom.xml.
diff --git a/dependencies/spring-web/pom.xml
b/dependencies/spring-web/pom.xml
index 6dcf832..31b8ad9 100644
--- a/dependencies/spring-web/pom.xml
+++ b/dependencies/spring-web/pom.xml
@@ -171,6 +171,18 @@
<artifactId>commons-beanutils</artifactId>
</dependency>
<dependency>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-digester</groupId>
+ <artifactId>commons-digester</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-pool</groupId>
+ <artifactId>commons-pool</artifactId>
+ </dependency>
+ <dependency>
<groupId>commons-validator</groupId>
<artifactId>commons-validator</artifactId>
</dependency>
On 5/21/2013 10:03 AM, Seth Leger wrote:
> Hi Ron,
>
> OK, what you are seeing here is the set of JARs that comes bundled with
> a vanilla Karaf install (jetty, spring 3.0 and 3.1, joda-time, etc). We
> don't really control this set of JARs... the Karaf guys do. Karaf is
> basically a large set of OSGi bundles (JARs with metadata) that are
> integration-tested together to provide the basic OSGi sqervices
> (container, osgi-http, custom karaf ssh shell commands). It's entirely
> possible going forward that we'll have "conflicting" JARs in this sense
> because our OSGi "features" (Karaf's name for collections of OSGi
> bundles that perform a particular task) will specify the specific
> version of their dependencies while the "features" included with Karaf
> will have their own particular versions of libraries that they depend on.
>
> As an example, if Karaf's SSH shell uses the maven artifact
> mvn:org.apache.sshd/sshd-core/0.8.0 and we write some sort of SSH shell
> into OpenNMS that uses mvn:org.apache.sshd/sshd-core/0.9.0, then both
> versions of the JAR will be in /opt/opennms/system and will happily run
> alongside each other in the OSGi container, each as part of a separate
> "feature".
>
> I know this email seems pedantic and you're probably personally already
> aware of how OSGi works but I tried to explain things so that developers
> who are less familiar can see what is happening here.
>
> It is a bit messy-looking to have multiple versions of these JARs laying
> around but the logging inside the Karaf OSGi container appends the
> bundle name to the end of any stack traces so it's easy to see which
> JARs are running code when an exception occurs. It's usually easy to
> track down issues, maybe even easier than a regular JVM where you're not
> exactly sure which JAR is running which code (unless you are inside a
> debugger like Eclipse that can understand all of the maven dependencies).
>
> Seth Leger
> The OpenNMS Group
>
>
> On 5/21/13 12:38 AM, Ron Roskens wrote:
>> Here is what I see for master:
>>
>> commons-collections 3.1
>> opennms-webapp-jetty-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/jetty-webapps/opennms-remoting/webstart/
>> commons-collections 3.2.1
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/lib/
>> commons-collections 3.2.1
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/system/commons-collections/commons-collections/3.2.1/
>> commons-digester 1.6
>> opennms-webapp-jetty-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/jetty-webapps/opennms-remoting/webstart/
>> commons-digester 2.1
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/lib/
>> commons-io 1.3.2
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/system/commons-io/commons-io/1.3.2/
>> commons-io 2.0.1
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/lib/
>> commons-io 2.0.1
>> opennms-webapp-jetty-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/jetty-webapps/opennms-remoting/webstart/
>> commons-pool 1.5.4
>> opennms-webapp-jetty-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/jetty-webapps/opennms-remoting/webstart/
>> commons-pool 1.5.6
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/system/commons-pool/commons-pool/1.5.6/
>> commons-pool 1.6
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/lib/
>> jetty-continuation 7.6.10.v20130312
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/lib/
>> jetty-continuation 7.6.8.v20121106
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/system/org/eclipse/jetty/jetty-continuation/7.6.8.v20121106/
>> jetty-http 7.6.10.v20130312
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/lib/
>> jetty-http 7.6.8.v20121106
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/system/org/eclipse/jetty/jetty-http/7.6.8.v20121106/
>> jetty-io 7.6.10.v20130312
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/lib/
>> jetty-io 7.6.8.v20121106
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/system/org/eclipse/jetty/jetty-io/7.6.8.v20121106/
>> jetty-security 7.6.10.v20130312
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/lib/
>> jetty-security 7.6.8.v20121106
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/system/org/eclipse/jetty/jetty-security/7.6.8.v20121106/
>> jetty-server 7.6.10.v20130312
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/lib/
>> jetty-server 7.6.8.v20121106
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/system/org/eclipse/jetty/jetty-server/7.6.8.v20121106/
>> jetty-servlet 7.6.10.v20130312
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/lib/
>> jetty-servlet 7.6.8.v20121106
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/system/org/eclipse/jetty/jetty-servlet/7.6.8.v20121106/
>> jetty-util 7.6.10.v20130312
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/lib/
>> jetty-util 7.6.8.v20121106
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/system/org/eclipse/jetty/jetty-util/7.6.8.v20121106/
>> jetty-webapp 7.6.10.v20130312
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/lib/
>> jetty-webapp 7.6.8.v20121106
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/system/org/eclipse/jetty/jetty-webapp/7.6.8.v20121106/
>> jetty-xml 7.6.10.v20130312
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/lib/
>> jetty-xml 7.6.8.v20121106
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/system/org/eclipse/jetty/jetty-xml/7.6.8.v20121106/
>> joda-time 1.6.2
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/system/joda-time/joda-time/1.6.2/
>> joda-time 2.1
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/lib/
>> quartz 1.6.5
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/lib/
>> quartz 1.6.5
>> opennms-webapp-jetty-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/jetty-webapps/opennms-remoting/webstart/
>> quartz 2.1.5
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/system/org/quartz-scheduler/quartz/2.1.5/
>> slf4j-api 1.6.6
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/system/org/slf4j/slf4j-api/1.6.6/
>> slf4j-api 1.7.2
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/lib/
>> slf4j-api 1.7.2
>> opennms-webapp-jetty-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/jetty-webapps/opennms-remoting/webstart/
>> spring-aop 3.0.7.RELEASE
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/lib/
>> spring-aop 3.0.7.RELEASE
>> opennms-webapp-jetty-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/jetty-webapps/opennms-remoting/webstart/
>> spring-aop 3.1.4.RELEASE
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/system/org/springframework/spring-aop/3.1.4.RELEASE/
>> spring-asm 3.0.7.RELEASE
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/lib/
>> spring-asm 3.0.7.RELEASE
>> opennms-webapp-jetty-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/jetty-webapps/opennms-remoting/webstart/
>> spring-asm 3.1.4.RELEASE
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/system/org/springframework/spring-asm/3.1.4.RELEASE/
>> spring-beans 3.0.7.RELEASE
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/lib/
>> spring-beans 3.0.7.RELEASE
>> opennms-webapp-jetty-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/jetty-webapps/opennms-remoting/webstart/
>> spring-beans 3.1.4.RELEASE
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/system/org/springframework/spring-beans/3.1.4.RELEASE/
>> spring-context 3.0.7.RELEASE
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/lib/
>> spring-context 3.0.7.RELEASE
>> opennms-webapp-jetty-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/jetty-webapps/opennms-remoting/webstart/
>> spring-context 3.1.4.RELEASE
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/system/org/springframework/spring-context/3.1.4.RELEASE/
>> spring-context-support 3.0.7.RELEASE
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/lib/
>> spring-context-support 3.0.7.RELEASE
>> opennms-webapp-jetty-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/jetty-webapps/opennms-remoting/webstart/
>> spring-context-support 3.1.4.RELEASE
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/system/org/springframework/spring-context-support/3.1.4.RELEASE/
>> spring-core 3.0.7.RELEASE
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/lib/
>> spring-core 3.0.7.RELEASE
>> opennms-webapp-jetty-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/jetty-webapps/opennms-remoting/webstart/
>> spring-core 3.1.4.RELEASE
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/system/org/springframework/spring-core/3.1.4.RELEASE/
>> spring-expression 3.0.7.RELEASE
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/lib/
>> spring-expression 3.0.7.RELEASE
>> opennms-webapp-jetty-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/jetty-webapps/opennms-remoting/webstart/
>> spring-expression 3.1.4.RELEASE
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/system/org/springframework/spring-expression/3.1.4.RELEASE/
>> spring-jms 3.0.7.RELEASE
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/lib/
>> spring-jms 3.0.7.RELEASE
>> opennms-webapp-jetty-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/jetty-webapps/opennms-remoting/webstart/
>> spring-jms 3.1.4.RELEASE
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/system/org/springframework/spring-jms/3.1.4.RELEASE/
>> spring-tx 3.0.7.RELEASE
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/lib/
>> spring-tx 3.0.7.RELEASE
>> opennms-webapp-jetty-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/jetty-webapps/opennms-remoting/webstart/
>> spring-tx 3.1.4.RELEASE
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/system/org/springframework/spring-tx/3.1.4.RELEASE/
>> spring-web 3.0.7.RELEASE
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/lib/
>> spring-web 3.0.7.RELEASE
>> opennms-webapp-jetty-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/jetty-webapps/opennms-remoting/webstart/
>> spring-web 3.1.4.RELEASE
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/system/org/springframework/spring-web/3.1.4.RELEASE/
>> spring-webmvc 3.0.7.RELEASE
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/lib/
>> spring-webmvc 3.0.7.RELEASE
>> opennms-webapp-jetty-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/jetty-webapps/opennms-remoting/webstart/
>> spring-webmvc 3.1.4.RELEASE
>> opennms-core-1.13.0-0.20130520.3.noarch.rpm:/opt/opennms/system/org/springframework/spring-webmvc/3.1.4.RELEASE/
>>
>> For my custom branch with updates, they were pretty much the same as
>> above. At compile time, everything seems to be using the same
>> versions, then at assembly time, newer versions get pulled in. I don't
>> quite get how come something like commons-pool goes from 1.6 in
>> /opt/opennms/lib/, to 1.5.6 under system/..., and then its 1.5.4 under
>> jetty-webapps/opennms-remoting/... Its defined as 1.6 in
>> $OPENNMS_SRC/pom.xml.
>>
>> For the jetty ones, I find the two release version strings in pom.xml
>> and container/karaf/src/main/filtered-resources/features/features.xml.
>> But on my custom branch, when I was tried having both use
>> 8.1.10.v20130312, it still pulled in the 7.6.8.v20121106 version, and
>> a "git grep 7.6.8.v20121106" doesn't reveal it listed in any file.
>>
>> On 5/20/2013 8:38 AM, Seth Leger wrote:
>>> Hi Ron,
>>>
>>> The differences between the lib and system directories isn't necessarily
>>> a problem. The new system directory is a maven repository that is used
>>> to provide OSGi JARs to our new Apache Karaf container. Basically, Karaf
>>> can load OSGi modules from a mvn:groupId/artifactId/version URL and we
>>> point it at this directory to load all of the new OpenNMS code that has
>>> been OSGi-fied (which is basically the new topology maps, node maps, MIB
>>> compiler admin UI, and NRTG graphing). The contents of the system
>>> directory are populated by using Maven dependencies.
>>>
>>> Since different versions of the same JAR can run side-by-side in OSGi,
>>> it's not necessarily a problem to have multiple versions of the same JAR
>>> in there. However, we may run into class loading or OSGi service
>>> registry problems if two JARs try to register the same service and are
>>> in some way incompatible with the service consumer.
>>>
>>> What libraries are you seeing conflicts with in the system directory?
>>>
>>> Seth Leger
>>> The OpenNMS Group
>>>
>>>
>>> On 5/20/13 12:56 AM, Ron Roskens wrote:
>>>> 1. There are different versions of the same library in
>>>> /opt/opennms/lib/ and /opt/opennms/system/...
>>>>
>
>
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ
opennms-devel mailing list
To *unsubscribe* or change your subscription options, see the bottom of this
page:
https://lists.sourceforge.net/lists/listinfo/opennms-devel