Lucee 5 - first impression and problem with custom Java libraries

Thanks for the first version of Lucee 5, good job!

I played a little bit with Lucee 5 and CONTENS seems to run fine.
Some small issues I found:
The update documentation could be improved, I will try to find some time in the evening and add some missing steps
Most important things I missed:
Clarification about the new Lucee Servlet. Web.xml sample code
I could not use existing lucee directories (load errors) – and had to add lucee-server/bundles
Lucee shouldn’t throw an error if no searchengine is installed – e.g. this error should be catched
I am missing the Infinispan Cache Extension

Could you please help me with one problem, before I add a new Jenkins job for Lucee 5:

How can I add custom JARs to Lucee 5?
I tried these ways:
Extended catalina.properties and added a custom folder – jars were not found
Copied the jars to lib/ext - jars were not found
Copied the jars to luceee-server/bundles - jars were not found

P.S. I would suggest to change one line in startup.bat (comment with rem)

rem if not “%CATALINA_HOME%” == “” goto gotHome

Otherwise the express version could use another Tomcat version in the users system–
Harry Klein | Konzeption und Entwicklung
CONTENS Software GmbH
Neumarkter Str. 41 | 81673 München
Fon: +49 (0)89 5199 69-0 | Fax: +49 (0)89 5199 69-78
mailto:@Harry_Klein | http://www.contens.dehttp://www.contens.de/


Machen Sie CONTENS zu Ihrer Plattform
für effizientes digitales Marketing

www.contens.de/dmhttp://www.contens.de/dm


Sitz der Gesellschaft: München
Geschäftsführer: Jörg Wilcke
Amtsgericht München, HRB 128 273

Hi Harry

Please See my comments between the lines

Thanks for the feedback
Micha

Thanks for the first version of Lucee 5, good job!

I played a little bit with Lucee 5 and CONTENS seems to run fine.

Some small issues I found:

            The update documentation could be improved, I will try to

find some time in the evening and add some missing steps

                           Most important things I missed:

Clarification about the new Lucee Servlet. Web.xml sample code

The LuceeServlet is not carved in stone yet, we had some troubles with
tomcat and the welcome file list splitted between 2 servlets, so maybe this
will be merged with the cfmlServlet in the next release.

                                           I could not use existing

lucee directories (load errors)

What do you mean with “Lucee directories”? What error exactly?

– and had to add lucee-server/bundles

            Lucee shouldn’t throw an error if no searchengine is

installed – e.g. this error should be catched

I assume you mean in the admin frontend, this will be the case for the
next release. But of course not if you use the tags “collection,
index,search” in your code.

            I am missing the Infinispan Cache Extension

Will come asap

Could you please help me with one problem, before I add a new Jenkins job
for Lucee 5:

How can I add custom JARs to Lucee 5?

I tried these ways:

            Extended catalina.properties and added a custom folder –

jars were not found

That should work, I will check. How you call them?

            Copied the jars to lib/ext - jars were not found

See above

Copied the jars to luceee-server/bundles - jars were not found

Please have in mind that Lucee only looks for bundles in that directory.
Every bundle is a jar, but not every jar is a bundle.

What jars we talking about? we can make them available as bundles on the
update provider, then a manual installation is not necessary.Am Mittwoch, 8. April 2015 schrieb Harry Klein :

P.S. I would suggest to change one line in startup.bat (comment with rem)

*rem *if not “%CATALINA_HOME%” == “” goto gotHome

Otherwise the express version could use another Tomcat version in the
users system

Harry Klein | Konzeption und Entwicklung

CONTENS Software GmbH

Neumarkter Str. 41 | 81673 München

Fon: +49 (0)89 5199 69-0 | Fax: +49 (0)89 5199 69-78

mailto:@Harry_Klein <javascript:_e(%7B%7D,‘cvml’,’@Harry_Klein’);>
| http://www.contens.de


Machen Sie CONTENS zu Ihrer Plattform

für effizientes digitales Marketing

www.contens.de/dm


Sitz der Gesellschaft: München

Geschäftsführer: Jörg Wilcke

Amtsgericht München, HRB 128 273


