Nested applications loading JARs throws "org.osgi.framework.BundleException:Bundle symbolic name and version are not unique:"

Description

The attached repro contains code to run two applications, one nested inside the other.

Load the parent (http://localhost:1026/), and you should see "I am the parent application" and then a dump of a jedis pool config instance.

Then load the child (http://localhost:1026/child/) and you should see an error:

org.osgi.framework.BundleException:Bundle symbolic name and version are not unique: redis.clients.jedis:2.7.3

It might be tempting to say that this is working as designed, but I would tend to disagree. Why not swallow this error silently and ignore it? If the class is already loaded and available to apps in the same context, what difference does it make?

It seems to me that having the javaSettings configured to load the JARs in the way that I've done is necessary in both Application.cfc's, if both applications will make use of the classes. I tried commenting out the entire this.javasettings block in the child application and got a different error, indicating that the javasettings are necessary:

cannot load class through its string name, because no definition for the class with the specified name [redis.clients.jedis.JedisPoolConfig] could be found caused by (java.lang.ClassNotFoundException:redis.clients.jedis.JedisPoolConfig;java.lang.ClassNotFoundException:redis.clients.jedis.JedisPoolConfig not found by lucee.core [46];java.lang.ClassNotFoundException:redis.clients.jedis.JedisPoolConfig; )

 

Environment

OSX, starting Lucee via Commandbox. In the root of the repro case I'll attach, run "box server start" to start the server. App will run on port 1026.

Status

Assignee

Michael Offner

Reporter

Adam Tuttle

Labels

None

Affects versions

5.3.3.62

Priority

New
Configure