Re: Registering a Wicket Application using OSGi HTTP service

2010-03-22 Thread Jaime Soriano Pastor
Hi,

On Thu, Mar 18, 2010 at 9:12 PM, Ernesto Reinaldo Barreiro
reier...@gmail.com wrote:
 That's weird. Did you tried to check-out [1] and  [2]? They did work a
 couple of month ago when I tested them.

Don't worry, it wasn't an Antilia problem :)

I finally fixed it, the answer in StackOverflow:
http://stackoverflow.com/questions/2432263/starting-wicket-web-application-with-osgi-http-service/2473878#2473878

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Registering a Wicket Application using OSGi HTTP service

2010-03-18 Thread Jaime Soriano Pastor
Hello,

I'm trying to start a Wicket Application using Felix implementation of
OSGi HTTP service, for that I just register the service using
WicketServlet with applicationClassName parameter set to the main
application class name:

props.put(applicationClassName, MainApplication.class.getName());
service = (HttpService)context.getService(httpReference);
service.registerServlet(/, new WicketServlet(), props, null);

But it fails to register saying that wicket is Unable to create
application of class es.warp.sample.HTTPLocalGUI.MainApplication.
The output error also includes some lines about class loader so I
thought it was something related with visibility. I tried to export
everything but I had the same failure.


at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)



I use for deployment maven and pax runner with Felix framework (mvn
package install pax:run -Dframework=felix -Dprofiles=log,config).
If I use equinox instead of felix, the application is registered and
works perfectly, it's ok for development, but I need it working on
felix for production deployment.

I'm thinking that I'm not doing it on the right way, but I don't know
how to do it. I also tried to publish the servlet using Felix
Whiteboard service, and I had the same results, it worked when I used
equinox and it didn't work when I used felix.

What am I doing wrong?


Regards,

Jaime.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Registering a Wicket Application using OSGi HTTP service

2010-03-18 Thread Fernando Wermus
Take a look at Antilia

http://code.google.com/p/antilia/

On Thu, Mar 18, 2010 at 12:01 PM, Jaime Soriano Pastor 
jsorianopas...@gmail.com wrote:

 Hello,

 I'm trying to start a Wicket Application using Felix implementation of
 OSGi HTTP service, for that I just register the service using
 WicketServlet with applicationClassName parameter set to the main
 application class name:

 props.put(applicationClassName, MainApplication.class.getName());
 service = (HttpService)context.getService(httpReference);
 service.registerServlet(/, new WicketServlet(), props, null);

 But it fails to register saying that wicket is Unable to create
 application of class es.warp.sample.HTTPLocalGUI.MainApplication.
 The output error also includes some lines about class loader so I
 thought it was something related with visibility. I tried to export
 everything but I had the same failure.
 
 
 at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
 at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
 at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(Class.java:247)
 
 

 I use for deployment maven and pax runner with Felix framework (mvn
 package install pax:run -Dframework=felix -Dprofiles=log,config).
 If I use equinox instead of felix, the application is registered and
 works perfectly, it's ok for development, but I need it working on
 felix for production deployment.

 I'm thinking that I'm not doing it on the right way, but I don't know
 how to do it. I also tried to publish the servlet using Felix
 Whiteboard service, and I had the same results, it worked when I used
 equinox and it didn't work when I used felix.

 What am I doing wrong?


 Regards,

 Jaime.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: Registering a Wicket Application using OSGi HTTP service

2010-03-18 Thread Jaime Soriano Pastor
Hi,

On Thu, Mar 18, 2010 at 3:58 PM, Fernando Wermus
fernando.wer...@gmail.com wrote:
 Take a look at Antilia

 http://code.google.com/p/antilia/

Thanks for the suggestion, Antilia seems to be a really interesting
project, but it didn't solve my problem :(

What I tried was to create a new Activator (AntiliaActivator) that
extends WicketServletServiceActivator and implements BundleActivator.
AntiliaActivator getApplicationClass() returns
AntiliaMainApplication.class that extends AntiliaWebApplication that
returns the MainPage class as Home Page.

The new thing is that this solution also fails with Equinox, with a
similar exception.

Regards,

