OSGi + Stripes

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

OSGi + Stripes

Yann Bourdeau-2
Hi All,

        I’m trying to create a bundle in OSGi (Karaf 3,.0.3)  of a Stripes application. I’m not too much familiar with OSGi but i’m familiar with Stripes. I’m trying to run the calculator sample and everything is working fine except for the scanning of the action beans. The action bean do not seems to be found when scanned at the startup. Do I need to do something special to the package that contains the action beans. Like exporting it? Any help is welcome.

thanks in advance.

Yann Bourdeau, M.Ing.
Senior Software Developer
438-499-4607
[hidden email]




------------------------------------------------------------------------------
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: OSGi + Stripes

VANKEISBELCK Remi
Hi Yann,

Stripes's classpath scanning has its ways. It does several tricks in order to try to find the classes in the "CLASSPATH", but this is off the Java spec, and therefore not guaranteed to work correctly everywhere. It depends a lot on the environment that creates the app's class loaders...

How is your app packaged (ie where are the action bean classes) ? 
What app server are you using ?

Cheers

Rémi


2015-11-02 20:27 GMT+01:00 Yann Bourdeau <[hidden email]>:
Hi All,

        I’m trying to create a bundle in OSGi (Karaf 3,.0.3)  of a Stripes application. I’m not too much familiar with OSGi but i’m familiar with Stripes. I’m trying to run the calculator sample and everything is working fine except for the scanning of the action beans. The action bean do not seems to be found when scanned at the startup. Do I need to do something special to the package that contains the action beans. Like exporting it? Any help is welcome.

thanks in advance.

Yann Bourdeau, M.Ing.
Senior Software Developer
<a href="tel:438-499-4607" value="+14384994607">438-499-4607
[hidden email]




------------------------------------------------------------------------------
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users


------------------------------------------------------------------------------

_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: OSGi + Stripes

Yann Bourdeau-2
Hi Remi,

Thanks for replying.

I use Apache Karaf 3.0.3 on top of Apache Felix.

I use the felix maven bundle creator in Maven. I have exported the package the contains the Action Bean. I have modified the class path ton include WEB-INF/classes (where if i’m not mistaken it is where the Action Bean package reside). I know that class loaders are modified by the OSGi container. Maybe it is not possible.

thanks
Le 3 nov. 2015 à 10:14, VANKEISBELCK Remi <[hidden email]> a écrit :

Hi Yann,

Stripes's classpath scanning has its ways. It does several tricks in order to try to find the classes in the "CLASSPATH", but this is off the Java spec, and therefore not guaranteed to work correctly everywhere. It depends a lot on the environment that creates the app's class loaders...

How is your app packaged (ie where are the action bean classes) ? 
What app server are you using ?

Cheers

Rémi


2015-11-02 20:27 GMT+01:00 Yann Bourdeau <[hidden email]>:
Hi All,

        I’m trying to create a bundle in OSGi (Karaf 3,.0.3)  of a Stripes application. I’m not too much familiar with OSGi but i’m familiar with Stripes. I’m trying to run the calculator sample and everything is working fine except for the scanning of the action beans. The action bean do not seems to be found when scanned at the startup. Do I need to do something special to the package that contains the action beans. Like exporting it? Any help is welcome.

thanks in advance.

Yann Bourdeau, M.Ing.
Senior Software Developer
<a href="tel:438-499-4607" value="+14384994607" class="">438-499-4607
[hidden email]




------------------------------------------------------------------------------
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users

------------------------------------------------------------------------------
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Yann Bourdeau, M.Ing.
Senior Software Developer
438-499-4607




------------------------------------------------------------------------------

_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: OSGi + Stripes

Alessio Stalla-2
I'm not an OSGi guru, but I don't think you can deploy a war like that. You should not have to modify the class path. You should use a container, or install the appropriate bundles into yours, that can deploy web applications (like ServiceMix for example; "Pax Web" is the keyword to search for).

Hope this helps. The OSGi world is a grim one :( ;)

On Tue, Nov 3, 2015 at 4:46 PM, Yann Bourdeau <[hidden email]> wrote:
Hi Remi,

Thanks for replying.

I use Apache Karaf 3.0.3 on top of Apache Felix.

I use the felix maven bundle creator in Maven. I have exported the package the contains the Action Bean. I have modified the class path ton include WEB-INF/classes (where if i’m not mistaken it is where the Action Bean package reside). I know that class loaders are modified by the OSGi container. Maybe it is not possible.

