myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ing. Thomas Kernstock" <t.kernst...@e-technologies.at>
Subject CODI 0.9.1 + Primefaces 2.2RC2
Date Sat, 04 Dec 2010 00:46:07 GMT
Hi Gerhard,

it's me again. After implemeting
"myfaces-extcdi-dist-jsf20-0.9.1-20101128.193625-16.jar" I have a problem
with the "PrimeFaces2.2RC2 -> p:fileUpload".
Everthing works OK until I add the codi-lib. I get this excepetion on
uploading a file (I only copy the librarys to WEBINF/lib dir. and start the
server again.

INFO: END PHASE RESTORE_VIEW 1
SCHWERWIEGEND: javax.faces.application.ViewExpiredException:
viewId:/dokumente.jsf - Ansicht /dokumente.jsf konnte nicht
wiederhergestellt werden.
	at
com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:212)
	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
	at
com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:110)
	at
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
	at
org.apache.myfaces.extensions.cdi.jsf2.impl.listener.phase.CodiLifecycleWrap
per.execute(CodiLifecycleWrapper.java:70)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
	at
org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:343)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:215)
	at
org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java
:77)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:256)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:215)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:277)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:188)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
	at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
	at
com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLock
ingStandardPipeline.java:85)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185
)
	at
org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325
)
	at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:226)
	at
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.
java:165)
	at
com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
	at
com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
	at
com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
	at
com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.jav
a:170)
	at
com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolCh
ain.java:135)
	at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
	at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
	at
com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
	at
com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.jav
a:53)
	at
com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57
)
	at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
	at
com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.jav
a:330)
	at
com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:3
09)
	at java.lang.Thread.run(Thread.java:619) 


best regards

Thomas

-----Ursprüngliche Nachricht-----
Von: Mark Struberg [mailto:struberg@yahoo.de] 
Gesendet: Samstag, 27. November 2010 13:00
An: MyFaces Discussion
Betreff: Re: AW: AW: AW: CODI 0.9.0 + Glassfish V3.0.1 + EAR

Hi Thomas!

First: You don't need Verborghs extension anymore. It it a good introduction
sample to extension programming but was not production ready when I looked
it the last time. I wrote an extension which uses the JSF-2
javax.faces.bean.ViewScope annotation to maintain a CDI Context
implementation last year. The code is now included in CODI and Dan also used
it as base for his Seam3 context. Our code also deals with proper cleanup,
etc.

For  the glassfish issue:

a) could you please test it with Apache OpenWebBeans (latest from trunk) and
OpenEJB? David Jencks is currently working on a in depth geronimo
integration of OWB. If you write a question to the dev@geronimo.apache.org
list he might give you a quick info about the current status.

b) you might also ping the weld-dev@lists.jboss.org list to get more
information about the glassfish status.

And please keep on providing feedback, this is an important area in the
industry and I bet there are still a few issues left open - so any help and
especially feedback about common use cases is welcome!

LieGrue,
strub


--- On Fri, 11/26/10, Ing. Thomas Kernstock <t.kernstock@e-technologies.at>
wrote:

