Re: [pax-web][whiteboard] Warning on whiteboard bundle stop - cannot restart bundle.

2017-03-15 Thread Eben Stewart
I'll add this to Jira, but I was trying to narrow this down even more

In my own test code, I split it into 2 separate bundles - 1 containing the 
ServletContextHelper, the other containing the Servlet, both using 
DS/Whiteboard

if I stop and start the servlet bundle only, I see this:

g! stop 22
[Gogo shell] DEBUG TestCoreServlet.coreServlet - BundleEvent STOPPING - 
TestCoreServlet.coreServlet
[Gogo shell] DEBUG TestCoreServlet.coreServlet - ServiceEvent UNREGISTERING 
- [javax.servlet.Servlet] - TestCoreServlet.coreServlet
[Gogo shell] DEBUG 
org.ops4j.pax.web.extender.whiteboard.internal.tracker.AbstractTracker - 
Service removed [javax.servlet.Servlet]
[Gogo shell] DEBUG org.ops4j.pax.web.extender.war.internal.Activator - 
Starting destruction process for bundle TestCoreServlet.coreServlet
[Gogo shell] DEBUG org.ops4j.pax.web.extender.war.internal.Activator - Not 
an extended bundle or destruction of extension already finished for 
TestCoreServlet.coreServlet.
[Gogo shell] DEBUG org.ops4j.pax.web.extender.war.internal.Activator - 
Starting destruction process for bundle TestCoreServlet.coreServlet
[Gogo shell] DEBUG org.ops4j.pax.web.extender.war.internal.Activator - Not 
an extended bundle or destruction of extension already finished for 
TestCoreServlet.coreServlet.
[Gogo shell] DEBUG TestCoreServlet.coreServlet - BundleEvent STOPPED - 
TestCoreServlet.coreServlet
[Gogo shell] DEBUG org.ops4j.pax.web.extender.war.internal.Activator - 
Starting destruction process for bundle TestCoreServlet.coreServlet
[Gogo shell] DEBUG org.ops4j.pax.web.extender.war.internal.Activator - Not 
an extended bundle or destruction of extension already finished for 
TestCoreServlet.coreServlet.
g! start 22
[Gogo shell] DEBUG TestCoreServlet.coreServlet - BundleEvent STARTING - 
TestCoreServlet.coreServlet
[Gogo shell] DEBUG TestCoreServlet.coreServlet - BundleEvent STARTED - 
TestCoreServlet.coreServlet
[Gogo shell] DEBUG TestCoreServlet.coreServlet - ServiceEvent REGISTERED - 
[javax.servlet.Servlet] - TestCoreServlet.coreServlet
[Gogo shell] DEBUG 
org.ops4j.pax.web.extender.whiteboard.internal.tracker.AbstractTracker - 
Service available [javax.servlet.Servlet]
[Gogo shell] DEBUG 
org.ops4j.pax.web.extender.whiteboard.internal.tracker.ServletTracker - 
Creating web element for service 45 [javax.servlet.Servlet] 
(TestCore.Servlet.Example@9211a24).
[Gogo shell] DEBUG 
org.ops4j.pax.web.extender.whiteboard.internal.WebApplication - 
de-registering 0 servlet filters
[Gogo shell] DEBUG 
org.ops4j.pax.web.extender.whiteboard.internal.WebApplication - 
de-registering 0 welcomefilemappings
[Gogo shell] DEBUG 
org.ops4j.pax.web.extender.whiteboard.internal.WebApplication - registering 
weblement:ServletWebElement{mapping=DefaultServletMapping{httpContextId=CustomContext,urlPatterns=[/web],initParams={},servlet=TestCore.Servlet.Example@9211a24,
 
alias=null, servletNameExample1}}
[Gogo shell] DEBUG org.ops4j.pax.web.service.internal.HttpServiceStarted - 
Using context 
[ContextModel{id=org.ops4j.pax.web.service.spi.model.ContextModel-2,name=context,httpContext=org.ops4j.pax.web.extender.whiteboard.internal.WebApplication$1@373185f1,contextParams={httpContext.shared=true,
 
webapp.context=context},virtualHosts={},connectors={}}]
[Gogo shell] DEBUG 
org.ops4j.pax.web.service.internal.ServletEventDispatcher - Sending web 
event ServletEvent [replay=false, type=1, 
bundle=21-TestCoreServlet.context, timestamp=1489628772443, alias=null, 
servletName=Example1, urlParameter=[Ljava.lang.String;@47984949, 
servletClass=TestCore.Servlet.Example], 
httpContext=org.ops4j.pax.web.extender.whiteboard.internal.WebApplication$1@373185f1]
 
