RE: Unable to load custom web.xml for Pax Web in Karaf (4.4.1)

2022-11-11 Thread Prashanth Ettaboina
Hi,
Thank you Grzegorz for your response. It helped me.

Thanks,
Prashanth.

From: Prashanth Ettaboina
Sent: 10 November 2022 19:49
To: 'iss...@karaf.apache.org' ; 'dev@karaf.apache.org' 
; 'u...@karaf.apache.org' 
Subject: RE: Unable to load custom web.xml for Pax Web in Karaf (4.4.1)

Hi Grzybek,

Thank you for your response.

I do not have any jars in my /WEB-INF/lib, I do not have lib folder in my 
WEB-INF folder.

In my module I have a web.xml (/src/main/webapp/WEB-INF/web.xml) I'm building 
this module as a kar file and installing it into the karaf console.
I'm able to see my bundle getting started and getting active without any issue.
But I'm able to see the below log lines after installing the kar file.

2022-11-10T19:09:05.486+0530 CEF:1 | org.apache.karaf.features.core | 4.4.1 | 
INFO  | ID=19 THR=tures-3-thread-1 CAT=FeaturesServiceImpl  MSG=  
helloboard/51.0.0.SNAPSHOT
2022-11-10T19:09:05.506+0530 CEF:1 | org.ops4j.pax.web.pax-web-extender-war | 
8.0.6 | WARN  | ID=269 THR=tures-3-thread-1 CAT=WarExtenderContext  
 MSG=Web-ContextPath manifest header of helloboard [312] specifies invalid 
context path: helloboard. This bundle will not be processed.
2022-11-10T19:09:05.506+0530 CEF:1 | org.apache.karaf.features.core | 4.4.1 | 
INFO  | ID=19 THR=tures-3-thread-1 CAT=FeaturesServiceImpl  
MSG=Done.

When I try to access https://localhost:8443/helloboard/ server responded back 
with 404.

Below are the jetty logs when I try to access the above endpoint.