You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+unsubscribe@googlegroups.com
<javascript:_e(%7B%7D,‘cvml’,‘lucee%2Bunsubscribe@googlegroups.com’);>.
To post to this group, send email to lucee@googlegroups.com
<javascript:_e(%7B%7D,‘cvml’,‘lucee@googlegroups.com’);>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/F5A941E045A6FE4288ABB2E3D797146FA7394AEC%40SRV-DC1.contens.local
https://groups.google.com/d/msgid/lucee/F5A941E045A6FE4288ABB2E3D797146FA7394AEC%40SRV-DC1.contens.local?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

Hi Micha,

What do you mean with “Lucee directories”? What error exactly?

I meant that this part of the upgrade documentation didn’t work for me:
“… If you have defined a “railo-server-directory”/“lucee-server-directory” with your servlet specification copy the jars to “{lucee-server-directory-path}/bundles” …”
https://bitbucket.org/lucee/lucee/wiki/Lucee_5_Upgrading_Railo
Sorry, I should have saved the stacktrace … I guess the bundles were not found.

I assume you mean in the admin frontend, this will be the case for the next release. But of course not if you use the tags “collection, index,search” in your code.

Yes, this is a minor issue – and not important for us because we don’t use the search features in Lucee but custom Lucene and Elasticsearch code.

Extended catalina.properties and added a custom folder – jars were not found
That should work, I will check. How you call them?
What jars we talking about? we can make them available as bundles on the update provider, then a manual installation is not necessary.

Well, we are using some libraries like Lucene, POI, PDFBox, YUI, …
My common.loader:
common.loader="${catalina.base}/lib","${catalina.base}/lib/.jar","${catalina.home}/lib","${catalina.home}/lib/.jar","${catalina.home}/contenslib","${catalina.home}/contenslib/.jar","${catalina.home}/luceelib","${catalina.home}/luceelib/.jar"

And a simple way to test if the library was loaded:

