Re: PAX WEB filter static resources

2018-04-25 Thread Maurice Betzel
Oh dear,
i have overseen my websocket connection taking over after the first 
handshake. How to filter that?

-- 
-- 
--
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 filter static resources

2018-04-24 Thread Maurice Betzel
Dear community,

i am trying to obfuscate out certain paths in my produced HTML.
For the primary response i use a filter successfully, and then the browser 
starts calling js / css and other static content from the default  Jetty 
Servlet with the obfuscated URLs.
These calls obviously run into a 404 and i cannot get my filter to catch 
these calls for de-obfuscating.
I tried several filter types but i seem to be missing something:

@Component(
scope = ServiceScope.PROTOTYPE,
service = Filter.class,
property = {
HttpWhiteboardConstants.HTTP_WHITEBOARD_FILTER_PATTERN + 
"=/*.js",
HttpWhiteboardConstants.HTTP_WHITEBOARD_FILTER_NAME + 
"=StaticFilter"
}
)

-- 
-- 
--
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 7.0.0 / Karaf 4.2.0 / Jetty 9.4.6 / Vaadin 8.3.3 / Atmosphere 2.4.11 immidiate expire

2018-04-22 Thread Maurice Betzel
On DEBUG i found:

2018-04-22T17:25:35,931 | DEBUG | qtp2091238232-110 | 
HttpChannel  | 310 - org.eclipse.jetty.util - 
9.4.6.v20170531 | 
HttpChannelOverHttp@16dcd7fc{r=5,c=false,a=DISPATCHED,uri=//localhost:8181/service/UIDL/?v-uiId=0}
 
action DISPATCH
2018-04-22T17:25:35,931 | DEBUG | qtp2091238232-111 | 
HttpServiceContext   | 318 - org.ops4j.pax.web.pax-web-jetty - 
8.0.0.SNAPSHOT | getting real path: [/PUSH]
2018-04-22T17:25:35,931 | DEBUG | qtp2091238232-110 | 
Server   | 310 - org.eclipse.jetty.util - 
9.4.6.v20170531 | REQUEST POST /service/UIDL/ on 
HttpChannelOverHttp@16dcd7fc{r=5,c=false,a=DISPATCHED,uri=//localhost:8181/service/UIDL/?v-uiId=0}
2018-04-22T17:25:35,931 | DEBUG | qtp2091238232-111 | 
HttpServiceContext   | 318 - org.ops4j.pax.web.pax-web-jetty - 
8.0.0.SNAPSHOT | getting resource: [/PUSH]
2018-04-22T17:25:35,931 | DEBUG | qtp2091238232-110 | 
ServerModel  | 320 - org.ops4j.pax.web.pax-web-spi - 
8.0.0.SNAPSHOT | Matching [/service/UIDL/]...
2018-04-22T17:25:35,931 | DEBUG | qtp2091238232-111 | 
HttpServiceContext   | 318 - org.ops4j.pax.web.pax-web-jetty - 
8.0.0.SNAPSHOT | not a URL or invalid URL: [/PUSH], treating as a file path
2018-04-22T17:25:35,931 | DEBUG | qtp2091238232-110 | 
ServerModel  | 320 - org.ops4j.pax.web.pax-web-spi - 
8.0.0.SNAPSHOT | Path [/service/UIDL/] matched to 
{pattern=/service/.*,model=ServletModel{id=org.ops4j.pax.web.service.spi.model.ServletModel-12,name=org.ops4j.pax.web.service.spi.model.ServletModel-12,urlPatterns=[/service/*],alias=null,servlet=net.betzel.osgi.karaf.vaadin.service.VaadinUI$MyUIServlet@75ad079d,initParams={org.atmosphere.websocket.maxIdleTime=60,
 
org.atmosphere.websocket.suppressJSR356=true, 
Resources=/vaadin-8.3.3},context=ContextModel{id=org.ops4j.pax.web.service.spi.model.ContextModel-11,name=,httpContext=DefaultHttpContext
 
[bundle=net.betzel.osgi.karaf.vaadin.service [342], 
contextID=default],contextParams={},virtualHosts={},connectors={
2018-04-22T17:25:35,931 | DEBUG | qtp2091238232-111 | 
DefaultHttpContext   | 319 - org.ops4j.pax.web.pax-web-runtime 
- 8.0.0.SNAPSHOT | Searching bundle [net.betzel.osgi.karaf.vaadin.service 
[342]] for resource [PUSH]
2018-04-22T17:25:35,931 | DEBUG | qtp2091238232-110 | 
ContextHandler   | 310 - org.eclipse.jetty.util - 
9.4.6.v20170531 | scope null||/service/UIDL/ @ 
HttpServiceContext{httpContext=DefaultHttpContext 
[bundle=net.betzel.osgi.karaf.vaadin.service [342], contextID=default]}
2018-04-22T17:25:35,931 | DEBUG | qtp2091238232-111 | 
HttpServiceContext   | 318 - org.ops4j.pax.web.pax-web-jetty - 
8.0.0.SNAPSHOT | found resource: null

I think the PUSH resource should not be NULL?

-- 
-- 
--
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 7.0.0 / Karaf 4.2.0 / Jetty 9.4.6 / Vaadin 8.3.3 / Atmosphere 2.4.11 immidiate expire

2018-04-22 Thread Maurice Betzel
Retried with Pax Web 8.0.0-SNAPSHOT getting the same immediate session 
timeout.

-- 
-- 
--
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 7.0.0 / Karaf 4.2.0 / Jetty 9.4.6 / Vaadin 8.3.3 / Atmosphere 2.4.11 immidiate expire

2018-04-22 Thread Maurice Betzel
Running a plain Karaf 4.2.0 on Windows 10 x64 with Java version 
"1.8.0_131", example project on github:

https://github.com/Maurice-Betzel/vaadin-osgi-jetty-session-bug

On activation of the Server push, the immediate session timeout starts 
occuring.
I guess it has to do with the fact that Pax Web 7.0.0 is not yet ready for 
the new Jetty 9.4.x session handling, see 8.0.0-SNAPSHOT:

[PAXWEB-1095] Upgrade to Jetty 9.4.x 


Am Freitag, 20. April 2018 17:23:43 UTC+2 schrieb Christian Schneider:
>
> Can you provide a sample project that shows the problem?
>
> Christian
>
> 2018-04-20 17:17 GMT+02:00 Maurice Betzel <betze...@gmail.com 
> >:
>
>>
>> <https://lh3.googleusercontent.com/-d1RCALCIILA/WtoEKFBVm-I/Bwc/DFs27_wAf-wKlRzI_RYYMnv2qlAqXCRhQCLcBGAs/s1600/Capture.JPG>
>> Pax Web 7.0.0 / Karaf 4.2.0 / Vaadin 8.3.3 / Atmosphere 2.4.11
>> Vaadin UI is expiring immediately running the above configuration.
>> If i use Karaf 4.1.2 with Pax Web 6.0.9 and Jetty 4.3.x all works well, 
>> now for the strange part:
>>
>> I checked out Pax Web from github and atttached a debugger to Karaf. 
>> After attachment the expire error is gone.
>> If a remove the debugger the webpage expires again immediately.
>>
>> Any ideas :)
>>
>>
>> -- 
>> -- 
>> --
>> 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.
>>
>
>
>
> -- 
> -- 
> Christian Schneider
> http://www.liquid-reality.de
>
> Computer Scientist
> http://www.adobe.com
>
>

-- 
-- 
--
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 7.0.0 / Karaf 4.2.0 / Jetty 9.4.6 / Vaadin 8.3.3 / Atmosphere 2.4.11 immidiate expire

2018-04-20 Thread Maurice Betzel



Pax Web 7.0.0 / Karaf 4.2.0 / Vaadin 8.3.3 / Atmosphere 2.4.11
Vaadin UI is expiring immediately running the above configuration.
If i use Karaf 4.1.2 with Pax Web 6.0.9 and Jetty 4.3.x all works well, now 
for the strange part:

I checked out Pax Web from github and atttached a debugger to Karaf. After 
attachment the expire error is gone.
If a remove the debugger the webpage expires again immediately.

Any ideas :)


-- 
-- 
--
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-HTTP-WHITEBOARD hangs on Karaf 4.1.2

2018-03-01 Thread Maurice Betzel
Just returned from my Holidays and tried Karaf 4.1.5 having upgrades 
toJLine 3.6.0 and Jansi 1.17.
Pax Web 6.1.2 now installs perfectly.

-- 
-- 
--
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 default and error handler override

2018-02-07 Thread Maurice Betzel
Question, can i register a camel servlet on the pax web blueprint services?
Now i am using:

Code hier eingeben...
















http://camel.apache.org/schema/blueprint;>







-- 
-- 
--
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 default and error handler override

2018-02-06 Thread Maurice Betzel
...or set my error page on the ErrorPageErrorHandler?

Am Dienstag, 6. Februar 2018 14:30:43 UTC+1 schrieb Maurice Betzel:
>
> How do i remove the ErrorPageErrorHandler from my default context?
>

-- 
-- 
--
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 default and error handler override

2018-02-06 Thread Maurice Betzel
How do i remove the ErrorPageErrorHandler from my default context?

-- 
-- 
--
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 default and error handler override

2018-02-06 Thread Maurice Betzel
I have added my own error handler with addBean and i can see it on the 
Server object, but in the Jetty Response object on method sendError the 
ErrorHandler.getErrorHandler returns the Jetty ErrorPageErrorHandler. I am 
missing something more...

-- 
-- 
--
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 default and error handler override

2018-02-06 Thread Maurice Betzel
Adding my own error handler...

Am Dienstag, 6. Februar 2018 11:33:24 UTC+1 schrieb Grzegorz Grzybek:
>
> I think there's separate default handler and error handler.
> In case you have servlets, servlet may provide error pages definitions for 
> given exceptions and/or HTTP error codes.
>
> regards
> Grzegorz
>
> 2018-02-06 11:28 GMT+01:00 Maurice Betzel <betze...@gmail.com 
> >:
>
>> I am hitting the Jetty
>>
>> org.eclipse.jetty.server.handler.ErrorHandler
>>
>>
>> Am Dienstag, 6. Februar 2018 11:23:16 UTC+1 schrieb Maurice Betzel:
>>>
>>> If you take a look at
>>>
>>> org.eclipse.jetty.server.Response method sendError
>>>
>>>
>>>
>>> you will see Jetty is returning the default error web page if no error 
>>> handler is set :( . For my understanding it should pick up my default 
>>> handler for producing the page.
>>> Can i set the error handler to point to my default handler?
>>>
>>> Am Dienstag, 6. Februar 2018 11:07:38 UTC+1 schrieb Grzegorz Grzybek:
>>>>
>>>> And the error handler is NOT the one you wanted to set? I don't see any 
>>>> custom ErrorHandler in your jetty.xml...
>>>>
>>>> ~Grzegorz
>>>>
>>>> 2018-02-06 11:03 GMT+01:00 Maurice Betzel <betze...@gmail.com>:
>>>>
>>>>> Camel is calling the method after not finding any matching consumer:
>>>>>
>>>>> response.sendError(HttpServletResponse.SC_NOT_FOUND);
>>>>>
>>>>>
>>>>> and just returns the thread, meaning the Response produced by Jetty 
>>>>> has the default Jetty exception page set somewhere.
>>>>>
>>>>>
>>>>> Am Dienstag, 6. Februar 2018 10:49:22 UTC+1 schrieb Maurice Betzel:
>>>>>>
>>>>>> I am getting to the point here :), in the
>>>>>>
>>>>>> org.eclipse.jetty.servlet.ServletHolder.class
>>>>>>
>>>>>>
>>>>>> i am hitting method handle on line 571 calling the 
>>>>>> CamelHttpTransportServlet:
>>>>>>
>>>>>> servlet.service(request, response);
>>>>>>
>>>>>>
>>>>>> Before the call the request reports not handled and the response 
>>>>>> object does not have a writer yet. If it returns from Camel _handled is 
>>>>>> true and the response object has a writer set containing the default 
>>>>>> Jetty 
>>>>>> html page. where did this come from?
>>>>>>
>>>>>>  Dienstag, 6. Februar 2018 10:37:48 UTC+1 schrieb Grzegorz Grzybek:
>>>>>>>
>>>>>>> Hello
>>>>>>>
>>>>>>> Hmm, I see your case is quite complex - is there a chance you 
>>>>>>> prepare integration test in 
>>>>>>> pax-web-itests/pax-web-itests-container/pax-web-itests-container-jetty?
>>>>>>>
>>>>>>> I'd have to try to reproduce your issue, but I have to know what 
>>>>>>> other web bundles / wars you have installed - maybe you also have some 
>>>>>>> whiteboard services or plain httpService.registerServlet() calls?
>>>>>>>
>>>>>>> regards
>>>>>>> Grzegorz Grzybek
>>>>>>>
>>>>>>> 2018-02-06 10:28 GMT+01:00 Maurice Betzel <betze...@gmail.com>:
>>>>>>>
>>>>>>>> No, it did not. Jetty is producing the response using the default 
>>>>>>>> Jetty handler.
>>>>>>>>
>>>>>>>>
>>>>>>>> Am Dienstag, 6. Februar 2018 09:49:55 UTC+1 schrieb Maurice Betzel:
>>>>>>>>>
>>>>>>>>> My default handler gets hit on 
>>>>>>>>> https://somehost/api/rest/existingcontext/nonexistingcontext, but 
>>>>>>>>> reports that the base request was handled and the response was 
>>>>>>>>> committed. 
>>>>>>>>> Did the Camel servlet handle the error before my default handler?
>>>>>>>>>
>>>>>>>> -- 
>>>>>>>> -- 
>>>>>>>> --
>>>>>>>> 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.
>>>>>>>>
>>>>>>>
>>>>>>> -- 
>>>>> -- 
>>>>> --
>>>>> 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.
>>>>>
>>>>
>>>> -- 
>> -- 
>> --
>> 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.
>>
>
>

-- 
-- 
--
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 default and error handler override

2018-02-06 Thread Maurice Betzel
I am hitting the Jetty

org.eclipse.jetty.server.handler.ErrorHandler


Am Dienstag, 6. Februar 2018 11:23:16 UTC+1 schrieb Maurice Betzel:
>
> If you take a look at
>
> org.eclipse.jetty.server.Response method sendError
>
>
>
> you will see Jetty is returning the default error web page if no error 
> handler is set :( . For my understanding it should pick up my default 
> handler for producing the page.
> Can i set the error handler to point to my default handler?
>
> Am Dienstag, 6. Februar 2018 11:07:38 UTC+1 schrieb Grzegorz Grzybek:
>>
>> And the error handler is NOT the one you wanted to set? I don't see any 
>> custom ErrorHandler in your jetty.xml...
>>
>> ~Grzegorz
>>
>> 2018-02-06 11:03 GMT+01:00 Maurice Betzel <betze...@gmail.com>:
>>
>>> Camel is calling the method after not finding any matching consumer:
>>>
>>> response.sendError(HttpServletResponse.SC_NOT_FOUND);
>>>
>>>
>>> and just returns the thread, meaning the Response produced by Jetty has 
>>> the default Jetty exception page set somewhere.
>>>
>>>
>>> Am Dienstag, 6. Februar 2018 10:49:22 UTC+1 schrieb Maurice Betzel:
>>>>
>>>> I am getting to the point here :), in the
>>>>
>>>> org.eclipse.jetty.servlet.ServletHolder.class
>>>>
>>>>
>>>> i am hitting method handle on line 571 calling the 
>>>> CamelHttpTransportServlet:
>>>>
>>>> servlet.service(request, response);
>>>>
>>>>
>>>> Before the call the request reports not handled and the response object 
>>>> does not have a writer yet. If it returns from Camel _handled is true and 
>>>> the response object has a writer set containing the default Jetty html 
>>>> page. where did this come from?
>>>>
>>>>  Dienstag, 6. Februar 2018 10:37:48 UTC+1 schrieb Grzegorz Grzybek:
>>>>>
>>>>> Hello
>>>>>
>>>>> Hmm, I see your case is quite complex - is there a chance you prepare 
>>>>> integration test in 
>>>>> pax-web-itests/pax-web-itests-container/pax-web-itests-container-jetty?
>>>>>
>>>>> I'd have to try to reproduce your issue, but I have to know what other 
>>>>> web bundles / wars you have installed - maybe you also have some 
>>>>> whiteboard 
>>>>> services or plain httpService.registerServlet() calls?
>>>>>
>>>>> regards
>>>>> Grzegorz Grzybek
>>>>>
>>>>> 2018-02-06 10:28 GMT+01:00 Maurice Betzel <betze...@gmail.com>:
>>>>>
>>>>>> No, it did not. Jetty is producing the response using the default 
>>>>>> Jetty handler.
>>>>>>
>>>>>>
>>>>>> Am Dienstag, 6. Februar 2018 09:49:55 UTC+1 schrieb Maurice Betzel:
>>>>>>>
>>>>>>> My default handler gets hit on 
>>>>>>> https://somehost/api/rest/existingcontext/nonexistingcontext, but 
>>>>>>> reports that the base request was handled and the response was 
>>>>>>> committed. 
>>>>>>> Did the Camel servlet handle the error before my default handler?
>>>>>>>
>>>>>> -- 
>>>>>> -- 
>>>>>> --
>>>>>> 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.
>>>>>>
>>>>>
>>>>> -- 
>>> -- 
>>> --
>>> 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.
>>>
>>
>>

-- 
-- 
--
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 default and error handler override

2018-02-06 Thread Maurice Betzel
If you take a look at

org.eclipse.jetty.server.Response method sendError



you will see Jetty is returning the default error web page if no error 
handler is set :( . For my understanding it should pick up my default 
handler for producing the page.
Can i set the error handler to point to my default handler?

Am Dienstag, 6. Februar 2018 11:07:38 UTC+1 schrieb Grzegorz Grzybek:
>
> And the error handler is NOT the one you wanted to set? I don't see any 
> custom ErrorHandler in your jetty.xml...
>
> ~Grzegorz
>
> 2018-02-06 11:03 GMT+01:00 Maurice Betzel <betze...@gmail.com 
> >:
>
>> Camel is calling the method after not finding any matching consumer:
>>
>> response.sendError(HttpServletResponse.SC_NOT_FOUND);
>>
>>
>> and just returns the thread, meaning the Response produced by Jetty has 
>> the default Jetty exception page set somewhere.
>>
>>
>> Am Dienstag, 6. Februar 2018 10:49:22 UTC+1 schrieb Maurice Betzel:
>>>
>>> I am getting to the point here :), in the
>>>
>>> org.eclipse.jetty.servlet.ServletHolder.class
>>>
>>>
>>> i am hitting method handle on line 571 calling the 
>>> CamelHttpTransportServlet:
>>>
>>> servlet.service(request, response);
>>>
>>>
>>> Before the call the request reports not handled and the response object 
>>> does not have a writer yet. If it returns from Camel _handled is true and 
>>> the response object has a writer set containing the default Jetty html 
>>> page. where did this come from?
>>>
>>>  Dienstag, 6. Februar 2018 10:37:48 UTC+1 schrieb Grzegorz Grzybek:
>>>>
>>>> Hello
>>>>
>>>> Hmm, I see your case is quite complex - is there a chance you prepare 
>>>> integration test in 
>>>> pax-web-itests/pax-web-itests-container/pax-web-itests-container-jetty?
>>>>
>>>> I'd have to try to reproduce your issue, but I have to know what other 
>>>> web bundles / wars you have installed - maybe you also have some 
>>>> whiteboard 
>>>> services or plain httpService.registerServlet() calls?
>>>>
>>>> regards
>>>> Grzegorz Grzybek
>>>>
>>>> 2018-02-06 10:28 GMT+01:00 Maurice Betzel <betze...@gmail.com>:
>>>>
>>>>> No, it did not. Jetty is producing the response using the default 
>>>>> Jetty handler.
>>>>>
>>>>>
>>>>> Am Dienstag, 6. Februar 2018 09:49:55 UTC+1 schrieb Maurice Betzel:
>>>>>>
>>>>>> My default handler gets hit on 
>>>>>> https://somehost/api/rest/existingcontext/nonexistingcontext, but 
>>>>>> reports that the base request was handled and the response was 
>>>>>> committed. 
>>>>>> Did the Camel servlet handle the error before my default handler?
>>>>>>
>>>>> -- 
>>>>> -- 
>>>>> --
>>>>> 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.
>>>>>
>>>>
>>>> -- 
>> -- 
>> --
>> 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.
>>
>
>

-- 
-- 
--
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 default and error handler override

2018-02-06 Thread Maurice Betzel
Camel is calling the method after not finding any matching consumer:

response.sendError(HttpServletResponse.SC_NOT_FOUND);


and just returns the thread, meaning the Response produced by Jetty has the 
default Jetty exception page set somewhere.

Am Dienstag, 6. Februar 2018 10:49:22 UTC+1 schrieb Maurice Betzel:
>
> I am getting to the point here :), in the
>
> org.eclipse.jetty.servlet.ServletHolder.class
>
>
> i am hitting method handle on line 571 calling the 
> CamelHttpTransportServlet:
>
> servlet.service(request, response);
>
>
> Before the call the request reports not handled and the response object 
> does not have a writer yet. If it returns from Camel _handled is true and 
> the response object has a writer set containing the default Jetty html 
> page. where did this come from?
>
>  Dienstag, 6. Februar 2018 10:37:48 UTC+1 schrieb Grzegorz Grzybek:
>>
>> Hello
>>
>> Hmm, I see your case is quite complex - is there a chance you prepare 
>> integration test in 
>> pax-web-itests/pax-web-itests-container/pax-web-itests-container-jetty?
>>
>> I'd have to try to reproduce your issue, but I have to know what other 
>> web bundles / wars you have installed - maybe you also have some whiteboard 
>> services or plain httpService.registerServlet() calls?
>>
>> regards
>> Grzegorz Grzybek
>>
>> 2018-02-06 10:28 GMT+01:00 Maurice Betzel <betze...@gmail.com>:
>>
>>> No, it did not. Jetty is producing the response using the default Jetty 
>>> handler.
>>>
>>>
>>> Am Dienstag, 6. Februar 2018 09:49:55 UTC+1 schrieb Maurice Betzel:
>>>>
>>>> My default handler gets hit on 
>>>> https://somehost/api/rest/existingcontext/nonexistingcontext, but 
>>>> reports that the base request was handled and the response was committed. 
>>>> Did the Camel servlet handle the error before my default handler?
>>>>
>>> -- 
>>> -- 
>>> --
>>> 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.
>>>
>>
>>

-- 
-- 
--
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 default and error handler override

2018-02-06 Thread Maurice Betzel
I am getting to the point here :), in the

org.eclipse.jetty.servlet.ServletHolder.class


i am hitting method handle on line 571 calling the 
CamelHttpTransportServlet:

servlet.service(request, response);


Before the call the request reports not handled and the response object 
does not have a writer yet. If it returns from Camel _handled is true and 
the response object has a writer set containing the default Jetty html 
page. where did this come from?

 Dienstag, 6. Februar 2018 10:37:48 UTC+1 schrieb Grzegorz Grzybek:
>
> Hello
>
> Hmm, I see your case is quite complex - is there a chance you prepare 
> integration test in 
> pax-web-itests/pax-web-itests-container/pax-web-itests-container-jetty?
>
> I'd have to try to reproduce your issue, but I have to know what other web 
> bundles / wars you have installed - maybe you also have some whiteboard 
> services or plain httpService.registerServlet() calls?
>
> regards
> Grzegorz Grzybek
>
> 2018-02-06 10:28 GMT+01:00 Maurice Betzel <betze...@gmail.com 
> >:
>
>> No, it did not. Jetty is producing the response using the default Jetty 
>> handler.
>>
>>
>> Am Dienstag, 6. Februar 2018 09:49:55 UTC+1 schrieb Maurice Betzel:
>>>
>>> My default handler gets hit on 
>>> https://somehost/api/rest/existingcontext/nonexistingcontext, but 
>>> reports that the base request was handled and the response was committed. 
>>> Did the Camel servlet handle the error before my default handler?
>>>
>> -- 
>> -- 
>> --
>> 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.
>>
>
>

-- 
-- 
--
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 default and error handler override

2018-02-06 Thread Maurice Betzel
No, it did not. Jetty is producing the response using the default Jetty 
handler.

Am Dienstag, 6. Februar 2018 09:49:55 UTC+1 schrieb Maurice Betzel:
>
> My default handler gets hit on 
> https://somehost/api/rest/existingcontext/nonexistingcontext, but reports 
> that the base request was handled and the response was committed. Did the 
> Camel servlet handle the error before my default handler?
>

-- 
-- 
--
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 default and error handler override

2018-02-06 Thread Maurice Betzel
My default handler gets hit on 
https://somehost/api/rest/existingcontext/nonexistingcontext, but reports 
that the base request was handled and the response was committed. Did the 
Camel servlet handle the error before my default handler?

-- 
-- 
--
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 default and error handler override

2018-02-06 Thread Maurice Betzel
Following sutuation, if i add my default handler it gets picked up until 
the alias of an other context takes over. Then the default handler of Jetty 
takes over again e.g. https://somehost/nonexistingcontext returns my 
default handler and 
https://somehost/api/rest/existingcontext/nonexistingcontext returns the 
Jetty default handler (https://somehost/api/rest/existingcontext hits my 
app). Where does this default handler come from? My bundle fragment Jetty 
XML:


http://www.eclipse.org/jetty/configure_9_0.dtd;>










https






32768
8192
8192
true
false
512












karaf
karaf


org.apache.karaf.jaas.boot.principal.RolePrincipal









default
karaf


org.apache.karaf.jaas.boot.principal.RolePrincipal
















































/etc/somekeystore.jks

xxx
xxx










SSLv3






/etc/secondkeystore.jks

xxx
xxx










SSLv3




SSL_RSA_WITH_DES_CBC_SHA
SSL_DHE_RSA_WITH_DES_CBC_SHA
SSL_DHE_DSS_WITH_DES_CBC_SHA
SSL_RSA_EXPORT_WITH_RC4_40_MD5
SSL_RSA_EXPORT_WITH_DES40_CBC_SHA
SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA
SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA




















http/1.1














127.0.0.1:8443









































http/1.1














127.0.0.1:8444




























If i replace the handler collection i break pax web and cannot register 
further handlers:



Re: pax web default and error handler override

2018-02-05 Thread Maurice Betzel
Revoking this posting, in a context higherup in the tree Jetty serves the 
Jetty default again. I need to remove this default jetty handler...

Am Montag, 5. Februar 2018 13:58:33 UTC+1 schrieb Maurice Betzel:
>
> Its working, i have copied the default handler from Jetty and it gets hit 
> by the debugger. Now i have to change the response, favicon etc...
>

-- 
-- 
--
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 default and error handler override

2018-02-05 Thread Maurice Betzel
I did get hold of the WebContainer, but the HttpServiceStarted object was 
not reachable because of package encapsulation. This is the object that has 
a reference to the Jetty Server object containing the needed methods.
Will try the fragment solution now, there is a example in the samples 
folder to get started with.

-- 
-- 
--
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 default and error handler override

2018-02-05 Thread Maurice Betzel
Moin Grzegor,

i did get the default handler (aka "/") working by blueprint (from the pax 
web samples dir), but this does not cover other http contexts further up in 
the context tree. I have some Camel routes running there and i would like 
to have one default exception and error page for all contexts. Jetty 
provides such a possibility by IoC in the Jetty XML where one can override 
the default classes, but due to OSGi class-loading Jetty will not find my 
overriding classes declared in a separate bundle.
At this moment i am looking at the "bundleContext.getServiceReference( 
"org.ops4j.pax.web.service.WebContainer" );" as it has a method 
registerErrorPage which with a null httpContext should use the default http 
context.
Or is there a way to register a bundle so that Jetty wil find it by its 
jetty.xml?

-- 
-- 
--
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 default and error handler override

2018-02-04 Thread Maurice Betzel
Dear community,

what is the best way to override the Jetty default 
org.eclipse.jetty.server.handler.DefaultHandler and ErrorHandler?
By jetty.xml DI configuration or can this be done by pax web services, and 
if yes are there any examples?
Other suggestions also welcome.

-- 
-- 
--
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-HTTP-WHITEBOARD hangs on Karaf 4.1.2

2018-01-12 Thread Maurice Betzel
OK, just tested 6.1.1 with the same result. It seems as jline is blocking.
I can type text on the console but the commands are ignored, the cursor has 
other strange behavior as well, like not shutting down Karaf with ctrl.
If i drop a bundle in the deploy folder it gets deployed as usual. After a 
hard kill and restart the deployed bundle are present as is pax-web 6.1.1.
Now everything is working as expected.

-- 
-- 
--
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.


New Jira account

2017-09-21 Thread Maurice Betzel
Willing to report a PAX-JDBC issue therefore needing a account.

-- 
-- 
--
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: [OPS4J JDBC] javax.persistence.TransactionRequiredException: no transaction is in progress on local TX

2017-08-26 Thread Maurice Betzel
The solution i found sofar:

Get the TransactionManagerFactory With this TransactionManagerFactory i 
create a Spring JPA Platformtransactionmanager, which gets inserted in a 
Camel SpringTransactionPolicy.





















This setup does createEntityManager(), doBegin() ect. on behalf of the 
Camel route.
For persistence in mid route i call the OSGi service method using the in 
route created EntityManager:

@Override
public void persistDetectingDuplicatesMSSQL(WellspectAuftragsDatei 
wellspectAuftragsDatei, EntityManager entityManager) {
entityManager.persist(wellspectAuftragsDatei);

etc...


Notice i disabled @Transactional to avoid Aries byte weaving this method, 
effectively deactivating Aries on this method call.
Extracting the, by this thread created, EntityManager from the 
EnityManagerFactory needed some research in Spring and is handled within 
the DaoProcessor:

EntityManager entityManager = 
EntityManagerFactoryUtils.getTransactionalEntityManager(entityManagerFactory);




-- 
-- 
--
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.


[OPS4J JDBC] javax.persistence.TransactionRequiredException: no transaction is in progress on local TX

2017-08-23 Thread Maurice Betzel
Dear community, i think i have a issue wiring up Spring(Blueprint) / 
Hibernate / JPA / OPS4J JDBC / Camel, using:


   1. Karaf 4.0.8 (Felix)
   2. Servicemix Spring 3.2.17
   3. Aries JPA 2.3.0
   4. Hibernate 4.3.6
   5. OPS4J Pax JDBC 0.9.0
   6. Camel 2.16.5
   
The problem occurs when running a camel route using transaction demarcation 
on it giving a javax.persistence.TransactionRequiredException: no 
transaction is in progress.


Persistence unit



org.hibernate.jpa.HibernatePersistenceProvider

osgi:service/javax.sql.DataSource/(osgi.jndi.service.name=pydio2xbound-mssql)
de.hmm.medit.esb.xbound.pydio2xbound.some.classes
true










DAO context:



http://www.osgi.org/xmlns/blueprint/v1.0.0;
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
   xmlns:jpa="http://aries.apache.org/xmlns/jpa/v2.0.0;
   xmlns:tx="http://aries.apache.org/xmlns/transactions/v2.0.0;
   xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 
https://osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
   http://aries.apache.org/xmlns/jpa/v2.0.0 
http://aries.apache.org/schemas/jpa/jpa_200.xsd;>










DAO service:


public class Dao implements DaoService {

@PersistenceContext(unitName = UNIT_NAME_MSSQL)
EntityManager entityManagerMSSQL;

@Transactional(Transactional.TxType.REQUIRED)
@Override
public void persist(AuftragsDatei auftragsDatei) {
entityManagerMSSQL.persist(auftragsDatei);
...etc...


OPS4J Persistence config file:


dataSourceName=pydio2xbound-mssql
databaseName=pydio2xbound
osgi.jdbc.driver.name=mssql-pool
url=jdbc:sqlserver://127.0.0.1:1433
user=root
password=
jdbc.pool.maxTotal=4
#jdbc.factory.defaultAutoCommit=false


Karaf list datasource:


^karaf@root>service:list DataSource
[javax.sql.DataSource]
--
 databaseName = pydio2xbound
 dataSourceName = pydio2xbound-mssql
 felix.fileinstall.filename = 
file:/E:/Development/karaf/medit-esb-1.3.1-SNAPSHOT/etc/org.ops4j.datasource-xbound.pydio2xbound.mssql.persistence.cfg
 jdbc.pool.maxTotal = 4
 osgi.jdbc.driver.name = mssql-pool
 osgi.jndi.service.name = pydio2xbound-mssql
 password = *
 service.bundleid = 252
 service.factoryPid = org.ops4j.datasource
 service.id = 271
 service.pid = org.ops4j.datasource.0025c61e-c8d5-451f-91e5-f1258d806ce5
 service.scope = singleton
 url = jdbc:sqlserver://127.0.0.1:1433
 user = root
Provided by :
 OPS4J Pax JDBC Config (252)
Used by:
 Apache Aries JPA container (236)


Spring / Camel context:















http://camel.apache.org/schema/blueprint;>






GET



cxfrs:bean:dynamicClient?address=${in.header.CamelHttpUri}



${body}


 ${body.auftragsDatei}


<...some more routing...>




Complete stacktrace:


2017-08-23 16:43:00,070 | DEBUG | 4 - timer://rest | 
> aggregation  | 48 - org.apache.camel.camel-core - 
> 2.16.5 | Processing file : 
> https://transfer.zhp-online.de/pydio/api/v2/io/my-files/excel/Auftrags%2520daten_20170504-8.csv
> 2017-08-23 16:43:00,070 | DEBUG | 4 - timer://rest | 
> DataSourceTransactionManager | 157 - 
> org.apache.servicemix.bundles.spring-tx - 3.2.17.RELEASE_1 | Creating new 
> transaction with name [null]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT
> 2017-08-23 16:43:00,070 | DEBUG | 4 - timer://rest | 
> DataSourceTransactionManager | 157 - 
> org.apache.servicemix.bundles.spring-tx - 3.2.17.RELEASE_1 | Acquired 
> Connection [1735559577, 
> URL=jdbc:sqlserver://127.0.0.1:1433;authenticationScheme=nativeAuthentication;xopenStates=false;sendTimeAsDatetime=true;trustServerCertificate=false;sendStringParametersAsUnicode=true;selectMethod=direct;responseBuffering=adaptive;packetSize=8000;multiSubnetFailover=false;loginTimeout=15;lockTimeout=-1;lastUpdateCount=true;encrypt=false;disableStatementPooling=true;databaseName=pydio2xbound;applicationName=Microsoft
>  
> JDBC Driver for SQL Server;applicationIntent=readwrite;, UserName=root, 
> Microsoft JDBC Driver 4.1 for SQL Server] for JDBC transaction
> 2017-08-23 16:43:00,070 | DEBUG | 4 - timer://rest | 
> DataSourceTransactionManager | 157 - 
> org.apache.servicemix.bundles.spring-tx - 3.2.17.RELEASE_1 | Switching JDBC 
> Connection [1735559577, 
> URL=jdbc:sqlserver://127.0.0.1:1433;authenticationScheme=nativeAuthentication;xopenStates=false;sendTimeAsDatetime=true;trustServerCertificate=false;sendStringParametersAsUnicode=true;selectMethod=direct;responseBuffering=adaptive;packetSize=8000;multiSubnetFailover=false;loginTimeout=15;lockTimeout=-1;lastUpdateCount=true;encrypt=false;disableStatementPooling=true;databaseName=pydio2xbound;applicationName=Microsoft
>  
> JDBC Driver for SQL Server;applicationIntent=readwrite;, UserName=root, 
> Microsoft JDBC Driver 4.1 for SQL Server] to manual commit
> 2017-08-23