You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Steinar Bang <sb...@dod.no> on 2026/06/06 10:08:19 UTC
Are anyone using micronaut from inside apache karaf?
Does anyone here have any experience with running micronaut inside
apache karaf?
https://micronaut.io
I am specifically looking for (and currently looking into) server side
react application javascript rendering, from a servlet started by the
OSGi HTTP Whiteboard, and am wondering where/if micronaut could fit into
that.
But any experience anyone might have with micronaut inside apache karaf
is of interest.
I am aware that micronaut isn't OSGi compliant and that it is written
expecting a single classloader with a flat classpath.
I am also aware that Micronaut doesn't natively use the servlet API, but
instead has its own embedded HTTP server. But I have googled up this
thing:
https://micronaut.io/2020/03/03/back-to-the-future-with-micronaut-servlet/
Thanks!
Re: Are anyone using micronaut from inside apache karaf?
Posted by Steinar Bang <sb...@dod.no>.
>>>>> Jean-Baptiste Onofré <jb...@nanthrax.net>:
> I didn’t try. As micronaut is not OSGi compliant, and regarding the way it
> works about ClassLoaders, it won’t work out the box.
Yes, thanks, that's what I thought.
> However, worth to use a uber bundle packaging micronaut: everything will be
> in the bundle classloader so it might work.
Hm... maybe...?
Thanks!
Re: Are anyone using micronaut from inside apache karaf?
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi
I didn’t try. As micronaut is not OSGi compliant, and regarding the way it
works about ClassLoaders, it won’t work out the box.
However, worth to use a uber bundle packaging micronaut: everything will be
in the bundle classloader so it might work.
Regards
JB
Le sam. 6 juin 2026 à 12:08, Steinar Bang <sb...@dod.no> a écrit :
> Does anyone here have any experience with running micronaut inside
> apache karaf?
> https://micronaut.io
>
> I am specifically looking for (and currently looking into) server side
> react application javascript rendering, from a servlet started by the
> OSGi HTTP Whiteboard, and am wondering where/if micronaut could fit into
> that.
>
> But any experience anyone might have with micronaut inside apache karaf
> is of interest.
>
> I am aware that micronaut isn't OSGi compliant and that it is written
> expecting a single classloader with a flat classpath.
>
> I am also aware that Micronaut doesn't natively use the servlet API, but
> instead has its own embedded HTTP server. But I have googled up this
> thing:
>
> https://micronaut.io/2020/03/03/back-to-the-future-with-micronaut-servlet/
>
> Thanks!
>
>
Re: Are anyone using micronaut from inside apache karaf?
Posted by Steinar Bang <sb...@dod.no>.
>>>>> João Assunção <jo...@exploitsys.com>:
> I haven't used Micronaut with OSGi myself, so I can't provide specific
> guidance on that integration. However, I believe the most challenging
> aspect of your project will be the React SSR requirement. You will likely
> need a JavaScript engine, and Truffle/GraalJS currently appears to be the
> only maintained option.
Thanks! Yes, I know.
> If you are considering Micronaut primarily for SSR support, you may be able
> to achieve your goal without it. In theory, you could use GraalJS to run
> the entry-server.js file produced by an SSR build and send the output as
> the response for the initial HTTP request. Please note that routing and
> data access within the React code will likely require special attention to
> function correctly during server-side rendering.
Indeed.
FWIW I've done some experiments rendering a simple react app in GraalJS
and so far I've been unable to satisfy all of the app's dependencies.
Re: Are anyone using micronaut from inside apache karaf?
Posted by João Assunção <jo...@exploitsys.com>.
Hello Steinar,
I haven't used Micronaut with OSGi myself, so I can't provide specific
guidance on that integration. However, I believe the most challenging
aspect of your project will be the React SSR requirement. You will likely
need a JavaScript engine, and Truffle/GraalJS currently appears to be the
only maintained option.
If you are considering Micronaut primarily for SSR support, you may be able
to achieve your goal without it. In theory, you could use GraalJS to run
the entry-server.js file produced by an SSR build and send the output as
the response for the initial HTTP request. Please note that routing and
data access within the React code will likely require special attention to
function correctly during server-side rendering.
Regards and good luck.
João
Email: joao.assuncao@exploitsys.com
Web: www.exploitsys.com
On Sat, Jun 6, 2026 at 11:08 AM Steinar Bang <sb...@dod.no> wrote:
> Does anyone here have any experience with running micronaut inside
> apache karaf?
> https://micronaut.io
>
> I am specifically looking for (and currently looking into) server side
> react application javascript rendering, from a servlet started by the
> OSGi HTTP Whiteboard, and am wondering where/if micronaut could fit into
> that.
>
> But any experience anyone might have with micronaut inside apache karaf
> is of interest.
>
> I am aware that micronaut isn't OSGi compliant and that it is written
> expecting a single classloader with a flat classpath.
>
> I am also aware that Micronaut doesn't natively use the servlet API, but
> instead has its own embedded HTTP server. But I have googled up this
> thing:
>
> https://micronaut.io/2020/03/03/back-to-the-future-with-micronaut-servlet/
>
> Thanks!
>
>
Re: Are anyone using micronaut from inside apache karaf?
Posted by Steinar Bang <sb...@dod.no>.
>>>>> Francois Papon <fr...@openobject.fr>:
> I am curious to know why you want to run this kind of application in Karaf?
Well, I'm not necessarily interested in running all of micronaut.
I am just exploring various possibilities for doing server side
rendering in my current software stack.
And from the sound of it, micronaut is a dead end...?
Re: Are anyone using micronaut from inside apache karaf?
Posted by Francois Papon <fr...@openobject.fr>.
Hi,
I am curious to know why you want to run this kind of application in Karaf?
regards,
François
fpapon@apache.org
francois.papon@openobject.fr
Le 06/06/2026 à 12:08, Steinar Bang a écrit :
> Does anyone here have any experience with running micronaut inside
> apache karaf?
> https://micronaut.io
>
> I am specifically looking for (and currently looking into) server side
> react application javascript rendering, from a servlet started by the
> OSGi HTTP Whiteboard, and am wondering where/if micronaut could fit into
> that.
>
> But any experience anyone might have with micronaut inside apache karaf
> is of interest.
>
> I am aware that micronaut isn't OSGi compliant and that it is written
> expecting a single classloader with a flat classpath.
>
> I am also aware that Micronaut doesn't natively use the servlet API, but
> instead has its own embedded HTTP server. But I have googled up this
> thing:
> https://micronaut.io/2020/03/03/back-to-the-future-with-micronaut-servlet/
>
> Thanks!
>