hi avinash,

ear-packages are always a bit special and not portable with ee6.
as you could see with your own demo, it isn't really a ds-issue.
however, in your case it looks like mojarra can't find/see ds classes (due
to the classloader-setup you have to use).
you could only move all jars to the web-module/s or you could try to tweak
the classloader-config of the server you are using.
(... or drop ear-packaging at all - in most cases you will hit quite a few
constellations which are broken to some extent.)

regards,
gerhard



2017-03-17 23:13 GMT+01:00 Avinash Moram <[email protected]>:

> Hi Gerhard,
>
> Sorry for the delay in replying, I was trying to setup a github project
> but it took me too long to do my exact replica of my multi-module maven
> project, so I ended up doing one simple project uploaded to github here
> <https://github.com/avinashmoram/jboss-javaee-webapp> using the existing
> jboss javaee project and included deltaspike, which seems to work. " It
> doesn't look like a mojarra issue as I used the exact jars from
> deltaspike(1.7.2) and mojarra (2.2.12). At least I am not getting the error
> "javax.servlet.ServletException: Expression Error: Named Object:
> org.apache.deltaspike.WindowIdHolder not found."
>
> My multi-module maven project has 4 modules (core is bundled into jar (no
> dependency), ejb (dependent on core), web is bundled into war (dependent on
> ejb and core) and ear (dependent on ejb, core, web) ), I included the
> deltaspike jars in my ejb module, the web module pom doesn't have any delta
> spike jars. Do you think that is the problem?
>
> I saw a similar exception posted for an ominifaces issue here
> <http://stackoverflow.com/questions/37529138/javax-faces-facesexception-expression-error-named-object-org-omnifaces-compon>
>
> one of the comments from BalusC says "This can happen if OmniFaces is
> misplaced in e.g. EAR/lib instad of WAR's WEB-INF/lib. Did you verify if
> the build is all right? See also omnifaces.org/#installation – BalusC
> <http://stackoverflow.com/users/157882/balusc> May 30 '16 at 17:29
> <http://stackoverflow.com/questions/37529138/javax-faces-facesexception-expression-error-named-object-org-omnifaces-compon#comment62552493_37529138>
> "
>
> I am attaching my multi module pom's here.
>
>
>
> Thanks & Regards,
> Avinash
>
> On Wed, Mar 15, 2017 at 3:58 PM, Gerhard Petracek <[email protected]>
> wrote:
>
>> hi avinash,
>>
>> it looks like an issue with the version of mojarra you are using.
>> please provide a link to a demo (e.g. on github) which illustrates the
>> issue.
>>
>> regards,
>> gerhard
>>
>>
>>
>> 2017-03-15 21:35 GMT+01:00 Avinash Moram <[email protected]>:
>>
>> > Hi,
>> >
>> > We have started migrating a seam application to primefaces 6.0 + CDI
>> 1.2 +
>> > Deltaspike 1.7.0. I was trying to get the grouped conversations up and
>> > running.
>> >
>> > And I read
>> > http://www.omnifaces-fans.org/2015/12/jsf-scopes-tutorial-
>> > deltaspike-grouped.html
>> > in the pre-requisites that "- DeltaSpike conversations are based on the
>> > window-scope
>> > <http://www.omnifaces-fans.org/2015/11/jsf-scopes-
>> > tutorial-deltaspike-window.html>
>> > (as a consequence of this, do not forget to add the ds:windowId
>> (xmlns:ds="
>> > http://deltaspike.apache.org/jsf";) component)."
>> >
>> > So, I included them in my .xhtml pages and had the necessary deltaspike
>> > classes injected.
>> >
>> >
>> > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
>> > http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
>> > <ui:composition xmlns="http://www.w3.org/1999/xhtml";
>> >     xmlns:h="http://java.sun.com/jsf/html";
>> >     xmlns:f="http://java.sun.com/jsf/core";
>> >     xmlns:ui="http://java.sun.com/jsf/facelets";
>> >     xmlns:c="http://java.sun.com/jstl/core";
>> >     xmlns:p="http://primefaces.org/ui";
>> >       xmlns:pe="http://primefaces.org/ui/extensions"; xml:lang="en"
>> > lang="en"
>> >     template="/views/common/layout/main-content-layout.xhtml"
>> >     xmlns:ds="http://deltaspike.apache.org/jsf";>
>> >
>> >     <ui:define name="breadcrumb">
>> >         <c:if test="${not empty
>> > acilitySearch.dqStack.getConversationStack()}">
>> >             <b>You Are Here: </b>
>> >         </c:if>
>> >         <c:set var="previousEntry" value="none" />
>> >         <c:forEach items="${acilitySearch.dqStack
>> .getConversationStack()}"
>> > var="entry"
>> >             varStatus="status">
>> >             <p:link outcome="#{entry.getPage()}"
>> >                 value="#{entry.getDescription()}" >
>> >         </p:link>
>> >
>> >             <c:if test="${!status.last}">
>> >                 <!-- Not at the last breadcrumb, place a separator -->
>> >                 <span id="breadcrumb-separator">&#160;:&#160;</span>
>> >             </c:if>
>> >             <c:set var="previousEntry" value="${entry.getDescription(
>> )}"
>> > />
>> >         </c:forEach>
>> >     </ui:define>
>> >
>> >     <ui:define name="page-title">Authorization/Application
>> > Search</ui:define>
>> >     <ui:define name="page-body">
>> >     *<ds:windowId/>*
>> >
>> > @Named("facilitySearch")
>> > @Stateful
>> > @GroupedConversationScoped
>> > @ConversationGroup(ConversationWQGroup.class)
>> > public class FacilitySearchController extends
>> > BaseSearchController<PaWqAppLoader>
>> >         implements IWQSearch, IWqFacilitySearchControllerLocal,
>> > Serializable {
>> >
>> >     private static final long serialVersionUID = 1L;
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > * @Inject    private GroupedConversation  conversation;    @Inject
>> > private WindowContext windowContext;    @Inject    private
>> > GroupedConversationManager conversationManager;*
>> >
>> > I have the below in my POM, the deltaspike version I am using is 1.7.0
>> >        <dependency>
>> >             <groupId>org.apache.deltaspike.core</groupId>
>> >             <artifactId>deltaspike-core-api</artifactId>
>> >             <version>${deltaspike.version}</version>
>> >             <scope>compile</scope>
>> >         </dependency>
>> >
>> >         <dependency>
>> >             <groupId>org.apache.deltaspike.core</groupId>
>> >             <artifactId>deltaspike-core-impl</artifactId>
>> >             <version>${deltaspike.version}</version>
>> >             <scope>runtime</scope>
>> >         </dependency>
>> >
>> >         <dependency>
>> >             <groupId>org.apache.deltaspike.modules</groupId>
>> >             <artifactId>deltaspike-jsf-module-api</artifactId>
>> >             <version>${deltaspike.version}</version>
>> >             <scope>compile</scope>
>> >         </dependency>
>> >
>> >         <dependency>
>> >             <groupId>org.apache.deltaspike.modules</groupId>
>> >             <artifactId>deltaspike-jsf-module-impl</artifactId>
>> >             <version>${deltaspike.version}</version>
>> >             <scope>runtime</scope>
>> >         </dependency>
>> >
>> >
>> >
>> >
>> > When i start my application I get the below error.
>> >
>> > 15:30:48,934 SEVERE
>> > [javax.enterprise.resource.webcontainer.jsf.application] (default
>> task-9)
>> > JSF1068: Cannot instantiate component with component-type
>> > org.apache.deltaspike.WindowIdHolder
>> > 15:30:53,234 ERROR [io.undertow.request] (default task-9) UT005023:
>> > Exception handling request to
>> > /mywebweb-1.0/faces/views/views/facilitysearch.xhtml:
>> > javax.servlet.ServletException: Expression Error: Named Object:
>> > org.apache.deltaspike.WindowIdHolder not found.
>> >     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:671)
>> >     at
>> > io.undertow.servlet.handlers.ServletHandler.handleRequest(
>> > ServletHandler.java:85)
>> >     at
>> > io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.
>> > handleRequest(ServletSecurityRoleHandler.java:62)
>> >     at
>> > io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(
>> > ServletDispatchingHandler.java:36)
>> >     at
>> > org.wildfly.extension.undertow.security.SecurityContextAssociationHand
>> > ler.handleRequest(SecurityContextAssociationHandler.java:78)
>> >     at
>> > io.undertow.server.handlers.PredicateHandler.handleRequest(
>> > PredicateHandler.java:43)
>> >     at
>> > io.undertow.servlet.handlers.security.SSLInformationAssociationHandl
>> > er.handleRequest(SSLInformationAssociationHandler.java:131)
>> >     at
>> > io.undertow.servlet.handlers.security.ServletAuthenticationCallHandl
>> > er.handleRequest(ServletAuthenticationCallHandler.java:57)
>> >     at
>> > io.undertow.server.handlers.PredicateHandler.handleRequest(
>> > PredicateHandler.java:43)
>> >     at
>> > io.undertow.security.handlers.AbstractConfidentialityHandler
>> > .handleRequest(AbstractConfidentialityHandler.java:46)
>> >     at
>> > io.undertow.servlet.handlers.security.ServletConfidentialityConstrai
>> > ntHandler.handleRequest(ServletConfidentialityConstraintHand
>> ler.java:64)
>> >     at
>> > io.undertow.security.handlers.AuthenticationMechanismsHandle
>> > r.handleRequest(AuthenticationMechanismsHandler.java:60)
>> >     at
>> > io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHand
>> > ler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
>> >     at
>> > io.undertow.security.handlers.NotificationReceiverHandler.ha
>> ndleRequest(
>> > NotificationReceiverHandler.java:50)
>> >     at
>> > io.undertow.security.handlers.AbstractSecurityContextAssocia
>> > tionHandler.handleRequest(AbstractSecurityContextAssocia
>> > tionHandler.java:43)
>> >     at
>> > io.undertow.server.handlers.PredicateHandler.handleRequest(
>> > PredicateHandler.java:43)
>> >     at
>> > org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.
>> > handleRequest(JACCContextIdHandler.java:61)
>> >     at
>> > io.undertow.server.handlers.PredicateHandler.handleRequest(
>> > PredicateHandler.java:43)
>> >     at
>> > io.undertow.server.handlers.PredicateHandler.handleRequest(
>> > PredicateHandler.java:43)
>> >     at
>> > io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(
>> > ServletInitialHandler.java:285)
>> >     at
>> > io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(
>> > ServletInitialHandler.java:264)
>> >     at
>> > io.undertow.servlet.handlers.ServletInitialHandler.access$
>> > 000(ServletInitialHandler.java:81)
>> >     at
>> > io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(
>> > ServletInitialHandler.java:175)
>> >     at io.undertow.server.Connectors.executeRootHandler(Connectors.
>> > java:202)
>> >     at
>> > io.undertow.server.HttpServerExchange$1.run(HttpServerExchan
>> ge.java:792)
>> >     at
>> > java.util.concurrent.ThreadPoolExecutor.runWorker(
>> > ThreadPoolExecutor.java:1142)
>> >     at
>> > java.util.concurrent.ThreadPoolExecutor$Worker.run(
>> > ThreadPoolExecutor.java:617)
>> >     at java.lang.Thread.run(Thread.java:745)
>> > Caused by: javax.faces.FacesException: Expression Error: Named Object:
>> > org.apache.deltaspike.WindowIdHolder not found.
>> >     at
>> > com.sun.faces.application.ApplicationImpl.createComponentApp
>> lyAnnotation
>> > s(ApplicationImpl.java:1912)
>> >     at
>> > com.sun.faces.application.ApplicationImpl.createComponent(
>> > ApplicationImpl.java:1166)
>> >     at
>> > org.jboss.as.jsf.injection.weld.ForwardingApplication.createComponent(
>> > ForwardingApplication.java:111)
>> >     at
>> > javax.faces.application.ApplicationWrapper.createComponent(
>> > ApplicationWrapper.java:637)
>> >     at
>> > javax.faces.application.ApplicationWrapper.createComponent(
>> > ApplicationWrapper.java:637)
>> >     at
>> > com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImp
>> > l.createComponent(ComponentTagHandlerDelegateImpl.java:602)
>> >     at
>> > com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(
>> > ComponentTagHandlerDelegateImpl.java:175)
>> >     at
>> > javax.faces.view.facelets.DelegatingMetaTagHandler.apply(
>> > DelegatingMetaTagHandler.java:120)
>> >     at
>> > javax.faces.view.facelets.CompositeFaceletHandler.apply(
>> > CompositeFaceletHandler.java:95)
>> >     at
>> > com.sun.faces.facelets.tag.ui.DefineHandler.applyDefinition(
>> > DefineHandler.java:106)
>> >     at
>> > com.sun.faces.facelets.tag.ui.CompositionHandler.apply(
>> > CompositionHandler.java:206)
>> >     at
>> > com.sun.faces.facelets.impl.DefaultFaceletContext$TemplateMa
>> nager.apply(
>> > DefaultFaceletContext.java:395)
>> >     at
>> > com.sun.faces.facelets.impl.DefaultFaceletContext.includeDefinition(
>> > DefaultFaceletContext.java:366)
>> >     at
>> > com.sun.faces.facelets.tag.ui.InsertHandler.apply(InsertHand
>> ler.java:111)
>> >     at
>> > javax.faces.view.facelets.CompositeFaceletHandler.apply(
>> > CompositeFaceletHandler.java:95)
>> >     at
>> > javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(
>> > DelegatingMetaTagHandler.java:137)
>> >     at
>> > com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(
>> > ComponentTagHandlerDelegateImpl.java:202)
>> >     at
>> > javax.faces.view.facelets.DelegatingMetaTagHandler.apply(
>> > DelegatingMetaTagHandler.java:120)
>> >     at
>> > javax.faces.view.facelets.CompositeFaceletHandler.apply(
>> > CompositeFaceletHandler.java:95)
>> >     at
>> > javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(
>> > DelegatingMetaTagHandler.java:137)
>> >     at
>> > com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(
>> > ComponentTagHandlerDelegateImpl.java:202)
>> >     at
>> > javax.faces.view.facelets.DelegatingMetaTagHandler.apply(
>> > DelegatingMetaTagHandler.java:120)
>> >     at
>> > javax.faces.view.facelets.CompositeFaceletHandler.apply(
>> > CompositeFaceletHandler.java:95)
>> >     at
>> > com.sun.faces.facelets.tag.ui.DefineHandler.applyDefinition(
>> > DefineHandler.java:106)
>> >     at
>> > com.sun.faces.facelets.tag.ui.CompositionHandler.apply(
>> > CompositionHandler.java:206)
>> >     at
>> > com.sun.faces.facelets.impl.DefaultFaceletContext$TemplateMa
>> nager.apply(
>> > DefaultFaceletContext.java:395)
>> >     at
>> > com.sun.faces.facelets.impl.DefaultFaceletContext.includeDefinition(
>> > DefaultFaceletContext.java:366)
>> >     at
>> > com.sun.faces.facelets.tag.ui.InsertHandler.apply(InsertHand
>> ler.java:111)
>> >     at
>> > javax.faces.view.facelets.CompositeFaceletHandler.apply(
>> > CompositeFaceletHandler.java:95)
>> >     at
>> > javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(
>> > DelegatingMetaTagHandler.java:137)
>> >     at
>> > com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(
>> > ComponentTagHandlerDelegateImpl.java:202)
>> >     at
>> > javax.faces.view.facelets.DelegatingMetaTagHandler.apply(
>> > DelegatingMetaTagHandler.java:120)
>> >     at
>> > javax.faces.view.facelets.CompositeFaceletHandler.apply(
>> > CompositeFaceletHandler.java:95)
>> >     at
>> > com.sun.faces.facelets.tag.jsf.core.ViewHandler.apply(
>> > ViewHandler.java:225)
>> >     at
>> > javax.faces.view.facelets.CompositeFaceletHandler.apply(
>> > CompositeFaceletHandler.java:95)
>> >     at
>> > com.sun.faces.facelets.compiler.NamespaceHandler.
>> > apply(NamespaceHandler.java:93)
>> >     at
>> > com.sun.faces.facelets.compiler.EncodingHandler.
>> > apply(EncodingHandler.java:87)
>> >     at
>> > com.sun.faces.facelets.impl.DefaultFacelet.include(
>> > DefaultFacelet.java:312)
>> >     at
>> > com.sun.faces.facelets.impl.DefaultFacelet.include(
>> > DefaultFacelet.java:371)
>> >     at
>> > com.sun.faces.facelets.impl.DefaultFacelet.include(
>> > DefaultFacelet.java:350)
>> >     at
>> > com.sun.faces.facelets.impl.DefaultFaceletContext.includeFacelet(
>> > DefaultFaceletContext.java:199)
>> >     at
>> > com.sun.faces.facelets.tag.ui.CompositionHandler.apply(
>> > CompositionHandler.java:174)
>> >     at
>> > com.sun.faces.facelets.compiler.NamespaceHandler.
>> > apply(NamespaceHandler.java:93)
>> >     at
>> > com.sun.faces.facelets.compiler.EncodingHandler.
>> > apply(EncodingHandler.java:87)
>> >     at
>> > com.sun.faces.facelets.impl.DefaultFacelet.include(
>> > DefaultFacelet.java:312)
>> >     at
>> > com.sun.faces.facelets.impl.DefaultFacelet.include(
>> > DefaultFacelet.java:371)
>> >     at
>> > com.sun.faces.facelets.impl.DefaultFacelet.include(
>> > DefaultFacelet.java:350)
>> >     at
>> > com.sun.faces.facelets.impl.DefaultFaceletContext.includeFacelet(
>> > DefaultFaceletContext.java:199)
>> >     at
>> > com.sun.faces.facelets.tag.ui.CompositionHandler.apply(
>> > CompositionHandler.java:174)
>> >     at
>> > com.sun.faces.facelets.compiler.NamespaceHandler.
>> > apply(NamespaceHandler.java:93)
>> >     at
>> > com.sun.faces.facelets.compiler.EncodingHandler.
>>
>> > apply(EncodingHandler.java:87)
>> >     at
>> > com.sun.faces.facelets.impl.DefaultFacelet.apply(DefaultFace
>> let.java:161)
>> >     at
>> > com.sun.faces.application.view.FaceletViewHandlingStrategy.buildView(
>> > FaceletViewHandlingStrategy.java:1006)
>> >     at
>> > com.sun.faces.lifecycle.RenderResponsePhase.execute(
>> > RenderResponsePhase.java:99)
>> >     at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
>> >     at com.sun.faces.lifecycle.LifecycleImpl.render(
>> > LifecycleImpl.java:219)
>> >     at
>> > org.apache.deltaspike.jsf.impl.listener.request.
>> > DeltaSpikeLifecycleWrapper.render(DeltaSpikeLifecycleWrapper.java:111)
>> >     at
>> > javax.faces.lifecycle.LifecycleWrapper.render(LifecycleWrapper.java:92)
>> >     at
>> > org.apache.deltaspike.jsf.impl.listener.request.
>> > JsfClientWindowAwareLifecycleWrapper.render(JsfClientWindowA
>> wareLifecycleW
>> > rapper.java:160)
>> >     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:659)
>> >     ... 27 more
>> >
>> >
>> > Any help is greatly appreciated.
>> >
>> >
>> > Thanks & Regards,
>> > Avinash
>> >
>>
>
>

Reply via email to