thanks

Le 3 nov. 2015 à 10:14, VANKEISBELCK Remi <[hidden email]> a écrit :

Hi Yann,

Stripes's classpath scanning has its ways. It does several tricks in order to try to find the classes in the "CLASSPATH", but this is off the Java spec, and therefore not guaranteed to work correctly everywhere. It depends a lot on the environment that creates the app's class loaders...

How is your app packaged (ie where are the action bean classes) ? 
What app server are you using ?

Cheers

Rémi


2015-11-02 20:27 GMT+01:00 Yann Bourdeau <[hidden email]>:
Hi All,

        I’m trying to create a bundle in OSGi (Karaf 3,.0.3)  of a Stripes application. I’m not too much familiar with OSGi but i’m familiar with Stripes. I’m trying to run the calculator sample and everything is working fine except for the scanning of the action beans. The action bean do not seems to be found when scanned at the startup. Do I need to do something special to the package that contains the action beans. Like exporting it? Any help is welcome.

thanks in advance.

Yann Bourdeau, M.Ing.
Senior Software Developer
<a href="tel:438-499-4607" value="+14384994607" target="_blank">438-499-4607
[hidden email]




------------------------------------------------------------------------------
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users

------------------------------------------------------------------------------
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Yann Bourdeau, M.Ing.
Senior Software Developer
<a href="tel:438-499-4607" value="+14384994607" target="_blank">438-499-4607




------------------------------------------------------------------------------

_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users




--
Alessio Stalla | Software Architect
M: +39 340 7824743 | T: +39 010 566441 | F: +39 010 8900455
[hidden email] | www.manydesigns.com

MANYDESIGNS s.r.l.
Via G. D'Annunzio, 2/51 | 16121 Genova (GE) | Italy

------------------------------------------------------------------------------

_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: OSGi + Stripes

VANKEISBELCK Remi
In reply to this post by Yann Bourdeau-2
I have absolutely zero knowledge of those OSGI servers, but as soon as they manage class (re)loading etc, I guess that Stripes "Virtual File System" gets confused. 

This is one of the major issues today with Stripes IMHO, the VFS. We already have regular JEE servers that we don't support, so I guess OSGI is even worse :/

Classpath scanning is done by the class :
net.sourceforge.stripes.vfs.DefaultVFS

Maybe you could configure the logs to DEBUG for this logger and see what it outputs ? This (plus an explanation of the "war" contents) would help to understand where it fails.

Cheers

Remi


2015-11-03 16:46 GMT+01:00 Yann Bourdeau <[hidden email]>:
Hi Remi,

Thanks for replying.

I use Apache Karaf 3.0.3 on top of Apache Felix.

I use the felix maven bundle creator in Maven. I have exported the package the contains the Action Bean. I have modified the class path ton include WEB-INF/classes (where if i’m not mistaken it is where the Action Bean package reside). I know that class loaders are modified by the OSGi container. Maybe it is not possible.

thanks

Le 3 nov. 2015 à 10:14, VANKEISBELCK Remi <[hidden email]> a écrit :

Hi Yann,

Stripes's classpath scanning has its ways. It does several tricks in order to try to find the classes in the "CLASSPATH", but this is off the Java spec, and therefore not guaranteed to work correctly everywhere. It depends a lot on the environment that creates the app's class loaders...

How is your app packaged (ie where are the action bean classes) ? 
What app server are you using ?

Cheers

Rémi


2015-11-02 20:27 GMT+01:00 Yann Bourdeau <[hidden email]>:
Hi All,

        I’m trying to create a bundle in OSGi (Karaf 3,.0.3)  of a Stripes application. I’m not too much familiar with OSGi but i’m familiar with Stripes. I’m trying to run the calculator sample and everything is working fine except for the scanning of the action beans. The action bean do not seems to be found when scanned at the startup. Do I need to do something special to the package that contains the action beans. Like exporting it? Any help is welcome.

thanks in advance.

Yann Bourdeau, M.Ing.
Senior Software Developer
<a href="tel:438-499-4607" value="+14384994607" target="_blank">438-499-4607
[hidden email]




------------------------------------------------------------------------------
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users

------------------------------------------------------------------------------
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Yann Bourdeau, M.Ing.
Senior Software Developer
<a href="tel:438-499-4607" value="+14384994607" target="_blank">438-499-4607





------------------------------------------------------------------------------

_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users