How taking off a bundle?

linux debian 10
apache 2.4
Lucee 5.3.7.47

Back to Lucee, I have abondonned it because of mix up in Bundles.
Then I come back, I want to succeed.
Question : how to take off a bundle ?

I have 2 bundles of ucanaccess mixing up
1 - /opt/lucee/tomcat/lucee-server/context/lib/jackcess-2.1.11.jar (active)
and
2 - /opt/lucee/tomcat/lucee-server/bundles/com.healthmarketscience.jackcess-3.0.1.jar (not loaded)

I want to take off the 1st one (active), then I hope the 2nd will be active ?

Thanks to all,
I had abandonned Lucee because of that.
Pierre.

you can load a specific OSGI bundle

Sorry, I do not understand : specific OSGI bundle
I want to take off : Jackcess (com.healthmarketscience.jackcess)
A pure Java library for reading from and writing to MS Access databases. 2.1.11
which is “active”
And keep
Jackcess (com.healthmarketscience.jackcess)
A pure Java library for reading from and writing to MS Access databases. 3.0.1
which is “not loaded”

Thanks for help

I honestly don’t know if you can unload a loaded bundle

but you are accessing that bundle via createObject, so you can load the specific version?

You can with this tool:

osgiLoader = New osgiLoader();
osgiLoader.uninstallBundle( bundleSymbolicName, bundleVersion );
2 Likes

I succeeded to make “not loaded” on the old version : 2.1.11 by renaming the directory
But version 3.0.1 still stay “not loaded”
How can I make the version 3.0.1 “active” ?
Thanks

oh cool, wanna add a link to that on the docs java category and osgi pages?

Now , I have uninstall Ucanaccess application , then version 3.0.1 have deappeared
(all files)
I have deleted all files of version 2.1.11.

I have reinstall Ucanaccess via the lucee-ucanaccess.lex manually
It did it, but the bundle stays "not loaded"

What does load or not a bundle ?
Also I do not know if I have to do this in the “web” or “server” environment (red or blue page)

Um OK… once I’ve figured out how to do that.

Calling it (so I guess making a database query?)

Sing out if you need any help

I will uninstall again
And install a new version of Ucanacess (v5)

There is no LEX file in version 5 of Ucanaccess,
then , I just copied the 4 files from the Ucanaccess library into the
lucee_server/bundles directory.
The ucanaccess is found in the bundles (but “not loaded”)
In Lucee admin , I have declared the datasource,
I tried my apllication, and it works !! It does access to the ACCESS (mdb file) database.
Unbelievable.

1 Like