(it really worked before i reinstalled my computer and it also works with weld)
--- Thomas Andraschko <[email protected]> schrieb am Di, 28.6.2011: Von: Thomas Andraschko <[email protected]> Betreff: Re: OWB with Seam? An: [email protected] Datum: Dienstag, 28. Juni, 2011 22:30 Uhr As you can see in the project uploaded at megaupload (it is linked in one of the older posts) the entitymanager is produced through seam with following producer field in my application: public class MyEntityManagerProducer { @ExtensionManaged @Produces @PersistenceUnit @ConversationScoped EntityManagerFactory myEntityManagerFactory; } --- Mark Struberg <[email protected]> schrieb am Di, 28.6.2011: Von: Mark Struberg <[email protected]> Betreff: Re: OWB with Seam? An: [email protected] Datum: Dienstag, 28. Juni, 2011 22:13 Uhr Yup, seems that the Producer method/field could not be found. How does the EM get produced? LieGrue, strub --- On Tue, 6/28/11, Joseph Bergmark <[email protected]> wrote: > From: Joseph Bergmark <[email protected]> > Subject: Re: OWB with Seam? > To: [email protected] > Date: Tuesday, June 28, 2011, 8:02 PM > I'm guessing somewhere in he > application or framework there is a > producer field or method that produces EntityManagers. > Maybe > something like the following from the spec: > > @Produces @PersistenceContext(unitName="CustomerDatabase") > @CustomerDatabase EntityManager > customerDatabasePersistenceContext; > > Then UserDaoImpl has "@Inject EntityManager foo;", but > OWB isn't > finding the producer or bean that provides EntityManagers. > Might be > useful to see how that EntityManager is intended to be > provided. > > Sincerely, > > Joe > > On Tue, Jun 28, 2011 at 3:45 PM, Thomas Andraschko > <[email protected]> > wrote: > > > > Last week i reinstalled my complete machine and i > tried to work on this issue again. > > The exception is gone but a new one occured (note: it > is the same project, same ubuntu, same java etc. as > before): > > > > SEVERE: Exception sending context initialized event to > listener instance of class > org.apache.webbeans.servlet.WebBeansConfigurationListener > > > javax.enterprise.inject.UnsatisfiedResolutionException: Api > type [javax.persistence.EntityManager] is not found with the > qualifiers > > Qualifiers: [@javax.enterprise.inject.Default()] > > for injection into Field Injection Point, field name > : entityManager, Bean Owner : [UserDaoImpl, Name:null, > WebBeans Type:MANAGED, API > Types:[de.test.jpa.UserDao,java.io.Serializable,de.test.jpa.UserDaoImpl,java.lang.Object], > Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default]] > > at > org.apache.webbeans.util.InjectionExceptionUtils.throwUnsatisfiedResolutionException(InjectionExceptionUtils.java:92) > > at > org.apache.webbeans.container.ResolutionUtil.checkResolvedBeans(ResolutionUtil.java:98) > > at > org.apache.webbeans.container.InjectionResolver.checkInjectionPoints(InjectionResolver.java:193) > > at > org.apache.webbeans.container.BeanManagerImpl.validate(BeanManagerImpl.java:1148) > > at > org.apache.webbeans.config.BeansDeployer.validate(BeansDeployer.java:390) > > at > org.apache.webbeans.config.BeansDeployer.validateInjectionPoints(BeansDeployer.java:334) > > at > org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:177) > > at > org.apache.webbeans.lifecycle.AbstractLifeCycle.startApplication(AbstractLifeCycle.java:129) > > at > org.apache.webbeans.web.lifecycle.WebContainerLifecycle.startApplication(WebContainerLifecycle.java:87) > > at > org.apache.webbeans.servlet.WebBeansConfigurationListener.contextInitialized(WebBeansConfigurationListener.java:81) > > at > org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4723) > > at > org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5226) > > at > org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5221) > > at > java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) > > at > java.util.concurrent.FutureTask.run(FutureTask.java:166) > > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) > > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) > > at java.lang.Thread.run(Thread.java:636) > > > > Any idea? > > > > --- Thomas Andraschko <[email protected]> > schrieb am Mi, 15.6.2011: > > > > Von: Thomas Andraschko <[email protected]> > > Betreff: Re: OWB with Seam? > > An: [email protected] > > Datum: Mittwoch, 15. Juni, 2011 23:02 Uhr > > > > dont know, its available under > org.jboss.seam.solder.el.ExpressionFactoryProducer. > > I will try to find solution for the NPE. > > > > @codi > > all right, i till try it and if i have an question, i > will post to the codi mailinglist. > > > > > > Thanks, > > Thomas > > > > --- Gerhard Petracek <[email protected]> > schrieb am Mi, 15.6.2011: > > > > Von: Gerhard Petracek <[email protected]> > > Betreff: Re: OWB with Seam? > > An: [email protected] > > Datum: Mittwoch, 15. Juni, 2011 22:46 Uhr > > > > a producer method for the expression factory sounds > strange as well. > > @codi: > > i'm not aware that you reported the issue and i never > heard about such an issue. > > you can generate a demo with mvn archetype:generate > -DarchetypeCatalog=http://myfaces.apache.org > > use #11 and you get a simple hello-world application > and you will see that the multi-window support works as > intended. > > regards, > > gerhard > > http://www.irian.at > > > > Your JSF powerhouse - > > JSF Consulting, Development and > > Courses in English and German > > > > Professional Support for Apache MyFaces > > > > > > > > 2011/6/15 Thomas Andraschko <[email protected]> > > > > It is not really independent, seam has an producer > method for the expression factory. > > > > > > @Offtopic regarding CODI > > I also tried to use codi some months before but i had > an problem with multiple windows. > > Is it possible to use multiple windows without > problems? I had a weird problem that all pages had the same > window id and so it was not possible to use all windows the > same time. > > > > --- Gerhard Petracek <[email protected]> > schrieb am Mi, 15.6.2011: > > > > Von: Gerhard Petracek <[email protected]> > > Betreff: Re: OWB with Seam? > > An: [email protected] > > Datum: Mittwoch, 15. Juni, 2011 22:20 Uhr > > > > it sounds strange that you had to change a jar which > is completely independent of cdi. > > esp. that doesn't sound like an owb issue. i never > used seam-faces, but owb + myfaces codi works pretty well in > several real world projects. > > regards, > > gerhard > > > > http://www.irian.at > > > > Your JSF powerhouse - > > JSF Consulting, Development and > > Courses in English and German > > > > Professional Support for Apache MyFaces > > > > > > > > 2011/6/15 Thomas Andraschko <[email protected]> > > > > Hi Gerhard, Hi Mark, > > > > i dont know why but the error is gone! > > > > I uploaded a example here: http://www.megaupload.com/?d=0CF4EVCP > > I wonder why the many ClassNotFoundExceptions does not > occur with weld? In the pom.xml you can find dependencies > (they are marked with a comment) which are only required > with OWB! > > > > After removing the final method in Tomcat's > ExpressionFactory in the el-api, i get following exception. > I think there is more effort needed. > > > > > > javax.faces.FacesException: > java.lang.IllegalStateException: Could not start > transaction > > at > org.apache.myfaces.shared_impl.context.ExceptionHandlerImpl.wrap(ExceptionHandlerImpl.java:241) > > at > org.apache.myfaces.shared_impl.context.ExceptionHandlerImpl.handle(ExceptionHandlerImpl.java:156) > > at > org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:191) > > at > org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) > > at > javax.faces.webapp.FacesServlet.service(FacesServlet.java:189) > > at > org.apache.myfaces.webapp.MyFacesServlet.service(MyFacesServlet.java:108) > > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304) > > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) > > at > com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:118) > > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) > > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) > > at > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240) > > at > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164) > > at > org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462) > > at > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164) > > at > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) > > at > org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563) > > at > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) > > at > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:399) > > at > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:317) > > at > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:204) > > at > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:182) > > at > org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:311) > > at > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) > > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) > > at java.lang.Thread.run(Thread.java:662) > > Caused by: java.lang.IllegalStateException: Could not > start transaction > > at > org.jboss.seam.faces.transaction.TransactionPhaseListener.begin(TransactionPhaseListener.java:96) > > at > org.jboss.seam.faces.transaction.TransactionPhaseListener.begin(TransactionPhaseListener.java:86) > > at > org.jboss.seam.faces.transaction.TransactionPhaseListener.handleTransactionsBeforePhase(TransactionPhaseListener.java:67) > > at > org.jboss.seam.faces.transaction.TransactionPhaseListener.beforePhase(TransactionPhaseListener.java:49) > > at > org.jboss.seam.faces.event.DelegatingPhaseListener.beforePhase(DelegatingPhaseListener.java:28) > > at > org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersBefore(PhaseListenerManager.java:76) > > at > org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:159) > > ... 23 more > > Caused by: java.lang.RuntimeException: > java.lang.NullPointerException > > at > org.jboss.seam.persistence.ManagedPersistenceContextBeanLifecycle.create(ManagedPersistenceContextBeanLifecycle.java:126) > > at > org.jboss.seam.persistence.ManagedPersistenceContextBeanLifecycle.create(ManagedPersistenceContextBeanLifecycle.java:46) > > at > org.jboss.seam.solder.bean.ImmutableBean.create(ImmutableBean.java:87) > > at > org.apache.webbeans.component.third.ThirdpartyBeanImpl.create(ThirdpartyBeanImpl.java:93) > > at > org.apache.webbeans.context.creational.BeanInstanceBag.create(BeanInstanceBag.java:80) > > at > org.apache.webbeans.context.AbstractContext.getInstance(AbstractContext.java:225) > > at > org.apache.webbeans.context.AbstractContext.get(AbstractContext.java:190) > > at > org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.getContextualInstance(NormalScopedBeanInterceptorHandler.java:135) > > at > org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.invoke(NormalScopedBeanInterceptorHandler.java:95) > > at > org.javassist.tmp.java.lang.Object_$$_javassist_23.getTransaction(Object_$$_javassist_23.java) > > at > org.jboss.seam.transaction.EntityTransaction.getDelegate(EntityTransaction.java:69) > > at > org.jboss.seam.transaction.EntityTransaction.getStatus(EntityTransaction.java:135) > > at > org.jboss.seam.transaction.AbstractUserTransaction.isActiveOrMarkedRollback(AbstractUserTransaction.java:47) > > at > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > > at > java.lang.reflect.Method.invoke(Method.java:597) > > at > org.apache.webbeans.intercept.InterceptorHandler.invoke(InterceptorHandler.java:295) > > at > org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.invoke(NormalScopedBeanInterceptorHandler.java:98) > > at > org.jboss.seam.transaction.EntityTransaction_$$_javassist_22.isActiveOrMarkedRollback(EntityTransaction_$$_javassist_22.java) > > at > org.jboss.seam.faces.transaction.TransactionPhaseListener.begin(TransactionPhaseListener.java:91) > > ... 29 more > > Caused by: java.lang.NullPointerException > > at > org.apache.webbeans.container.InjectionResolver.getInjectionPointBean(InjectionResolver.java:240) > > at > org.apache.webbeans.container.BeanManagerImpl.getInjectableReference(BeanManagerImpl.java:810) > > at > org.apache.webbeans.container.InjectableBeanManager.getInjectableReference(InjectableBeanManager.java:127) > > at > org.jboss.seam.persistence.util.InstanceResolver.getInstance(InstanceResolver.java:59) > > at > org.jboss.seam.persistence.util.InstanceResolver.getInstance(InstanceResolver.java:51) > > at > org.jboss.seam.persistence.PersistenceContextProxyHandler.<init>(PersistenceContextProxyHandler.java:52) > > at > org.jboss.seam.persistence.ManagedPersistenceContextProxyHandler.<init>(ManagedPersistenceContextProxyHandler.java:71) > > at > org.jboss.seam.persistence.ManagedPersistenceContextBeanLifecycle.create(ManagedPersistenceContextBeanLifecycle.java:116) > > ... 49 more > > > > > > --- Gerhard Petracek <[email protected]> > schrieb am Mi, 15.6.2011: > > > > Von: Gerhard Petracek <[email protected]> > > Betreff: Re: OWB with Seam? > > An: [email protected] > > Datum: Mittwoch, 15. Juni, 2011 21:09 Uhr > > > > hi thomas, > > you can build it from source [1] or you use the latest > snapshot (deployed to [2]). > > regards, > > gerhard > > [1] https://svn.apache.org/repos/asf/openwebbeans/trunk/ > > [2] https://repository.apache.org/content/repositories/snapshots/org/apache/openwebbeans/ > > > > http://www.irian.at > > > > Your JSF powerhouse - > > JSF Consulting, Development and > > Courses in English and German > > > > Professional Support for Apache MyFaces > > > > > > > > 2011/6/15 Thomas Andraschko <[email protected]> > > > > Hi Mark, > > > > where can i get the latest snapshot? > > I just create the test project which i will post > later. > > > > Thanks, > > Thomas > > > > --- Mark Struberg <[email protected]> > schrieb am Mi, 15.6.2011: > > > > Von: Mark Struberg <[email protected]> > > Betreff: Re: OWB with Seam? > > An: [email protected] > > Datum: Mittwoch, 15. Juni, 2011 13:35 Uhr > > > > Hi! > > > > I remember that I fixed a similar error a few weeks > ago. Can you please try if it works with the latest snapshot > version? > > > > txs and LieGrue, > > strub > > > > > > --- On Wed, 6/15/11, Gerhard Petracek <[email protected]> > wrote: > > > > From: Gerhard Petracek <[email protected]> > > Subject: Re: OWB with Seam? > > To: [email protected] > > Date: Wednesday, June 15, 2011, 9:52 AM > > > > hi thomas, > > if you provide a test-project, please upload it to an > external location (e.g. a public repository) and just send a > link to it. > > regards,gerhard > > > > > > > > http://www.irian.at > > > > Your JSF powerhouse - > > JSF Consulting, Development and > > Courses in English and German > > > > Professional Support for Apache MyFaces > > > > > > > > 2011/6/15 Thomas Andraschko <[email protected]> > > > > > > Hi Gerhard, > > > > no problem, i will post more details and my test > project this evening. > > > > Best regards, > > Thomas > > > > > > > > --- Gerhard Petracek <[email protected]> > schrieb am Mi, 15.6.2011: > > > > > > > > Von: Gerhard Petracek <[email protected]> > > Betreff: Re: OWB with Seam? > > An: [email protected] > > > > > > Datum: Mittwoch, 15. Juni, 2011 11:36 Uhr > > > > hi thomas, > > please provide more details - e.g. the dependency > problems you saw, modules you are using,... > > > > > > regards,gerhard > > > > http://www.irian.at > > > > > > > > Your JSF powerhouse - > > JSF Consulting, Development and > > Courses in English and German > > > > Professional Support for Apache MyFaces > > > > > > > > 2011/6/15 Thomas Andraschko <[email protected]> > > > > > > > > > > Hi, > > > > i tried to get Seam running on OWB. After same > dependency problems (which only occurs with OWB) and some > small fixes on Seam, i finally get following exception: > > > > > > > > > > > > > org.apache.webbeans.exception.definition.DuplicateDefinitionException: > PassivationCapable bean id is not unique: > PRODUCERFIELD#interface > java.util.List#@javax.enterprise.inject.Any(),@javax.enterprise.inject.Default(), > bean:Name:null,WebBeans Type:PRODUCERFIELD,API > Types:[java.util.List,java.lang.Iterable,java.util.Collection,java.lang.Object],Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default] > > > > > > > > > > at > org.apache.webbeans.container.BeanManagerImpl.addPassivationInfo(BeanManagerImpl.java:398) > > at > org.apache.webbeans.container.BeanManagerImpl.addInternalBean(BeanManagerImpl.java:370) > > at > > > org.apache.webbeans.container.BeanManagerImpl.addBean(BeanManagerImpl.java:357) > > > > > > at > org.apache.webbeans.util.WebBeansUtil.defineManagedBean(WebBeansUtil.java:2696) > > at > org.apache.webbeans.config.BeansDeployer.defineManagedBean(BeansDeployer.java:857) > > > > > > at > > > org.apache.webbeans.config.BeansDeployer.deploySingleAnnotatedType(BeansDeployer.java:538) > > at > org.apache.webbeans.config.BeansDeployer.deployFromClassPath(BeansDeployer.java:483) > > at > org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:164) > > > > > > > > > > at > org.apache.webbeans.lifecycle.AbstractLifeCycle.startApplication(AbstractLifeCycle.java:124) > > at > org.apache.webbeans.web.lifecycle.WebContainerLifecycle.startApplication(WebContainerLifecycle.java:77) > > at > org.apache.webbeans.servlet.WebBeansConfigurationListener.contextInitialized(WebBeansConfigurationListener.java:81) > > > > > > > > > > at > org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4723) > > at > > > org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5226) > > at > org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5221) > > > > > > at > java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) > > > > > > at > > > java.util.concurrent.FutureTask.run(FutureTask.java:138) > > at > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) > > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) > > > > > > > > > > at java.lang.Thread.run(Thread.java:662) > > > > How can i find the problem? > > Did anyone tried Seam with OWB before? > > > > Thanks and best regards, > > Thomas > > > > > > > > > > > > > > > > > > > > > > > > >