for bundle TestCoreServlet.context
[ServletEventDispatcher: 3] DEBUG org.ops4j.pax.web.pax-web-jetty-bundle - 
org/osgi/service/web/DEPLOYING
[ServletEventDispatcher: 2] DEBUG org.ops4j.pax.web.pax-web-runtime - 
org/osgi/service/web/DEPLOYING
[Gogo shell] DEBUG org.ops4j.pax.web.service.jetty.internal.JettyServerImpl 
- Adding servlet 
[ServletModel{id=org.ops4j.pax.web.service.spi.model.ServletModel-4,name=Example1,urlPatterns=[/web],alias=null,servlet=TestCore.Servlet.Example@9211a24,initParams={},context=ContextModel{id=org.ops4j.pax.web.service.spi.model.ContextModel-2,name=context,httpContext=org.ops4j.pax.web.extender.whiteboard.internal.WebApplication$1@373185f1,contextParams={httpContext.shared=true,
 
webapp.context=context},virtualHosts={},connectors={}}}]
[Gogo shell] DEBUG org.eclipse.jetty.util.component.ContainerLifeCycle - 
org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler@6e9175d8 
added {Example1@77578027==TestCore.Servlet.Example,-1,true,UNMANAGED}
[Gogo shell] DEBUG org.eclipse.jetty.util.component.ContainerLifeCycle - 
org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler@6e9175d8 
added {[/web]=>Example1,POJO}
[Gogo shell] DEBUG 
org.ops4j.pax.web.service.internal.ServletEventDispatcher - Sending web 
event ServletEvent [replay=false, type=5, 

Re: [pax-web-tomcat] tests and issues found

2017-03-15 Thread 'Achim Nierbeck' via OPS4J
Hi Stephan,

Regarding your first issue, this is rather strange cause it actually
behaves the same. At least the registration is about the same.
I'll try to dig around that a bit. Right now just one thing crosses my
mind, maybe it's related to the extra hoops we need to jump through to have
servlets and filters registered in some "order" right now.

Regarding PAXWEB-628, yes I think you already fixed it with PAXWEB-630. The
idea has been to do the same as with Jetty.
The only thing missing is that it's actually possible for the jetty
container to register handlers (right now not connectors) as Services. [1]

regards, Achim

[1] -
https://github.com/ops4j/org.ops4j.pax.web/blob/master/pax-web-itest/pax-web-itest-container/pax-web-itest-container-jetty/src/test/java/org/ops4j/pax/web/itest/jetty/JettyHandlerServiceIntegrationTest.java#L85-L118


2017-03-15 17:05 GMT+01:00 Marc Schlegel :

> Thanks for your work.
>
> Regarding your second question: this might be related to the new
> Jetty-TestClient which was added last year as a replacement for Apache
> HttpComponents. The error could come from two sources
>
>1. The abstraction layer in the JettyTestClient [1] has a bug when
>building up a POST-request
>2. The actual test is not preparing the form in the way which works
>for JSF
>
> Right now I tend to think it's the latter since I remember porting some
> JSF-tests with a working submit (maybe this one slipped). I might find some
> time later this week. Feel free to create a Jira issue and assign it to me.
>
> regards
> Marc
>
> [1] https://github.com/ops4j/org.ops4j.pax.web/blob/master/
> pax-web-itest/pax-web-itest-base/src/main/java/org/ops4j/
> pax/web/itest/base/client/JettyTestClient.java
>
> Am Mittwoch, 15. März 2017 15:49:07 UTC+1 schrieb Stephan Siano:
>>
>> Hi,
>>
>> I have copied and adapted several (40+) integration tests from jetty to
>> tomcat. Sorry for the large number of pull requests for that. The tests
>> were running fine in a local build but were unstable on the Jenkins server.
>>
>> I have not gone through all tests that are ignored in detail, but for now
>> I have two findings (and questions):
>> 1. filters registered via Whiteboard extender seem not to work with
>> Tomcat. There is no error message (at least I didn't find any), the filters
>> are just not executed. The funny thing is: filters registered in the
>> web.xml of a war work just fine. Does anybody have a clue what the
>> whiteboard extender does differently with regards to filters than the war
>> extender?
>>
>> 2. There is one WarJSFPrimefacesIntegrationTest. It has three test
>> methods, the main one does not have a @Test annotation (and also does not
>> work on jetty). I could update the method and got quite far, but the name
>> entered in the form is not sent back. If I try the same thing in a Browser
>> (filling in the form and pressing submit), the whole thing works. Does
>> anybody have a clue why these tests fail (in Jetty as well as in Tomcat)?
>> Another test in this class fetches the form and makes sure that no
>> panelGrid-Tag is in the input? This test fails on Tomcat, but I don't get
>> why this is wrong. The browser shows the form and I can enter data there.
>> However Jetty sends a different HTML for the form. Does anybody know how
>> this is achieved?
>>
>> In addition I had a look into the JIRA for open Tomcat issues:
>>
>> PAXWEB-513 seems already to be fixed (or I am getting the issue wrong) I
>> can add multiple servlet mappings for the same servlet in web.xml with
>> tomcat and they work just fine.
>>
>> What does PAXWEB-628 mean? That Connector and Host entities can be
>> configured via tomcat-server.xml? That would be part of PAXWEB-630.
>>
>> Best regards
>> Stephan
>>
> --
> --
> --
> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>
> ---
> You received this message because you are subscribed to the Google Groups
> "OPS4J" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ops4j+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [pax-web-tomcat] tests and issues found

2017-03-15 Thread Marc Schlegel
Thanks for your work.

Regarding your second question: this might be related to the new 
Jetty-TestClient which was added last year as a replacement for Apache 
HttpComponents. The error could come from two sources

   1. The abstraction layer in the JettyTestClient [1] has a bug when 
   building up a POST-request
   2. The actual test is not preparing the form in the way which works for 
   JSF

Right now I tend to think it's the latter since I remember porting some 
JSF-tests with a working submit (maybe this one slipped). I might find some 
time later this week. Feel free to create a Jira issue and assign it to me.

regards
Marc

[1] 
https://github.com/ops4j/org.ops4j.pax.web/blob/master/pax-web-itest/pax-web-itest-base/src/main/java/org/ops4j/pax/web/itest/base/client/JettyTestClient.java

Am Mittwoch, 15. März 2017 15:49:07 UTC+1 schrieb Stephan Siano:
>
> Hi,
>
> I have copied and adapted several (40+) integration tests from jetty to 
> tomcat. Sorry for the large number of pull requests for that. The tests 
> were running fine in a local build but were unstable on the Jenkins server.
>
> I have not gone through all tests that are ignored in detail, but for now 
> I have two findings (and questions):
> 1. filters registered via Whiteboard extender seem not to work with 
> Tomcat. There is no error message (at least I didn't find any), the filters 
> are just not executed. The funny thing is: filters registered in the 
> web.xml of a war work just fine. Does anybody have a clue what the 
> whiteboard extender does differently with regards to filters than the war 
> extender?
>
> 2. There is one WarJSFPrimefacesIntegrationTest. It has three test 
> methods, the main one does not have a @Test annotation (and also does not 
> work on jetty). I could update the method and got quite far, but the name 
> entered in the form is not sent back. If I try the same thing in a Browser 
> (filling in the form and pressing submit), the whole thing works. Does 
> anybody have a clue why these tests fail (in Jetty as well as in Tomcat)? 
> Another test in this class fetches the form and makes sure that no 
> panelGrid-Tag is in the input? This test fails on Tomcat, but I don't get 
> why this is wrong. The browser shows the form and I can enter data there. 
> However Jetty sends a different HTML for the form. Does anybody know how 
> this is achieved?
>
> In addition I had a look into the JIRA for open Tomcat issues:
>
> PAXWEB-513 seems already to be fixed (or I am getting the issue wrong) I 
> can add multiple servlet mappings for the same servlet in web.xml with 
> tomcat and they work just fine.
>
> What does PAXWEB-628 mean? That Connector and Host entities can be 
> configured via tomcat-server.xml? That would be part of PAXWEB-630.
>
> Best regards
> Stephan
>

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[pax-web-tomcat] tests and issues found

2017-03-15 Thread Stephan Siano
Hi,

I have copied and adapted several (40+) integration tests from jetty to 
tomcat. Sorry for the large number of pull requests for that. The tests 
were running fine in a local build but were unstable on the Jenkins server.

I have not gone through all tests that are ignored in detail, but for now I 
have two findings (and questions):
1. filters registered via Whiteboard extender seem not to work with Tomcat. 
There is no error message (at least I didn't find any), the filters are 
just not executed. The funny thing is: filters registered in the web.xml of 
a war work just fine. Does anybody have a clue what the whiteboard extender 
does differently with regards to filters than the war extender?

2. There is one WarJSFPrimefacesIntegrationTest. It has three test methods, 
the main one does not have a @Test annotation (and also does not work on 
jetty). I could update the method and got quite far, but the name entered 
in the form is not sent back. If I try the same thing in a Browser (filling 
in the form and pressing submit), the whole thing works. Does anybody have 
a clue why these tests fail (in Jetty as well as in Tomcat)? Another test 
in this class fetches the form and makes sure that no panelGrid-Tag is in 
the input? This test fails on Tomcat, but I don't get why this is wrong. 
The browser shows the form and I can enter data there. However Jetty sends 
a different HTML for the form. Does anybody know how this is achieved?

In addition I had a look into the JIRA for open Tomcat issues:

PAXWEB-513 seems already to be fixed (or I am getting the issue wrong) I 
can add multiple servlet mappings for the same servlet in web.xml with 
tomcat and they work just fine.

What does PAXWEB-628 mean? That Connector and Host entities can be 
configured via tomcat-server.xml? That would be part of PAXWEB-630.

Best regards
Stephan

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [pax-web][whiteboard] Warning on whiteboard bundle stop - cannot restart bundle.

2017-03-15 Thread Eben Stewart
I'd certainly like get to know the Pax code base better , but right now I'm 
not even sure where to look :D

On Wednesday, March 15, 2017 at 3:30:36 AM UTC-4, Achim Nierbeck wrote:
>
> Thanks for the jira ... will see when I have some time, 
> through we really love contributions ;) 
>
> regards, Achim 
>
>
> 2017-03-15 1:19 GMT+01:00 Eben Stewart  >:
>
>> https://ops4j1.jira.com/browse/PAXWEB-1077
>>
>>
>> On Tuesday, March 14, 2017 at 8:10:16 PM UTC-4, Eben Stewart wrote:
>>>
>>> same thing - I'll open a Jira for it. 
>>>
>>> Makes development really challenging every time you make a change to 
>>> have to restart the whole framework :D
>>>
>>>
>>>
>>> On Tuesday, March 14, 2017 at 6:53:00 PM UTC-4, Achim Nierbeck wrote:

 Hi, 

 in fact there is :-) 
 for a maven project it's

 
 
 ops4j.sonatype.snapshots.deploy
 OPS4J snapshot repository
 
 https://oss.sonatype.org/content/repositories/ops4j-snapshots/
 
 false
 
 
 true
 
 

 regards, Achim 

 2017-03-14 21:53 GMT+01:00 Eben Stewart :

> thanks :)
>
> tested and recreated with 6.0.3-SNAPSHOT bundles
>
> However, I am getting build error for pax-web-jetty-bundle (all other 
> artifacts built fine from a fresh git clone), so I can't be sure if the 
> 6.0.2 version of that is valid to test with.  Is there a compiled version 
> of pax-web-jetty-bundle artifact available somewhere?
>
> I'll make sure to backtrack and do a fresh install of Karaf to get 
> steps to recreate for Jira purposes
>
> On Tuesday, March 14, 2017 at 10:26:34 AM UTC-4, Achim Nierbeck wrote:
>>
>> You should have received an invitation for jira. 
>> Welcome aboard. 
>>
>> regards, Achim 
>>
>>
>> 2017-03-14 15:19 GMT+01:00 Eben Stewart :
>>
>>> Will do.  Do I need to make a separate request for Jira access?
>>>
>>> --
>>> --
>>> --
>>> OPS4J - http://www.ops4j.org - op...@googlegroups.com
>>>
>>> ---
>>> You received this message because you are subscribed to the Google 
>>> Groups "OPS4J" group.
>>> To unsubscribe from this group and stop receiving emails from it, 
>>> send an email to ops4j+un...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> -- 
>>
>> Apache Member
>> Apache Karaf  Committer & PMC
>> OPS4J Pax Web  
>> Committer & Project Lead
>> blog 
>> Co-Author of Apache Karaf Cookbook 
>>
>> Software Architect / Project Manager / Scrum Master 
>>
>> -- 
> -- 
> --
> OPS4J - http://www.ops4j.org - op...@googlegroups.com
>
> --- 
> You received this message because you are subscribed to the Google 
> Groups "OPS4J" group.
> To unsubscribe from this group and stop receiving emails from it, send 
> an email to ops4j+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



 -- 

 Apache Member
 Apache Karaf  Committer & PMC
 OPS4J Pax Web  
 Committer & Project Lead
 blog 
 Co-Author of Apache Karaf Cookbook 

 Software Architect / Project Manager / Scrum Master 

 -- 
>> -- 
>> --
>> OPS4J - http://www.ops4j.org - op...@googlegroups.com 
>>
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "OPS4J" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to ops4j+un...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
>
> Apache Member
> Apache Karaf  Committer & PMC
> OPS4J Pax Web  Committer & 
> Project Lead
> blog 
> Co-Author of Apache Karaf Cookbook 
>
> Software Architect / Project Manager / Scrum Master 
>
>

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: PAX Wicket 4

2017-03-15 Thread nino martinez wael
Hi Again

I have almost everything working:

But the felix test are still failing, im not sure of the org/osgi/dto/DTO 
should be provided from the standard felix framework or it should be 
explicit importet?

org.ops4j.pax.web.pax-web-jetty-bundle[org.ops4j.pax.web.service.jetty.internal.JettyServerImpl]
 
: Pax Web available at [0.0.0.0]:[9081]
ERROR: [org.ops4j.pax.web.service.internal.WhiteboardDtoService(0)] Error 
during instantiation of the implementation object
java.lang.NoClassDefFoundError: org/osgi/dto/DTO
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)


On Monday, March 13, 2017 at 10:51:16 AM UTC+1, nino martinez wael wrote:
>
> Hi Everybody..
>
> IF no one vetos, I will be releasing pax wicket 4 as in 
>
> https://github.com/ops4j/org.ops4j.pax.wicket/tree/v4.x.y
>
> I will make the felix tests pass first though.. 
>
> Regards nino
>

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.