2022-11-10T19:39:46.391+0530 CEF:1 | org.eclipse.jetty.util | 9.4.48.v20220622 
| DEBUG | ID=243 THR=qtp501056700-863 CAT=HttpChannel  
MSG=REQUEST for //localhost:8443/helloboard on 
HttpChannelOverHttp@62fa25b0{s=HttpChannelState@2f46c6d1{s=IDLE rs=BLOCKING 
os=OPEN is=IDLE awp=false se=false i=true 
al=0},r=2,c=false/false,a=IDLE,uri=//localhost:8443/helloboard,age=0}
GET //localhost:8443/helloboard HTTP/1.1
Host: localhost:8443


2022-11-10T19:39:46.392+0530 CEF:1 | org.eclipse.jetty.util | 9.4.48.v20220622 
| DEBUG | ID=243 THR=qtp501056700-863 CAT=HttpChannel  
MSG=handle //localhost:8443/helloboard 
HttpChannelOverHttp@62fa25b0{s=HttpChannelState@2f46c6d1{s=IDLE rs=BLOCKING 
os=OPEN is=IDLE awp=false se=false i=true 
al=0},r=2,c=false/false,a=IDLE,uri=//localhost:8443/helloboard,age=0}
2022-11-10T19:39:46.392+0530 CEF:1 | org.eclipse.jetty.util | 9.4.48.v20220622 
| DEBUG | ID=243 THR=qtp501056700-863 CAT=HttpChannel  
MSG=action DISPATCH 
HttpChannelOverHttp@62fa25b0{s=HttpChannelState@2f46c6d1{s=HANDLING rs=BLOCKING 
os=OPEN is=IDLE awp=false se=false i=true 
al=0},r=2,c=false/false,a=HANDLING,uri=//localhost:8443/helloboard,age=1}
2022-11-10T19:39:46.392+0530 CEF:1 | org.eclipse.jetty.util | 9.4.48.v20220622 
| DEBUG | ID=243 THR=qtp501056700-863 CAT=SecureRequestCustomizer  
MSG=Host localhost with SNI null
2022-11-10T19:39:46.392+0530 CEF:1 | org.eclipse.jetty.util | 9.4.48.v20220622 
| DEBUG | ID=243 THR=qtp501056700-863 CAT=Server   
MSG=REQUEST GET /helloboard on 
HttpChannelOverHttp@62fa25b0{s=HttpChannelState@2f46c6d1{s=HANDLING rs=BLOCKING 
os=OPEN is=IDLE awp=false se=false i=true 
al=0},r=2,c=false/false,a=HANDLING,uri=https://localhost:8443/helloboard,age=1}
2022-11-10T19:39:46.393+0530 CEF:1 | org.eclipse.jetty.util | 9.4.48.v20220622 
| DEBUG | ID=243 THR=qtp501056700-863 CAT=ContextHandler   
MSG=scope null||/helloboard @ 
o.o.p.w.s.j.i.PaxWebServletContextHandler@52ee63a5{/,null,AVAILABLE}
2022-11-10T19:39:46.393+0530 CEF:1 | org.eclipse.jetty.util | 9.4.48.v20220622 
| DEBUG | ID=243 THR=qtp501056700-863 CAT=ContextHandler   
MSG=context=||/helloboard @ 
o.o.p.w.s.j.i.PaxWebServletContextHandler@52ee63a5{/,null,AVAILABLE}
2022-11-10T19:39:46.393+0530 CEF:1 | org.eclipse.jetty.util | 9.4.48.v20220622 
| DEBUG | ID=243 THR=qtp501056700-863 CAT=session  
MSG=Entering scope 
org.ops4j.pax.web.service.jetty.internal.PaxWebSessionHandler1209060588==dftMaxIdleSec=1800,
 dispatch=REQUEST asyncstarted=false
2022-11-10T19:39:46.393+0530 CEF:1 | org.eclipse.jetty.util | 9.4.48.v20220622 
| DEBUG | ID=243 THR=qtp501056700-863 CAT=session  
MSG=Got Session ID node0153ccberdksh618rs5jxv328kq22.node0 from cookie 
JSESSIONID
2022-11-10T19:39:46.393+0530 CEF:1 | org.eclipse.jetty.util | 9.4.48.v20220622 
| DEBUG | ID=243 THR=qtp501056700-863 CAT=session  
MSG=Session node0153ccberdksh618rs5jxv328kq22 not found locally in 

Re: Unable to load custom web.xml for Pax Web in Karaf (4.4.1)

2022-11-10 Thread Grzegorz Grzybek
Hi

OK - please then change "helloboard" to "/helloboard" in your
Web-ContextPath manifest header. context path without slash is wrong
according to specification.

regards
Grzegorz Grzybek

czw., 10 lis 2022 o 15:25 Prashanth Ettaboina
 napisał(a):

> Hi Grzybek,
>
> Thank you for your response.
>
> I do not have any jars in my /WEB-INF/lib, I do not have lib folder in my
> WEB-INF folder.
>
> In my module I have a web.xml (/src/main/webapp/WEB-INF/web.xml) I'm
> building this module as a kar file and installing it into the karaf console.
> I'm able to see my bundle getting started and getting active without any
> issue.
> But I'm able to see the below log lines after installing the kar file.
>
> 2022-11-10T19:09:05.486+0530 CEF:1 | org.apache.karaf.features.core |
> 4.4.1 | INFO  | ID=19 THR=tures-3-thread-1 CAT=FeaturesServiceImpl
> MSG=  helloboard/51.0.0.SNAPSHOT
> 2022-11-10T19:09:05.506+0530 CEF:1 |
> org.ops4j.pax.web.pax-web-extender-war | 8.0.6 | WARN  | ID=269
> THR=tures-3-thread-1 CAT=WarExtenderContext
>  MSG=Web-ContextPath manifest header of helloboard [312] specifies invalid
> context path: helloboard. This bundle will not be processed.
> 2022-11-10T19:09:05.506+0530 CEF:1 | org.apache.karaf.features.core |
> 4.4.1 | INFO  | ID=19 THR=tures-3-thread-1 CAT=FeaturesServiceImpl
> MSG=Done.
>
> When I try to access https://localhost:8443/helloboard/ server responded
> back with 404.
>
> Below are the jetty logs when I try to access the above endpoint.
>
> 2022-11-10T19:39:46.391+0530 CEF:1 | org.eclipse.jetty.util |
> 9.4.48.v20220622 | DEBUG | ID=243 THR=qtp501056700-863 CAT=HttpChannel
> MSG=REQUEST for //localhost:8443/helloboard on
> HttpChannelOverHttp@62fa25b0{s=HttpChannelState@2f46c6d1{s=IDLE
> rs=BLOCKING os=OPEN is=IDLE awp=false se=false i=true
> al=0},r=2,c=false/false,a=IDLE,uri=//localhost:8443/helloboard,age=0}
> GET //localhost:8443/helloboard HTTP/1.1
> Host: localhost:8443
>
>
> 2022-11-10T19:39:46.392+0530 CEF:1 | org.eclipse.jetty.util |
> 9.4.48.v20220622 | DEBUG | ID=243 THR=qtp501056700-863 CAT=HttpChannel
> MSG=handle //localhost:8443/helloboard
> HttpChannelOverHttp@62fa25b0{s=HttpChannelState@2f46c6d1{s=IDLE
> rs=BLOCKING os=OPEN is=IDLE awp=false se=false i=true
> al=0},r=2,c=false/false,a=IDLE,uri=//localhost:8443/helloboard,age=0}
> 2022-11-10T19:39:46.392+0530 CEF:1 | org.eclipse.jetty.util |
> 9.4.48.v20220622 | DEBUG | ID=243 THR=qtp501056700-863 CAT=HttpChannel
> MSG=action DISPATCH HttpChannelOverHttp@62fa25b0
> {s=HttpChannelState@2f46c6d1{s=HANDLING rs=BLOCKING os=OPEN is=IDLE
> awp=false se=false i=true
> al=0},r=2,c=false/false,a=HANDLING,uri=//localhost:8443/helloboard,age=1}
> 2022-11-10T19:39:46.392+0530 CEF:1 | org.eclipse.jetty.util |
> 9.4.48.v20220622 | DEBUG | ID=243 THR=qtp501056700-863
> CAT=SecureRequestCustomizer  MSG=Host localhost with SNI null
> 2022-11-10T19:39:46.392+0530 CEF:1 | org.eclipse.jetty.util |
> 9.4.48.v20220622 | DEBUG | ID=243 THR=qtp501056700-863 CAT=Server
>  MSG=REQUEST GET /helloboard on HttpChannelOverHttp@62fa25b0
> {s=HttpChannelState@2f46c6d1{s=HANDLING rs=BLOCKING os=OPEN is=IDLE
> awp=false se=false i=true al=0},r=2,c=false/false,a=HANDLING,uri=
> https://localhost:8443/helloboard,age=1}
> 2022-11-10T19:39:46.393+0530 CEF:1 | org.eclipse.jetty.util |
> 9.4.48.v20220622 | DEBUG | ID=243 THR=qtp501056700-863 CAT=ContextHandler
>  MSG=scope null||/helloboard @
> o.o.p.w.s.j.i.PaxWebServletContextHandler@52ee63a5
> {/,null,AVAILABLE} o.o.p.w.s.j.i.PaxWebServletContextHandler@52ee63a5%7b/,null,AVAILABLE%7d>
> 2022-11-10T19:39:46.393+0530 CEF:1 | org.eclipse.jetty.util |
> 9.4.48.v20220622 | DEBUG | ID=243 THR=qtp501056700-863 CAT=ContextHandler
>  MSG=context=||/helloboard @
> o.o.p.w.s.j.i.PaxWebServletContextHandler@52ee63a5
> {/,null,AVAILABLE} o.o.p.w.s.j.i.PaxWebServletContextHandler@52ee63a5%7b/,null,AVAILABLE%7d>
> 2022-11-10T19:39:46.393+0530 CEF:1 | org.eclipse.jetty.util |
> 9.4.48.v20220622 | DEBUG | ID=243 THR=qtp501056700-863 CAT=session
> MSG=Entering scope
> org.ops4j.pax.web.service.jetty.internal.PaxWebSessionHandler1209060588==dftMaxIdleSec=1800,
> dispatch=REQUEST asyncstarted=false
> 2022-11-10T19:39:46.393+0530 CEF:1 | org.eclipse.jetty.util |
> 9.4.48.v20220622 | DEBUG | ID=243 THR=qtp501056700-863 CAT=session
> MSG=Got Session ID node0153ccberdksh618rs5jxv328kq22.node0
> from cookie JSESSIONID
> 2022-11-10T19:39:46.393+0530 CEF:1 | org.eclipse.jetty.util |
> 9.4.48.v20220622 | DEBUG | ID=243 THR=qtp501056700-863 CAT=session
> MSG=Session node0153ccberdksh618rs5jxv328kq22 not found
> locally in org.eclipse.jetty.server.session.DefaultSessionCache@3daaf5f7
> [evict=-1,removeUnloadable=false,saveOnCreate=false,saveOnInactiveEvict=false 

RE: Unable to load custom web.xml for Pax Web in Karaf (4.4.1)

2022-11-10 Thread Prashanth Ettaboina
Hi Grzybek,

Thank you for your response.

I do not have any jars in my /WEB-INF/lib, I do not have lib folder in my 
WEB-INF folder.

In my module I have a web.xml (/src/main/webapp/WEB-INF/web.xml) I'm building 
this module as a kar file and installing it into the karaf console.
I'm able to see my bundle getting started and getting active without any issue.
But I'm able to see the below log lines after installing the kar file.

2022-11-10T19:09:05.486+0530 CEF:1 | org.apache.karaf.features.core | 4.4.1 | 
INFO  | ID=19 THR=tures-3-thread-1 CAT=FeaturesServiceImpl  MSG=  
helloboard/51.0.0.SNAPSHOT
2022-11-10T19:09:05.506+0530 CEF:1 | org.ops4j.pax.web.pax-web-extender-war | 
8.0.6 | WARN  | ID=269 THR=tures-3-thread-1 CAT=WarExtenderContext  
 MSG=Web-ContextPath manifest header of helloboard [312] specifies invalid 
context path: helloboard. This bundle will not be processed.
2022-11-10T19:09:05.506+0530 CEF:1 | org.apache.karaf.features.core | 4.4.1 | 
INFO  | ID=19 THR=tures-3-thread-1 CAT=FeaturesServiceImpl  
MSG=Done.

When I try to access https://localhost:8443/helloboard/ server responded back 
with 404.

Below are the jetty logs when I try to access the above endpoint.

2022-11-10T19:39:46.391+0530 CEF:1 | org.eclipse.jetty.util | 9.4.48.v20220622 
| DEBUG | ID=243 THR=qtp501056700-863 CAT=HttpChannel  
MSG=REQUEST for //localhost:8443/helloboard on 
HttpChannelOverHttp@62fa25b0{s=HttpChannelState@2f46c6d1{s=IDLE rs=BLOCKING 
os=OPEN is=IDLE awp=false se=false i=true 
al=0},r=2,c=false/false,a=IDLE,uri=//localhost:8443/helloboard,age=0}
GET //localhost:8443/helloboard HTTP/1.1
Host: localhost:8443


2022-11-10T19:39:46.392+0530 CEF:1 | org.eclipse.jetty.util | 9.4.48.v20220622 
| DEBUG | ID=243 THR=qtp501056700-863 CAT=HttpChannel  
MSG=handle //localhost:8443/helloboard 
HttpChannelOverHttp@62fa25b0{s=HttpChannelState@2f46c6d1{s=IDLE rs=BLOCKING 
os=OPEN is=IDLE awp=false se=false i=true 
al=0},r=2,c=false/false,a=IDLE,uri=//localhost:8443/helloboard,age=0}
2022-11-10T19:39:46.392+0530 CEF:1 | org.eclipse.jetty.util | 9.4.48.v20220622 
| DEBUG | ID=243 THR=qtp501056700-863 CAT=HttpChannel  
MSG=action DISPATCH 
HttpChannelOverHttp@62fa25b0{s=HttpChannelState@2f46c6d1{s=HANDLING rs=BLOCKING 
os=OPEN is=IDLE awp=false se=false i=true 
al=0},r=2,c=false/false,a=HANDLING,uri=//localhost:8443/helloboard,age=1}
2022-11-10T19:39:46.392+0530 CEF:1 | org.eclipse.jetty.util | 9.4.48.v20220622 
| DEBUG | ID=243 THR=qtp501056700-863 CAT=SecureRequestCustomizer  
MSG=Host localhost with SNI null
2022-11-10T19:39:46.392+0530 CEF:1 | org.eclipse.jetty.util | 9.4.48.v20220622 
| DEBUG | ID=243 THR=qtp501056700-863 CAT=Server   
MSG=REQUEST GET /helloboard on 
HttpChannelOverHttp@62fa25b0{s=HttpChannelState@2f46c6d1{s=HANDLING rs=BLOCKING 
os=OPEN is=IDLE awp=false se=false i=true 
al=0},r=2,c=false/false,a=HANDLING,uri=https://localhost:8443/helloboard,age=1}
2022-11-10T19:39:46.393+0530 CEF:1 | org.eclipse.jetty.util | 9.4.48.v20220622 
| DEBUG | ID=243 THR=qtp501056700-863 CAT=ContextHandler   
MSG=scope null||/helloboard @ 
o.o.p.w.s.j.i.PaxWebServletContextHandler@52ee63a5{/,null,AVAILABLE}
2022-11-10T19:39:46.393+0530 CEF:1 | org.eclipse.jetty.util | 9.4.48.v20220622 
| DEBUG | ID=243 THR=qtp501056700-863 CAT=ContextHandler   
MSG=context=||/helloboard @ 
o.o.p.w.s.j.i.PaxWebServletContextHandler@52ee63a5{/,null,AVAILABLE}
2022-11-10T19:39:46.393+0530 CEF:1 | org.eclipse.jetty.util | 9.4.48.v20220622 
| DEBUG | ID=243 THR=qtp501056700-863 CAT=session  
MSG=Entering scope 
org.ops4j.pax.web.service.jetty.internal.PaxWebSessionHandler1209060588==dftMaxIdleSec=1800,
 dispatch=REQUEST asyncstarted=false
2022-11-10T19:39:46.393+0530 CEF:1 | org.eclipse.jetty.util | 9.4.48.v20220622 
| DEBUG | ID=243 THR=qtp501056700-863 CAT=session  
MSG=Got Session ID node0153ccberdksh618rs5jxv328kq22.node0 from cookie 
JSESSIONID
2022-11-10T19:39:46.393+0530 CEF:1 | org.eclipse.jetty.util | 9.4.48.v20220622 
| DEBUG | ID=243 THR=qtp501056700-863 CAT=session  
MSG=Session node0153ccberdksh618rs5jxv328kq22 not found locally in 
org.eclipse.jetty.server.session.DefaultSessionCache@3daaf5f7[evict=-1,removeUnloadable=false,saveOnCreate=false,saveOnInactiveEvict=false],
 attempting to load
2022-11-10T19:39:46.394+0530 CEF:1 | org.eclipse.jetty.util | 9.4.48.v20220622 
| DEBUG | ID=243 THR=qtp501056700-863 CAT=session  
MSG=Session node0153ccberdksh618rs5jxv328kq22 not loaded 

Re: Unable to load custom web.xml for Pax Web in Karaf (4.4.1)

2022-11-10 Thread Grzegorz Grzybek
Hello

czw., 10 lis 2022 o 11:29 Prashanth Ettaboina
 napisał(a):

> Hi Team,
>
> I have upgraded my Application from Karaf 4.2.15 to 4.4.1 version.
>
> As per release notes (4.4.0 and 4.4.1) I have updated Pax Web dependency
> to 8.0.6 along with Jetty to 9.4.46.v20220331
>
> The issue is Pax web is unable to load my web.xml, I have tried to find
> the end points (list of servlets) which are running in the karaf using the
> karaf commands (http:list & web:list) both commands are not supported by
> latest karaf.
>

How are you "loading" your web.xml? Is it part of Web Application? How do
you install it? Which jars do you have in /WEB-INF/lib?
If you see some errors in logs, please create an issue under
https://github.com/ops4j/org.ops4j.pax.web/issues.

and the commands changed - if you install pax-web-karaf feature, you'll get
new commands like "web:servlet-list", "web:wab-list" or "web:context-list".

regards
Grzegorz Grzybek


>
> Can anyone please look at it.
>
> Thanks,
> Prashanth Ettaboina,
>


Unable to load custom web.xml for Pax Web in Karaf (4.4.1)

2022-11-10 Thread Prashanth Ettaboina
Hi Team,

I have upgraded my Application from Karaf 4.2.15 to 4.4.1 version.

As per release notes (4.4.0 and 4.4.1) I have updated Pax Web dependency to 
8.0.6 along with Jetty to 9.4.46.v20220331

The issue is Pax web is unable to load my web.xml, I have tried to find the end 
points (list of servlets) which are running in the karaf using the karaf 
commands (http:list & web:list) both commands are not supported by latest karaf.

Can anyone please look at it.

Thanks,
Prashanth Ettaboina,