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.

Attachments

1

Activity

Pothys - MitrahSoft 30 April 2021 at 11:17

Pothys - MitrahSoft 6 November 2020 at 13:33

I hope this issue was fixed in lucee version 5.3.4.73 onwards. Could you please check with 5.3.4.73 version and report here back.

Zac Spitzer 1 November 2019 at 13:38

done

Michael Offner 1 November 2019 at 13:29

we should do that in general, can you raise a ticket for it?

Zac Spitzer 1 November 2019 at 11:20

is there a way to include the loader version in the exception?

Unresolved

Details

Assignee

Reporter

Priority

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Affects versions

Created 20 September 2019 at 21:36
Updated 30 April 2021 at 11:18