Jaime.

 On Thu, Mar 18, 2010 at 12:01 PM, Jaime Soriano Pastor 
 jsorianopas...@gmail.com wrote:

 Hello,

 I'm trying to start a Wicket Application using Felix implementation of
 OSGi HTTP service, for that I just register the service using
 WicketServlet with applicationClassName parameter set to the main
 application class name:

 props.put(applicationClassName, MainApplication.class.getName());
 service = (HttpService)context.getService(httpReference);
 service.registerServlet(/, new WicketServlet(), props, null);

 But it fails to register saying that wicket is Unable to create
 application of class es.warp.sample.HTTPLocalGUI.MainApplication.
 The output error also includes some lines about class loader so I
 thought it was something related with visibility. I tried to export
 everything but I had the same failure.
 
 
 at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
 at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
 at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(Class.java:247)
 
 

 I use for deployment maven and pax runner with Felix framework (mvn
 package install pax:run -Dframework=felix -Dprofiles=log,config).
 If I use equinox instead of felix, the application is registered and
 works perfectly, it's ok for development, but I need it working on
 felix for production deployment.

 I'm thinking that I'm not doing it on the right way, but I don't know
 how to do it. I also tried to publish the servlet using Felix
 Whiteboard service, and I had the same results, it worked when I used
 equinox and it didn't work when I used felix.

 What am I doing wrong?


 Regards,

 Jaime.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




 --
 Fernando Wermus.

 www.linkedin.com/in/fernandowermus


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Registering a Wicket Application using OSGi HTTP service

2010-03-18 Thread Ernesto Reinaldo Barreiro
Hi,

That's weird. Did you tried to check-out [1] and  [2]? They did work a
couple of month ago when I tested them.

Ernesto

References,

1-http://code.google.com/p/antilia/source/browse/#svn/com.antilia.wstarter
2-
http://code.google.com/p/antilia/source/browse/#svn/com.antilia.wstarter.demo






On Thu, Mar 18, 2010 at 5:45 PM, Jaime Soriano Pastor 
jsorianopas...@gmail.com wrote:

 Hi,

 On Thu, Mar 18, 2010 at 3:58 PM, Fernando Wermus
 fernando.wer...@gmail.com wrote:
  Take a look at Antilia
 
  http://code.google.com/p/antilia/
 
 Thanks for the suggestion, Antilia seems to be a really interesting
 project, but it didn't solve my problem :(

 What I tried was to create a new Activator (AntiliaActivator) that
 extends WicketServletServiceActivator and implements BundleActivator.
 AntiliaActivator getApplicationClass() returns
 AntiliaMainApplication.class that extends AntiliaWebApplication that
 returns the MainPage class as Home Page.

 The new thing is that this solution also fails with Equinox, with a
 similar exception.

 Regards,

 Jaime.

  On Thu, Mar 18, 2010 at 12:01 PM, Jaime Soriano Pastor 
  jsorianopas...@gmail.com wrote:
 
  Hello,
 
  I'm trying to start a Wicket Application using Felix implementation of
  OSGi HTTP service, for that I just register the service using
  WicketServlet with applicationClassName parameter set to the main
  application class name:
 
  props.put(applicationClassName, MainApplication.class.getName());
  service = (HttpService)context.getService(httpReference);
  service.registerServlet(/, new WicketServlet(), props, null);
 
  But it fails to register saying that wicket is Unable to create
  application of class es.warp.sample.HTTPLocalGUI.MainApplication.
  The output error also includes some lines about class loader so I
  thought it was something related with visibility. I tried to export
  everything but I had the same failure.
  
  
  at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
  at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
  at java.lang.Class.forName0(Native Method)
  at java.lang.Class.forName(Class.java:247)
  
  
 
  I use for deployment maven and pax runner with Felix framework (mvn
  package install pax:run -Dframework=felix -Dprofiles=log,config).
  If I use equinox instead of felix, the application is registered and
  works perfectly, it's ok for development, but I need it working on
  felix for production deployment.
 
  I'm thinking that I'm not doing it on the right way, but I don't know
  how to do it. I also tried to publish the servlet using Felix
  Whiteboard service, and I had the same results, it worked when I used
  equinox and it didn't work when I used felix.
 
  What am I doing wrong?
 
 
  Regards,
 
  Jaime.
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
  --
  Fernando Wermus.
 
  www.linkedin.com/in/fernandowermus
 

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org