Oh I forgot,
actually with Pax Web 4.0 the getBaseUrl() does resolve to bundle://636.1:0/
while with Pax Web 3.x it returns a null.

regards, Achim

2014-09-26 14:26 GMT+02:00 Achim Nierbeck <[email protected]>:

> Hi Paul,
>
> I've taken the time to investigate a bit further, why it works for Pax Web
> 4.0 but not for Pax Web 3.x. To me it looks a lot like due the changes in
> the Myfaces versions, the for Pax Web 4.0 solved issue regarding
> Welcomefiles (PAXWEB-123) helps with it. Since till version 4.0 of Pax Web
> the Welcomefiles where handled through a special filter that has been
> removed with Pax Web 4.0.
>
> So you have two possible solutions at hand. Just use MyFaces 2.1 (which I
> heard is not really an option) or you update the version of Pax Web in the
> Karaf you use. With Karaf 3.0.2 it should be quite easy to update that.
>
> regards, Achim
>
>
> 2014-09-15 17:05 GMT+02:00 Paul Spencer <[email protected]>:
>
>> Achim,
>> The ResourceResolver in JSF2.2 has been deprecated and replaced by the
>> ResourceHandler.
>>   See:
>> http://docs.oracle.com/javaee/7/api/javax/faces/view/facelets/ResourceResolver.html
>>
>> http://docs.oracle.com/javaee/7/api/javax/faces/application/ResourceHandler.html
>>
>> Thank you for the instruction on installing Pax Web 4.0. I will give it a
>> try, but it may take a week or so.
>>
>> Paul Spencer
>>
>> On Sep 15, 2014, at 3:25 AM, Achim Nierbeck <[email protected]>
>> wrote:
>>
>> > Hi Paul,
>> >
>> > I've read the thread, interesting. Right now the resolver doesn't seem
>> to use the resolver provided by Pax Web. Maybe this could be enhanced in
>> some way, I'll try to dig into this.
>> >
>> > Regarding Pax Web 4.0 and Karaf 3.0.1. Won't work easily, but for
>> testing try with Karaf 3.0.2 cause I added an enhancement for that. So
>> using 3.0.2-SNAPSHOT just add the feature url for Pax Web 4.0 to Karaf by
>> issuing this command:
>> >
>> > feature:addRepo org.ops4j.pax.web/pax-web-features/4.0.0/xml/features
>> >
>> > after that just install the pax-war feature first and after that
>> install the war feature. This way you'll also have the required commands
>> available.
>> >
>> > regards, Achim
>> >
>> >
>> > 2014-09-15 0:11 GMT+02:00 Paul Spencer <[email protected]>:
>> > Achim,
>> > I reported this issue to the MyFaces user mailing list on September 5,
>> http://myfaces.10567.n7.nabble.com/NPE-in-DefaultFaceletFactory-createViewMetadataFacelet-from-MyFaces-2-2-4-and-Karaf-3-0-1-td118664.html,
>> but they have not acknowledge this as a MyFaces issue.  Running the same
>> use case with MyFaces 2.1.x and 2.2.x, results in different results
>> implying a regression bug.
>> >
>> > How to I run Pax Web 4.0 with Karaf 3.0.1?
>> >
>> > Paul Spencer
>> >
>> >
>> >
>> > On Sep 13, 2014, at 6:22 PM, Achim Nierbeck <[email protected]>
>> wrote:
>> >
>> > > Ok, I drilled it down to one issue:
>> > > the following code in DefaultFaceletFactory._createViewMetadataFacelet
>> > > String faceletId = "/"+ _removeFirst(url.getFile(),
>> getBaseUrl().getFile());
>> > >
>> > > runs into the nullpointer because getBaseUrl, tries to resolve "/" as
>> resource which doesn't exist and therefore is null, therefore returning a
>> nullpointer as a getFile on null doesn't work.
>> > >
>> > > Now I'm out of Ideas why this does work for Pax Web 4, but not for 3.1
>> > >
>> > > regards, Achim
>> > >
>> > >
>> > > 2014-09-13 13:53 GMT+02:00 Achim Nierbeck <[email protected]>:
>> > > For your info, at Pax Web those Issues are connected to this:
>> > >
>> > > https://ops4j1.jira.com/browse/PAXWEB-732
>> > > https://ops4j1.jira.com/browse/PAXWEB-733
>> > >
>> > > regards, Achim
>> > >
>> > > 2014-09-13 0:05 GMT+02:00 Achim Nierbeck <[email protected]>:
>> > > Hi,
>> > >
>> > > as MyFaces has been the only OSGi Ready JSF impl, I only used that
>> one.
>> > > It might be an issue of Pax Web though, because it works with Pax Web
>> 4.0.
>> > >
>> > > I'll try to investigate ore on this.
>> > >
>> > > rgards, Achim
>> > >
>> > > 2014-09-12 22:16 GMT+02:00 Paul Spencer <[email protected]>:
>> > > Achim,
>> > > Have you tried using a different JSF 2.2 implementation?
>> > >
>> > > I suspect there is a regression bug in MyFaces 2.2.4, but the
>> developer have yet to acknowledge one.
>> > >
>> > > Paul Spencer
>> > >
>> > >
>> > > On Sep 12, 2014, at 12:08 PM, Achim Nierbeck <[email protected]>
>> wrote:
>> > >
>> > > > Ok,
>> > > >
>> > > > so far I got it working properly, only the PrimeFaces integration
>> test isn't working.
>> > > > Though I sometimes think those simple tests I got aren't really a
>> "good" match to catch all trip-wires regarding JSF.
>> > > >
>> > > > The failure I got for PrimeFaces is actually the same you reported.
>> > > > So I'll try to look into this a bit more.
>> > > >
>> > > > regards, Achim
>> > > >
>> > > >
>> > > >
>> > > >
>> > > > 2014-09-12 15:29 GMT+02:00 Achim Nierbeck <[email protected]
>> >:
>> > > > Hi Paul,
>> > > >
>> > > > After I've got it working in a integration test, I'm gonna check
>> how a backport to Pax Web 3.1.x turns out, cause I think this should work
>> there as well already. I'll keep you posted.
>> > > >
>> > > > regards, Achim
>> > > >
>> > > >
>> > > > 2014-09-12 4:31 GMT+02:00 Paul Spencer <[email protected]>:
>> > > > Achim,
>> > > > This is encouraging!
>> > > >
>> > > > Will this be supported in Karaf 3.0.x?
>> > > >
>> > > > Paul Spencer
>> > > >
>> > > >
>> > > > On Sep 11, 2014, at 7:22 PM, Achim Nierbeck <
>> [email protected]> wrote:
>> > > >
>> > > > > Hi Paul,
>> > > > >
>> > > > > I tested to use Pax Web 4.0 with MyFaces 2.2.4 and it worked very
>> well, right now I'm working on fixing the automatic test for the 4.0.x
>> branch.
>> > > > >
>> > > > > regards, Achim
>> > > > >
>> > > > > 2014-09-06 3:18 GMT+02:00 Paul Spencer <[email protected]>:
>> > > > > Achim,
>> > > > > MyFaces is trying to create a Facelet from the url
>> “bundle://636.1:0/helloWorld.xhtml” and I suspect the second colon is
>> causing a problem.  I have posted a question on the MyFaces list asking
>> this question.
>> > > > >    Creating Facelet used to create View Metadata for:
>> bundle://636.1:0/helloWorld.xhtml
>> > > > >
>> > > > > Paul Spencer
>> > > > >
>> > > > > On Sep 5, 2014, at 11:56 AM, Achim Nierbeck <
>> [email protected]> wrote:
>> > > > >
>> > > > > > hmm, I've just checked, looks like you're working on the
>> myfaces project.
>> > > > > > So looks like I could learn a lot from you :D
>> > > > > >
>> > > > > > regards, Achim
>> > > > > >
>> > > > > >
>> > > > > > 2014-09-05 17:53 GMT+02:00 Achim Nierbeck <
>> [email protected]>:
>> > > > > > Paul,
>> > > > > >
>> > > > > > short answer no.
>> > > > > > Cause the use case you used is the only test I have right now
>> for JSF.
>> > > > > > Long answer, JSF is just major PITA with lots of strange
>> classloading going on under the hood.
>> > > > > > I'm glad I somehow got it working so right now Myfaces 2.1.x is
>> the only version working.
>> > > > > >
>> > > > > > So if there is one standing up to get this fixed, be my guest :)
>> > > > > >
>> > > > > > regards, Achim
>> > > > > >
>> > > > > >
>> > > > > >
>> > > > > >
>> > > > > > 2014-09-05 17:47 GMT+02:00 Paul Spencer <[email protected]>:
>> > > > > > Achim,
>> > > > > > Use Case aside, should MyFaces 2.2.x work in Karaf 3.0.1?
>> > > > > >
>> > > > > > Paul Spencer
>> > > > > >
>> > > > > > On Sep 5, 2014, at 11:40 AM, Achim Nierbeck <
>> [email protected]> wrote:
>> > > > > >
>> > > > > > > Hi,
>> > > > > > >
>> > > > > > > the use case you're referencing is using MyFaces 2.1.9.
>> > > > > > > Anything else has not been tested so far.
>> > > > > > >
>> > > > > > > regards, Achim
>> > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > > 2014-09-05 16:13 GMT+02:00 Paul Spencer <[email protected]>:
>> > > > > > > I am getting the following exception when browsing to a JSF
>> page when using MyFaces 2.2.4 and Karaf 3.0.1.  No exception is thrown when
>> using MyFaces 2.1.15.  The only difference is which version of myfaces-api
>> and myfaces-impl are installed.
>> > > > > > >
>> > > > > > > Should MyFaces 2.2 work in Karaf 3.0.1?
>> > > > > > >   If so, what needed to make it work?
>> > > > > > >
>> > > > > > > ***
>> > > > > > > * Exception thrown when using MyFaces 2.2.4
>> > > > > > > ***
>> > > > > > >
>> > > > > > > java.lang.NullPointerException
>> > > > > > >         at
>> org.apache.myfaces.view.facelets.impl.DefaultFaceletFactory._createViewMetadataFacelet(DefaultFaceletFactory.java:410)
>> > > > > > >         at
>> org.apache.myfaces.view.facelets.impl.DefaultFaceletFactory.access$100(DefaultFaceletFactory.java:57)
>> > > > > > >         at
>> org.apache.myfaces.view.facelets.impl.DefaultFaceletFactory$2.newInstance(DefaultFaceletFactory.java:131)
>> > > > > > >         at
>> org.apache.myfaces.view.facelets.impl.DefaultFaceletFactory$2.newInstance(DefaultFaceletFactory.java:128)
>> > > > > > >         at
>> org.apache.myfaces.view.facelets.impl.FaceletCacheImpl.getViewMetadataFacelet(FaceletCacheImpl.java:114)
>> > > > > > >         at
>> org.apache.myfaces.view.facelets.impl.FaceletCacheImpl.getViewMetadataFacelet(FaceletCacheImpl.java:51)
>> > > > > > >         at
>> org.apache.myfaces.view.facelets.impl.DefaultFaceletFactory.getViewMetadataFacelet(DefaultFaceletFactory.java:509)
>> > > > > > >         at
>> org.apache.myfaces.view.facelets.impl.DefaultFaceletFactory.getViewMetadataFacelet(DefaultFaceletFactory.java:493)
>> > > > > > >         at
>> org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage._getViewMetadataFacelet(FaceletViewDeclarationLanguage.java:2584)
>> > > > > > >         at
>> org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.access$000(FaceletViewDeclarationLanguage.java:147)
>> > > > > > >         at
>> org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage$FaceletViewMetadata.createMetadataView(FaceletViewDeclarationLanguage.java:2738)
>> > > > > > >         at
>> org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:243)
>> > > > > > >         at
>> org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:196)
>> > > > > > >         at
>> org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:143)
>> > > > > > >         at
>> javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
>> > > > > > >         at
>> org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
>> > > > > > >         at
>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1496)
>> > > > > > >         at
>> org.ops4j.pax.web.service.internal.WelcomeFilesFilter.doFilter(WelcomeFilesFilter.java:185)
>> > > > > > >         at
>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1467)
>> > > > > > >         at
>> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)
>> > > > > > >         at
>> org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:69)
>> > > > > > >         at
>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
>> > > > > > >         at
>> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
>> > > > > > >         at
>> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
>> > > > > > >         at
>> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
>> > > > > > >         at
>> org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:240)
>> > > > > > >         at
>> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
>> > > > > > >         at
>> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
>> > > > > > >         at
>> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
>> > > > > > >         at
>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
>> > > > > > >         at
>> org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:77)
>> > > > > > >
>> > > > > > >
>> > > > > > > I am using the following to as a use case:
>> > > > > > >
>> https://github.com/ops4j/org.ops4j.pax.web/tree/master/samples/war-jsf-primefaces
>> > > > > > >
>> > > > > > > Paul Spencer
>> > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > > --
>> > > > > > >
>> > > > > > > Apache Member
>> > > > > > > Apache Karaf <http://karaf.apache.org/> Committer & PMC
>> > > > > > > OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
>> Committer & Project Lead
>> > > > > > > blog <http://notizblog.nierbeck.de/>
>> > > > > > >
>> > > > > > > Software Architect / Project Manager / Scrum Master
>> > > > > > >
>> > > > > >
>> > > > > >
>> > > > > >
>> > > > > >
>> > > > > > --
>> > > > > >
>> > > > > > Apache Member
>> > > > > > Apache Karaf <http://karaf.apache.org/> Committer & PMC
>> > > > > > OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
>> Committer & Project Lead
>> > > > > > blog <http://notizblog.nierbeck.de/>
>> > > > > >
>> > > > > > Software Architect / Project Manager / Scrum Master
>> > > > > >
>> > > > > >
>> > > > > >
>> > > > > >
>> > > > > > --
>> > > > > >
>> > > > > > Apache Member
>> > > > > > Apache Karaf <http://karaf.apache.org/> Committer & PMC
>> > > > > > OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
>> Committer & Project Lead
>> > > > > > blog <http://notizblog.nierbeck.de/>
>> > > > > >
>> > > > > > Software Architect / Project Manager / Scrum Master
>> > > > > >
>> > > > >
>> > > > >
>> > > > >
>> > > > >
>> > > > > --
>> > > > >
>> > > > > Apache Member
>> > > > > Apache Karaf <http://karaf.apache.org/> Committer & PMC
>> > > > > OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
>> Committer & Project Lead
>> > > > > blog <http://notizblog.nierbeck.de/>
>> > > > >
>> > > > > Software Architect / Project Manager / Scrum Master
>> > > > >
>> > > >
>> > > >
>> > > >
>> > > >
>> > > > --
>> > > >
>> > > > Apache Member
>> > > > Apache Karaf <http://karaf.apache.org/> Committer & PMC
>> > > > OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
>> Committer & Project Lead
>> > > > blog <http://notizblog.nierbeck.de/>
>> > > >
>> > > > Software Architect / Project Manager / Scrum Master
>> > > >
>> > > >
>> > > >
>> > > >
>> > > > --
>> > > >
>> > > > Apache Member
>> > > > Apache Karaf <http://karaf.apache.org/> Committer & PMC
>> > > > OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
>> Committer & Project Lead
>> > > > blog <http://notizblog.nierbeck.de/>
>> > > >
>> > > > Software Architect / Project Manager / Scrum Master
>> > > >
>> > >
>> > >
>> > >
>> > >
>> > > --
>> > >
>> > > Apache Member
>> > > Apache Karaf <http://karaf.apache.org/> Committer & PMC
>> > > OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
>> Committer & Project Lead
>> > > blog <http://notizblog.nierbeck.de/>
>> > >
>> > > Software Architect / Project Manager / Scrum Master
>> > >
>> > >
>> > >
>> > >
>> > > --
>> > >
>> > > Apache Member
>> > > Apache Karaf <http://karaf.apache.org/> Committer & PMC
>> > > OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
>> Committer & Project Lead
>> > > blog <http://notizblog.nierbeck.de/>
>> > >
>> > > Software Architect / Project Manager / Scrum Master
>> > >
>> > >
>> > >
>> > >
>> > > --
>> > >
>> > > Apache Member
>> > > Apache Karaf <http://karaf.apache.org/> Committer & PMC
>> > > OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
>> Committer & Project Lead
>> > > blog <http://notizblog.nierbeck.de/>
>> > >
>> > > Software Architect / Project Manager / Scrum Master
>> > >
>> >
>> >
>> >
>> >
>> > --
>> >
>> > Apache Member
>> > Apache Karaf <http://karaf.apache.org/> Committer & PMC
>> > OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
>> Committer & Project Lead
>> > blog <http://notizblog.nierbeck.de/>
>> >
>> > Software Architect / Project Manager / Scrum Master
>> >
>>
>>
>
>
> --
>
> Apache Member
> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
> Project Lead
> blog <http://notizblog.nierbeck.de/>
>
> Software Architect / Project Manager / Scrum Master
>
>


-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>

Software Architect / Project Manager / Scrum Master

Reply via email to