> From: Ing. Thomas Kernstock <t.kernstock@e-technologies.at>
> Subject: AW: AW: AW: CODI 0.9.0 + Glassfish V3.0.1 + EAR
> To: "'MyFaces Discussion'" <users@myfaces.apache.org>
> Date: Friday, November 26, 2010, 9:34 PM Hallo Mark,
> 
> I have to admit that I never used an @Intercepter till now.
> I simple wanted
> to add a CDI @ViewScope to my project. That was the reason why I tried 
> to include Seam3, Codi and at last the small @ViewScope implementation 
> posted by Verborgh at https://github.com/verborghs/jsf-cdi. I packed 
> the code into a jar added it to my EAR libs in the testproject and it 
> works. !!! But !!!!
> it only works as long as you don't use any EJBs from the ejb.jar. The 
> moment you include a jar file with a cdi-extension in your EAR - none 
> of the EJBs can be created anymore.
> 
> I think there is a huuuge bug in Glassfish-Weld installation I'm 
> using. What makes me wonder if I'm the only one having a project 
> constisting of a war and an ejb.jar deployed in an EAR, who wants to 
> use CDExtension. I mean this is not really uncommon, isn't it ?
> 
> Although I would appretiate your help very much, I'm aware of the fact 
> that my problem isn't CODI related ! But do you know anybody with a 
> project like mine who uses CODI successfully or do you know where I 
> could possibly download an example ? The ones that Gerhard provided 
> includes only a webproject !
>  
> Liebe Grüße
> Thomas
> 
> -----Ursprüngliche Nachricht-----
> Von: Mark Struberg [mailto:struberg@yahoo.de]
> 
> Gesendet: Freitag, 26. November 2010 18:04
> An: MyFaces Discussion
> Betreff: Re: AW: AW: CODI 0.9.0 + Glassfish V3.0.1 + EAR
> 
> oki, could you please test if any other @Interceptor in a jar works 
> for you?
> 
> LieGrue,
> strub
> 
> --- On Fri, 11/26/10, Ing. Thomas Kernstock 
> <t.kernstock@e-technologies.at>
> wrote:
> 
> > From: Ing. Thomas Kernstock <t.kernstock@e-technologies.at>
> > Subject: AW: AW: CODI 0.9.0 + Glassfish V3.0.1 + EAR
> > To: "'MyFaces Discussion'" <users@myfaces.apache.org>
> > Date: Friday, November 26, 2010, 4:50 PM Hi Mark,
> > 
> > second answer
> > -> in the link you provided the Fix Version for
> this
> > problem is 1.1.0 Beta
> > 1.   I checked the weld-bundle in my Glassfish installation. The 
> > Metafile
> > says->
> > Bundle-SymbolicName: org.jboss.weld.osgi-bundle
> > Implementation-Version: 1.0.1.SP3
> > Specification-Vendor: Seam Framework
> > Bundle-Name: Weld OSGi Bundle
> > Created-By: Apache Maven Bundle Plugin
> > 
> > So I'm afraid this problem still exists !
> > 
> > Thomas
> > 
> > ___________________________________
> > -----Ursprüngliche Nachricht-----
> > Von: Mark Struberg [mailto:struberg@yahoo.de]
> > 
> > Gesendet: Freitag, 26. November 2010 16:53
> > An: MyFaces Discussion
> > Betreff: Re: AW: CODI 0.9.0 + Glassfish V3.0.1 + EAR
> > 
> > which glassfish version are you using? There was an
> error in this area
> > in weld https://jira.jboss.org/browse/WELD-507
> > 
> > LieGrue,
> > strub
> > 
> > --- On Fri, 11/26/10, Ing. Thomas Kernstock 
> > <t.kernstock@e-technologies.at>
> > wrote:
> > 
> > > From: Ing. Thomas Kernstock <t.kernstock@e-technologies.at>
> > > Subject: AW: CODI 0.9.0 + Glassfish V3.0.1 + EAR
> > > To: "'MyFaces Discussion'" <users@myfaces.apache.org>
> > > Date: Friday, November 26, 2010, 3:34 PM Hi
> Gerhard,
> > > 
> > > thanx for the late reply or should I say early
> for
> > Vienna
> > > :-)
> > > 
> > > I knew that CDI-extensions work for projects
> without
> > an EAR File. What
> > > I found out today was, that I have to move
> librarys
> > with
> > > cdi-extensions to the EAR project and reference
> them
> > only instead of
> > > having them in the war-project. This works for a
> > testproject with
> > > Verborgs @ViewScope implementation but when I try
> this
> > with
> > > myfaces-codi I get the following
> > > error:
> > > 
> > > Deployment Error for module: TEST-EAR: Exception
> while
> > loading the app
> > > :
> > >
> org.glassfish.deployment.common.DeploymentException:
> > > WELD-001417 Enabled
> > > interceptor class class
> > >
> >
> org.apache.myfaces.extensions.cdi.jsf.impl.security.SecurityIntercepto
> > > r
> > > is
> > > neither annotated @Interceptor nor registered
> through
> > a portable
> > > extension%%%EOL%%%
> > > 
> > > Do you have any idea what could cause the problem
> ? 
> > > 
> > > Best regards
> > > 
> > > Thomas
> > > ___________________________________
> > > -----Ursprüngliche Nachricht-----
> > > Von: Gerhard [mailto:gerhard.petracek@gmail.com]
> > > 
> > > Gesendet: Freitag, 26. November 2010 03:11
> > > An: MyFaces Discussion
> > > Betreff: Re: CODI 0.9.0 + Glassfish V3.0.1 + EAR
> > > 
> > > hi thomas,
> > > 
> > > usually the mentioned exception occurs with
> servlet
> > containers if cdi
> > > wasn't configured correctly.
> > > in case of glassfish you don't need a special
> cdi
> > configuration.
> > > it >might< be a glassfish or weld issue in
> > combination with ears.
> > > at [1] you can find examples which are tested
> with
> > glassfish v3.
> > > 
> > > regards,
> > > gerhard
> > > 
> > > [1] http://bitbucket.org/os890/codi-examples
> > > 
> > > http://www.irian.at
> > > 
> > > Your JSF powerhouse -
> > > JSF Consulting, Development and
> > > Courses in English and German
> > > 
> > > Professional Support for Apache MyFaces
> > > 
> > > 
> > > 
> > > 2010/11/26 Ing. Thomas Kernstock <t.kernstock@e-technologies.at>
> > > 
> > > > Hi,
> > > >
> > > > I downloaded and built the last version of
> CODI
> > today,
> > > and included
> > > > the resulting
> > > myfaces-extcdi-dist-jsf20-0.9.1-SNAPSHOT.jar in
> my
> > > > Webproject (JSF2.0, CDI Enabled(=beans.xml
> in
> > place),
> > > Dependending on
> > > > the Glassfish
> > > > V3.0.1 libs).
> > > > This Webproject is part of an EAR which
> also
> > contains
> > > an EJB Project
> > > > with Entities,DTO's and Services. When I
> deploy
> > the
> > > EAR to my
> > > > Glassfishserver
> > > > V3.0.1 and start the application I get the
> > following
> > > error:
> > > >
> > > > WARNUNG: StandardWrapperValve[Faces
> Servlet]:
> > PWC1406:
> > > 
> > > > Servlet.service() for servlet Faces Servlet
> > threw
> > > exception
> > > > java.lang.IllegalStateException: no
> > > >
> > >
> >
> org.apache.myfaces.extensions.cdi.core.api.provider.BeanManagerProvide
> > > > r in place! Please ensure that you
> configured the
> > CDI
> > > implementation
> > > > of your choice properly.
> > > >  at
> > > >
> > > >
> > >
> >
> org.apache.myfaces.extensions.cdi.core.api.provider.BeanManagerProvide
> > > > r.getI
> > > > nstance(BeanManagerProvider.java:60)
> > > >  at
> > > >
> > > >
> > >
> >
> org.apache.myfaces.extensions.cdi.jsf2.impl.listener.request.CodiFaces
> > > > Contex
> > > >
> tWrapper.init(CodiFacesContextWrapper.java:62)
> > > >  at
> > > >
> > > >
> > >
> >
> org.apache.myfaces.extensions.cdi.jsf2.impl.listener.request.CodiFaces
> > > > Contex
> > > >
> > >
> >
> tWrapper.<init>(CodiFacesContextWrapper.java:57)
> > > >  at
> > > >
> > > >
> > >
> >
> org.apache.myfaces.extensions.cdi.jsf2.impl.listener.request.CodiFaces
> > > > Contex
> > > >
> > >
> >
> tFactory.getFacesContext(CodiFacesContextFactory.java:63)
> > > >  at
> > > >
> > > >
> > >
> >
> org.apache.myfaces.webapp.filter.TomahawkFacesContextFactory.getFacesC
> > > > ontext
> > > > (TomahawkFacesContextFactory.java:107)
> > > >  at
> > > >
> > > >
> > >
> >
> com.sun.faces.context.InjectionFacesContextFactory.getFacesContext(Inj
> > > > ection
> > > > FacesContextFactory.java:101)
> > > >  at
> > >
> >
> javax.faces.webapp.FacesServlet.service(FacesServlet.java:302)
> > > >  at
> > > >
> > >
> >
> org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:
> > > > 1523)
> > > >  at
> > > >
> > > >
> > >
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli
> > > > cation
> > > > FilterChain.java:343)
> > > >  at
> > > >
> > > >
> > >
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi
> > > > lterCh
> > > > ain.java:215)
> > > >  at
> > > >
> > > >
> > >
> >
> org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilte
> > > > r.java
> > > > :79)
> > > >  at
> > > >
> > > >
> > >
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli
> > > > cation
> > > > FilterChain.java:256)
> > > >  at
> > > >
> > > >
> > >
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi
> > > > lterCh
> > > > ain.java:215)
> > > >  at
> > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVa
> > > > lve.ja
> > > > va:277)
> > > >  at
> > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextVa
> > > > lve.ja
> > > > va:188)
> > > >  at
> > > >
> > >
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java
> > > > :641)  at
> > > >
> > >
> >
> com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
> > > >  at
> > > >
> > > >
> > >
> >
> com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessi
> > > > onLock
> > > > ingStandardPipeline.java:85)
> > > >  at
> > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.ja
> > > > va:185
> > > > )
> > > >  at
> > > >
> > > >
> > >
> >
> org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.ja
> > > > va:325
> > > > )
> > > >  at
> > > >
> > >
> >
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java
> > > > :226)
> > > >  at
> > > >
> > > >
> > >
> >
>
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.
> > > > java:165)
> > > >  at
> > > >
> > >
> >
> com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:79
> > > > 1)  at
> > > >
> > >
> >
> com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
> > > >  at
> > >
> >
> com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
> > > >  at
> > > >
> > > >
> > >
> >
> com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilt
> > > > er.jav
> > > > a:170)
> > > >  at
> > > >
> > > >
> > >
> >
> com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProt
> > > > ocolCh
> > > > ain.java:135)
> > > >  at
> > > >
> > >
> >
> com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java
> > > > :102)
> > > >  at
> > > >
> > >
> >
> com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java
> > > > :88)
> > > >  at
> > > >
> > >
> >
> com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:
> > > > 76)
> > > >  at
> > > >
> > > >
> > >
> >
> com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTa
> > > > sk.jav
> > > > a:53)
> > > >  at
> > > >
> > > >
> > >
> >
> com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.j
> > > > ava:57
> > > > )
> > > >  at
> > >
> com.sun.grizzly.ContextTask.run(ContextTask.java:69)
> > > >  at
> > > >
> > > >
> > >
> >
> com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPo
> > > > ol.jav
> > > > a:330)
> > > >  at
> > > >
> > > >
> > >
> >
> com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.
> > > > java:3
> > > > 09)
> > > >  at java.lang.Thread.run(Thread.java:619)
> > > >
> > > > Do I have to configure something in my
> > application ? I
> > > couldn't find
> > > > any hint in the documentation though !
> > > >
> > > > best regards
> > > > Thomas
> > > >
> > > >
> > > 
> > > 
> > 
> > 
> >       
> > 
> > 
> > 
> 
> 
>       
> 
> 
> 


      



Mime
View raw message