Lucene Facet org.apache.lucene.facet #getClassLocation("org.apache.lucene.facet.taxonomy.CategoryPath")#
(Version: #getPackageVersion("org.apache.lucene.facet.taxonomy")#) #isInClassPath('org.apache.lucene.search.MultiCollector')# Used for Lucene searching

-HarryVon: lucee@googlegroups.com [mailto:lucee@googlegroups.com] Im Auftrag von Michael Offner
Gesendet: Mittwoch, 8. April 2015 12:29
An: lucee@googlegroups.com
Betreff: Re: [Lucee] Lucee 5 - first impression and problem with custom Java libraries

Hi Harry

Please See my comments between the lines

Thanks for the feedback
Micha

Am Mittwoch, 8. April 2015 schrieb Harry Klein :
Thanks for the first version of Lucee 5, good job!

I played a little bit with Lucee 5 and CONTENS seems to run fine.
Some small issues I found:
The update documentation could be improved, I will try to find some time in the evening and add some missing steps
Most important things I missed:
Clarification about the new Lucee Servlet. Web.xml sample code
The LuceeServlet is not carved in stone yet, we had some troubles with tomcat and the welcome file list splitted between 2 servlets, so maybe this will be merged with the cfmlServlet in the next release.
I could not use existing lucee directories (load errors)

What do you mean with “Lucee directories”? What error exactly?

– and had to add lucee-server/bundles
Lucee shouldn’t throw an error if no searchengine is installed – e.g. this error should be catched
I assume you mean in the admin frontend, this will be the case for the next release. But of course not if you use the tags “collection, index,search” in your code.
I am missing the Infinispan Cache Extension
Will come asap

Could you please help me with one problem, before I add a new Jenkins job for Lucee 5:

How can I add custom JARs to Lucee 5?
I tried these ways:
Extended catalina.properties and added a custom folder – jars were not found
That should work, I will check. How you call them?
Copied the jars to lib/ext - jars were not found
See above
Copied the jars to luceee-server/bundles - jars were not found
Please have in mind that Lucee only looks for bundles in that directory.
Every bundle is a jar, but not every jar is a bundle.

What jars we talking about? we can make them available as bundles on the update provider, then a manual installation is not necessary.

P.S. I would suggest to change one line in startup.bat (comment with rem)

rem if not “%CATALINA_HOME%” == “” goto gotHome

Otherwise the express version could use another Tomcat version in the users system


Harry Klein | Konzeption und Entwicklung
CONTENS Software GmbH
Neumarkter Str. 41 | 81673 München
Fon: +49 (0)89 5199 69-0 | Fax: +49 (0)89 5199 69-78
mailto:@Harry_Klein<javascript:_e(%7B%7D,‘cvml’,’@Harry_Klein’);> | http://www.contens.dehttp://www.contens.de/


Machen Sie CONTENS zu Ihrer Plattform
für effizientes digitales Marketing

www.contens.de/dmhttp://www.contens.de/dm


Sitz der Gesellschaft: München
Geschäftsführer: Jörg Wilcke
Amtsgericht München, HRB 128 273


You received this message because you are subscribed to the Google Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+unsubscribe@googlegroups.com<javascript:_e(%7B%7D,‘cvml’,‘lucee%2Bunsubscribe@googlegroups.com’);>.
To post to this group, send email to lucee@googlegroups.com<javascript:_e(%7B%7D,‘cvml’,‘lucee@googlegroups.com’);>.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/F5A941E045A6FE4288ABB2E3D797146FA7394AEC%40SRV-DC1.contens.localhttps://groups.google.com/d/msgid/lucee/F5A941E045A6FE4288ABB2E3D797146FA7394AEC%40SRV-DC1.contens.local?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout.

You received this message because you are subscribed to the Google Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+unsubscribe@googlegroups.commailto:lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.commailto:lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/CAG%2BEEBytn865OO9KCL%3DbHJ_NywWDpxZnKmJcqEMgEoMk2sJZxQ%40mail.gmail.comhttps://groups.google.com/d/msgid/lucee/CAG%2BEEBytn865OO9KCL%3DbHJ_NywWDpxZnKmJcqEMgEoMk2sJZxQ%40mail.gmail.com?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout.

Hi Micha,

i just briefly read some articles covering the topic “Non-osgi library usage in an osgi applicationhttp://stackoverflow.com/questions/4931292/non-osgi-library-usage-in-an-osgi-application”.
Maybe they are helpful for you too:
http://moi.vonos.net/java/osgi-classloaders/
http://www.javacodegeeks.com/2012/11/making-plain-old-java-osgi-compatible.html
http://wso2.com/library/knowledgebase/add-external-jar-libraries-wso2-carbon-based-products/
http://stackoverflow.com/questions/4931292/non-osgi-library-usage-in-an-osgi-application
http://www.eggs.de/content/dam/eggs%20unimedia/papers/Third-Party%20Libraries%20and%20OSGi%20-%20a%20complicated%20relationship.pdf

The last PDF from our Munich colleagues (Eggs) is very good and describes the problem and two possible solutions in detail.

One idea from the wso2.com link could also be the way to go for Lucee:
“…The jar files you drop into this folder will be converted to OSGi bundles during the next server startup. …”

Would it be possible for Lucee to convert custom JARs to OSGi bundles by dropping them to a special folder?

-HarryVon: lucee@googlegroups.com [mailto:lucee@googlegroups.com] Im Auftrag von Michael Offner
Gesendet: Freitag, 17. April 2015 10:31
An: lucee
Betreff: Re: [Lucee] Lucee 5 - first impression and problem with custom Java libraries

FYi

i have raised a ticket for this
https://bitbucket.org/lucee/lucee/issue/296/loading-classes-the-classic-way-fails

it seems like OSGi supress this based on the “org.osgi.framework.bundle.parent” setting

Micha

On Wed, Apr 8, 2015 at 12:01 PM, Harry Klein <@Harry_Kleinmailto:Harry_Klein> wrote:
Thanks for the first version of Lucee 5, good job!

I played a little bit with Lucee 5 and CONTENS seems to run fine.
Some small issues I found:
The update documentation could be improved, I will try to find some time in the evening and add some missing steps
Most important things I missed:
Clarification about the new Lucee Servlet. Web.xml sample code
I could not use existing lucee directories (load errors) – and had to add lucee-server/bundles
Lucee shouldn’t throw an error if no searchengine is installed – e.g. this error should be catched
I am missing the Infinispan Cache Extension

Could you please help me with one problem, before I add a new Jenkins job for Lucee 5:

How can I add custom JARs to Lucee 5?
I tried these ways:
Extended catalina.properties and added a custom folder – jars were not found
Copied the jars to lib/ext - jars were not found
Copied the jars to luceee-server/bundles - jars were not found

P.S. I would suggest to change one line in startup.bat (comment with rem)

rem if not “%CATALINA_HOME%” == “” goto gotHome

Otherwise the express version could use another Tomcat version in the users system


Harry Klein | Konzeption und Entwicklung
CONTENS Software GmbH
Neumarkter Str. 41 | 81673 München
Fon: +49 (0)89 5199 69-0 | Fax: +49 (0)89 5199 69-78tel:%2B49%20(0)89%205199%2069-78
mailto:@Harry_Klein | http://www.contens.dehttp://www.contens.de/


Machen Sie CONTENS zu Ihrer Plattform
für effizientes digitales Marketing

www.contens.de/dmhttp://www.contens.de/dm


Sitz der Gesellschaft: München
Geschäftsführer: Jörg Wilcke
Amtsgericht München, HRB 128 273


You received this message because you are subscribed to the Google Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+unsubscribe@googlegroups.commailto:lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.commailto:lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/F5A941E045A6FE4288ABB2E3D797146FA7394AEC%40SRV-DC1.contens.localhttps://groups.google.com/d/msgid/lucee/F5A941E045A6FE4288ABB2E3D797146FA7394AEC%40SRV-DC1.contens.local?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+unsubscribe@googlegroups.commailto:lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.commailto:lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/CAG%2BEEBx97hV6oEhDmYsVHpc1J7FQS_1iqr7jCyfFpFUQc7S4pw%40mail.gmail.comhttps://groups.google.com/d/msgid/lucee/CAG%2BEEBx97hV6oEhDmYsVHpc1J7FQS_1iqr7jCyfFpFUQc7S4pw%40mail.gmail.com?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout.

“Would it be possible for Lucee to convert custom JARs to OSGi bundles by
dropping them to a special folder?”
Lucee already does this with jars bundled in extensions. Lucee anaylses all
relations of all classes and add the necessary relations to external
resources to the Manifest file. So there is no folder for this, but a
cfadmin action to do so.

But there is something else, when i add a jar with a extension i can define
if Lucee should load this bundles at startup or not.
If you simply put a bundle to the bundles folder Lucee will not load it and
if you only “ask” for a class Lucee will not look for that class in
unloaded bundles.
Lucee only checks unloaded bundle if it has at least a bundle name.
checking for classes in unloaded bundles mean to load the bundle.
so
JavaProxy(“my.ClassName”,“my-bundle”); also checks the unloaded bundles
but this does not
JavaProxy(“my.ClassName”);

MichaOn Fri, Apr 17, 2015 at 11:10 AM, Harry Klein <@Harry_Klein> wrote:

Hi Micha,

i just briefly read some articles covering the topic “Non-osgi library
usage in an osgi application
http://stackoverflow.com/questions/4931292/non-osgi-library-usage-in-an-osgi-application
”.

Maybe they are helpful for you too:

http://moi.vonos.net/java/osgi-classloaders/

http://www.javacodegeeks.com/2012/11/making-plain-old-java-osgi-compatible.html

http://wso2.com/library/knowledgebase/add-external-jar-libraries-wso2-carbon-based-products/

http://stackoverflow.com/questions/4931292/non-osgi-library-usage-in-an-osgi-application

http://www.eggs.de/content/dam/eggs%20unimedia/papers/Third-Party%20Libraries%20and%20OSGi%20-%20a%20complicated%20relationship.pdf

The last PDF from our Munich colleagues (Eggs) is very good and describes
the problem and two possible solutions in detail.

One idea from the wso2.com link could also be the way to go for Lucee:

“…The jar files you drop into this folder will be converted to OSGi
bundles during the next server startup. …

Would it be possible for Lucee to convert custom JARs to OSGi bundles by
dropping them to a special folder?

-Harry

Von: lucee@googlegroups.com [mailto:lucee@googlegroups.com] *Im Auftrag
von *Michael Offner
Gesendet: Freitag, 17. April 2015 10:31
An: lucee
Betreff: Re: [Lucee] Lucee 5 - first impression and problem with custom
Java libraries

FYi

i have raised a ticket for this

https://bitbucket.org/lucee/lucee/issue/296/loading-classes-the-classic-way-fails

it seems like OSGi supress this based on the
“org.osgi.framework.bundle.parent” setting

Micha

On Wed, Apr 8, 2015 at 12:01 PM, Harry Klein <@Harry_Klein> wrote:

Thanks for the first version of Lucee 5, good job!

I played a little bit with Lucee 5 and CONTENS seems to run fine.

Some small issues I found:

            The update documentation could be improved, I will try to

find some time in the evening and add some missing steps

                           Most important things I missed:

Clarification about the new Lucee Servlet. Web.xml sample code

                                           I could not use existing

lucee directories (load errors) – and had to add lucee-server/bundles

            Lucee shouldn’t throw an error if no searchengine is

installed – e.g. this error should be catched

            I am missing the Infinispan Cache Extension

Could you please help me with one problem, before I add a new Jenkins job
for Lucee 5:

How can I add custom JARs to Lucee 5?

I tried these ways:

            Extended catalina.properties and added a custom folder –

jars were not found

            Copied the jars to lib/ext - jars were not found

Copied the jars to luceee-server/bundles - jars were not found

P.S. I would suggest to change one line in startup.bat (comment with rem)

*rem *if not “%CATALINA_HOME%” == “” goto gotHome

Otherwise the express version could use another Tomcat version in the
users system

Harry Klein | Konzeption und Entwicklung

CONTENS Software GmbH

Neumarkter Str. 41 | 81673 München

Fon: +49 (0)89 5199 69-0 | Fax: +49 (0)89 5199 69-78

mailto:@Harry_Klein <@Harry_Klein> | http://www.contens.de


Machen Sie CONTENS zu Ihrer Plattform

für effizientes digitales Marketing

www.contens.de/dm


Sitz der Gesellschaft: München

Geschäftsführer: Jörg Wilcke

Amtsgericht München, HRB 128 273


You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/F5A941E045A6FE4288ABB2E3D797146FA7394AEC%40SRV-DC1.contens.local
https://groups.google.com/d/msgid/lucee/F5A941E045A6FE4288ABB2E3D797146FA7394AEC%40SRV-DC1.contens.local?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAG%2BEEBx97hV6oEhDmYsVHpc1J7FQS_1iqr7jCyfFpFUQc7S4pw%40mail.gmail.com
https://groups.google.com/d/msgid/lucee/CAG%2BEEBx97hV6oEhDmYsVHpc1J7FQS_1iqr7jCyfFpFUQc7S4pw%40mail.gmail.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/F5A941E045A6FE4288ABB2E3D797146FA739A80D%40SRV-DC1.contens.local
https://groups.google.com/d/msgid/lucee/F5A941E045A6FE4288ABB2E3D797146FA739A80D%40SRV-DC1.contens.local?utm_medium=email&utm_source=footer
.

For more options, visit https://groups.google.com/d/optout.

FYi

i have raised a ticket for this
https://bitbucket.org/lucee/lucee/issue/296/loading-classes-the-classic-way-fails

it seems like OSGi supress this based on the
“org.osgi.framework.bundle.parent” setting

MichaOn Wed, Apr 8, 2015 at 12:01 PM, Harry Klein <@Harry_Klein> wrote:

Thanks for the first version of Lucee 5, good job!

I played a little bit with Lucee 5 and CONTENS seems to run fine.

Some small issues I found:

            The update documentation could be improved, I will try to

find some time in the evening and add some missing steps

                           Most important things I missed:

Clarification about the new Lucee Servlet. Web.xml sample code

                                           I could not use existing

lucee directories (load errors) – and had to add lucee-server/bundles

            Lucee shouldn’t throw an error if no searchengine is

installed – e.g. this error should be catched

            I am missing the Infinispan Cache Extension

Could you please help me with one problem, before I add a new Jenkins job
for Lucee 5:

How can I add custom JARs to Lucee 5?

I tried these ways:

            Extended catalina.properties and added a custom folder –

jars were not found

            Copied the jars to lib/ext - jars were not found

Copied the jars to luceee-server/bundles - jars were not found

P.S. I would suggest to change one line in startup.bat (comment with rem)

*rem *if not “%CATALINA_HOME%” == “” goto gotHome

Otherwise the express version could use another Tomcat version in the
users system

Harry Klein | Konzeption und Entwicklung

CONTENS Software GmbH

Neumarkter Str. 41 | 81673 München

Fon: +49 (0)89 5199 69-0 | Fax: +49 (0)89 5199 69-78

mailto:@Harry_Klein <@Harry_Klein> | http://www.contens.de


Machen Sie CONTENS zu Ihrer Plattform

für effizientes digitales Marketing

www.contens.de/dm


Sitz der Gesellschaft: München

Geschäftsführer: Jörg Wilcke

Amtsgericht München, HRB 128 273


You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/F5A941E045A6FE4288ABB2E3D797146FA7394AEC%40SRV-DC1.contens.local
https://groups.google.com/d/msgid/lucee/F5A941E045A6FE4288ABB2E3D797146FA7394AEC%40SRV-DC1.contens.local?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

Hi Micha,

it’s fine that “conversion” code already exists.
Could one (not very good) solution for our CMS be?
Build one “CONTENS” bundle with all custom libraries
Change all createObject(“java”,…) calls to JavaProxy(…) or JavaNew(…) (or whatever name the new method will get)

Of course I (and I think all Railo or Lucce 4.5 users) would prefer a solution where:
They shouldn’t have (too much) work to convert custom libraries
They should’t have to change existing code

I hope that such a solution is possible?

-HarryVon: lucee@googlegroups.com [mailto:lucee@googlegroups.com] Im Auftrag von Michael Offner
Gesendet: Freitag, 17. April 2015 11:22
An: lucee
Betreff: Re: [Lucee] Lucee 5 - first impression and problem with custom Java libraries

“Would it be possible for Lucee to convert custom JARs to OSGi bundles by dropping them to a special folder?”
Lucee already does this with jars bundled in extensions. Lucee anaylses all relations of all classes and add the necessary relations to external resources to the Manifest file. So there is no folder for this, but a cfadmin action to do so.

But there is something else, when i add a jar with a extension i can define if Lucee should load this bundles at startup or not.
If you simply put a bundle to the bundles folder Lucee will not load it and if you only “ask” for a class Lucee will not look for that class in unloaded bundles.
Lucee only checks unloaded bundle if it has at least a bundle name. checking for classes in unloaded bundles mean to load the bundle.
so
JavaProxy(“my.ClassName”,“my-bundle”); also checks the unloaded bundles
but this does not
JavaProxy(“my.ClassName”);

Micha

On Fri, Apr 17, 2015 at 11:10 AM, Harry Klein <@Harry_Kleinmailto:Harry_Klein> wrote:
Hi Micha,

i just briefly read some articles covering the topic “Non-osgi library usage in an osgi applicationhttp://stackoverflow.com/questions/4931292/non-osgi-library-usage-in-an-osgi-application”.
Maybe they are helpful for you too:
http://moi.vonos.net/java/osgi-classloaders/
http://www.javacodegeeks.com/2012/11/making-plain-old-java-osgi-compatible.html
http://wso2.com/library/knowledgebase/add-external-jar-libraries-wso2-carbon-based-products/
http://stackoverflow.com/questions/4931292/non-osgi-library-usage-in-an-osgi-application
http://www.eggs.de/content/dam/eggs%20unimedia/papers/Third-Party%20Libraries%20and%20OSGi%20-%20a%20complicated%20relationship.pdf

The last PDF from our Munich colleagues (Eggs) is very good and describes the problem and two possible solutions in detail.

One idea from the wso2.comhttp://wso2.com link could also be the way to go for Lucee:
“…The jar files you drop into this folder will be converted to OSGi bundles during the next server startup. …”

Would it be possible for Lucee to convert custom JARs to OSGi bundles by dropping them to a special folder?

-Harry

Von: lucee@googlegroups.commailto:lucee@googlegroups.com [mailto:lucee@googlegroups.commailto:lucee@googlegroups.com] Im Auftrag von Michael Offner
Gesendet: Freitag, 17. April 2015 10:31
An: lucee
Betreff: Re: [Lucee] Lucee 5 - first impression and problem with custom Java libraries

FYi

i have raised a ticket for this
https://bitbucket.org/lucee/lucee/issue/296/loading-classes-the-classic-way-fails

it seems like OSGi supress this based on the “org.osgi.framework.bundle.parent” setting

Micha

On Wed, Apr 8, 2015 at 12:01 PM, Harry Klein <@Harry_Kleinmailto:Harry_Klein> wrote:
Thanks for the first version of Lucee 5, good job!

I played a little bit with Lucee 5 and CONTENS seems to run fine.
Some small issues I found:
The update documentation could be improved, I will try to find some time in the evening and add some missing steps
Most important things I missed:
Clarification about the new Lucee Servlet. Web.xml sample code
I could not use existing lucee directories (load errors) – and had to add lucee-server/bundles
Lucee shouldn’t throw an error if no searchengine is installed – e.g. this error should be catched
I am missing the Infinispan Cache Extension

Could you please help me with one problem, before I add a new Jenkins job for Lucee 5:

How can I add custom JARs to Lucee 5?
I tried these ways:
Extended catalina.properties and added a custom folder – jars were not found
Copied the jars to lib/ext - jars were not found
Copied the jars to luceee-server/bundles - jars were not found

P.S. I would suggest to change one line in startup.bat (comment with rem)

rem if not “%CATALINA_HOME%” == “” goto gotHome

Otherwise the express version could use another Tomcat version in the users system


Harry Klein | Konzeption und Entwicklung
CONTENS Software GmbH
Neumarkter Str. 41 | 81673 München
Fon: +49 (0)89 5199 69-0 | Fax: +49 (0)89 5199 69-78tel:%2B49%20(0)89%205199%2069-78
mailto:@Harry_Klein | http://www.contens.dehttp://www.contens.de/


Machen Sie CONTENS zu Ihrer Plattform
für effizientes digitales Marketing

www.contens.de/dmhttp://www.contens.de/dm


Sitz der Gesellschaft: München
Geschäftsführer: Jörg Wilcke
Amtsgericht München, HRB 128 273


You received this message because you are subscribed to the Google Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+unsubscribe@googlegroups.commailto:lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.commailto:lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/F5A941E045A6FE4288ABB2E3D797146FA7394AEC%40SRV-DC1.contens.localhttps://groups.google.com/d/msgid/lucee/F5A941E045A6FE4288ABB2E3D797146FA7394AEC%40SRV-DC1.contens.local?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+unsubscribe@googlegroups.commailto:lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.commailto:lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/CAG%2BEEBx97hV6oEhDmYsVHpc1J7FQS_1iqr7jCyfFpFUQc7S4pw%40mail.gmail.comhttps://groups.google.com/d/msgid/lucee/CAG%2BEEBx97hV6oEhDmYsVHpc1J7FQS_1iqr7jCyfFpFUQc7S4pw%40mail.gmail.com?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout.

You received this message because you are subscribed to the Google Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+unsubscribe@googlegroups.commailto:lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.commailto:lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/F5A941E045A6FE4288ABB2E3D797146FA739A80D%40SRV-DC1.contens.localhttps://groups.google.com/d/msgid/lucee/F5A941E045A6FE4288ABB2E3D797146FA739A80D%40SRV-DC1.contens.local?utm_medium=email&utm_source=footer.

For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+unsubscribe@googlegroups.commailto:lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.commailto:lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/CAG%2BEEBwBYead6nfpRFbspfepuaoC8HxS18MESH71sZwQSFUk%3Dw%40mail.gmail.comhttps://groups.google.com/d/msgid/lucee/CAG%2BEEBwBYead6nfpRFbspfepuaoC8HxS18MESH71sZwQSFUk%3Dw%40mail.gmail.com?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout.