[EJB 3.0] - Re: PersistenceContext injection into a JSF-technology manag
by pedalshoe
Is there an update for this?
I received this error trying to use the my EntityManagerFactory:
| @PersistenceUnit(unitName = "CRUDPU")
| private EntityManagerFactory emf = null;
|
| public EntityManager getEntityManager() {
| return emf.createEntityManager();
| }
|
The exception:
18:03:27,156 ERROR [JBossInjectionProvider] Injection failed on managed bean.
| javax.naming.NameNotFoundException: com.cml.entities.ConsumerController not bound
| at org.jnp.server.NamingServer.getBinding(NamingServer.java:542)
| at org.jnp.server.NamingServer.getBinding(NamingServer.java:550)
| at org.jnp.server.NamingServer.getObject(NamingServer.java:556)
| at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:669)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:629)
| at javax.naming.InitialContext.lookup(InitialContext.java:351)
| at org.jboss.web.jsf.integration.injection.JBossInjectionProvider.lookupFieldResource(JBossInjectionProvider.java:241)
| at org.jboss.web.jsf.integration.injection.JBossInjectionProvider.inject(JBossInjectionProvider.java:169)
| at com.sun.faces.config.ManagedBeanFactoryImpl.newInstance(ManagedBeanFactoryImpl.java:298)
| at com.sun.faces.application.ApplicationAssociate.createAndMaybeStoreManagedBeans(ApplicationAssociate.java:527)
| at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:82)
| at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
| at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
| at org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:45)
| at org.apache.el.parser.AstValue.getTarget(AstValue.java:43)
| at org.apache.el.parser.AstValue.invoke(AstValue.java:132)
| at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
| at org.apache.jasper.el.JspMethodExpression.invoke(JspMethodExpression.java:68)
| at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
| at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
| at javax.faces.component.UICommand.broadcast(UICommand.java:383)
| at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:447)
| at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:752)
| at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
| at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
| at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:189)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:90)
| at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:96)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:309)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Thread.java:595)
| 18:03:29,125 WARN [lifecycle] executePhase(RENDER_RESPONSE 6,com.sun.faces.context.FacesContextImpl@88249c) threw exception
| javax.faces.FacesException: org.apache.jasper.el.JspELException: /User/consumer/List.jsp(15,0) '#{consumer.itemCount == 0}' Error reading 'itemCount' on type com.entities.ConsumerController
| at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:373)
| at javax.faces.component.UIComponent.encodeAll(UIComponent.java:880)
| at javax.faces.render.Renderer.encodeChildren(Renderer.java:137)
| at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
| at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
| at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
| at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:245)
| at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:176)
| at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
| at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
| at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:189)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:90)
| at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:96)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:309)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: org.apache.jasper.el.JspELException: /User/consumer/List.jsp(15,0) '#{consumer.itemCount == 0}' Error reading 'itemCount' on type com.cml.entities.ConsumerController
| at org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:107)
| at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:370)
| ... 30 more
| Caused by: java.lang.NullPointerException
| at com.cml.entities.ConsumerController.getEntityManager(ConsumerController.java:39)
| at com.cml.entities.ConsumerController.getItemCount(ConsumerController.java:481)
| 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:585)
| at javax.el.BeanELResolver.getValue(BeanELResolver.java:62)
| at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
| at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
| at org.apache.el.parser.AstValue.getValue(AstValue.java:98)
| at org.apache.el.parser.AstEqual.getValue(AstEqual.java:21)
| at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
| at org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:101)
| ... 31 more
| 18:03:29,390 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
| java.lang.NullPointerException
|
| at com.cml.entities.ConsumerController.getEntityManager(ConsumerController.java:39)
| at com.cml.entities.ConsumerController.getItemCount(ConsumerController.java:481)
| 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:585)
| at javax.el.BeanELResolver.getValue(BeanELResolver.java:62)
| at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
| at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
| at org.apache.el.parser.AstValue.getValue(AstValue.java:98)
| at org.apache.el.parser.AstEqual.getValue(AstEqual.java:21)
| at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
| at org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:101)
| at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:370)
| at javax.faces.component.UIComponent.encodeAll(UIComponent.java:880)
| at javax.faces.render.Renderer.encodeChildren(Renderer.java:137)
| at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
| at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
| at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
| at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:245)
| at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:176)
| at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
| at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
| at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:189)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:90)
| at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:96)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:309)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Thread.java:595)
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4148461#4148461
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4148461
16 years, 4 months
[JBoss Portal] - Re: Class 'tidy' not found in PHP application on JBoss Porta
by PeterJ
Hmm. The Win32 variant of the JBoss Native PHP download includes php_tiny.dll in the bin/ext directory. But the Linux variant does not, so I am not sure how the tiny module gets packaged. Downloading the tiny tar.gz from the PHP site doesn't help, either. Perhaps it gets bundled into the lib*.so files in the lib directory?
And unfortunately the update from Kunbuntu 7.11 to 8.4 made my Kunbuntu desktop unusable and I am in the middle of installing 8.4 from scratch so I cannot research the problem at this time. And JavaOne is next week, so I will be away from my desktop for a week. If you haven't found a solution by May 12th, ping me again, I will probably have time then.
Of course, any PHP experts out there should feel free to chime in. The solution is to make sure that the tiny module (whichever .so file it is in) is in the LD_LIBRARY_PATH, or that it is included in the java.library.path system property setting.
By the way, if you followed the typical JBoss Native PHP installation instructions, I seem to recall that it asks you to copy the libphp5.so file to the jboss_home/bin/native directory. If that is what you did, try copying over the rest of the lib*.so files from PHP/lib to bin/native.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4148457#4148457
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4148457
16 years, 4 months
[JBoss jBPM] - Re: integration with JBoss Rules engine?
by mpopova
Great, thanks a lot for the answer.
I just want to clarify one thing: so, basically, you are saying that it is possible to modify the workflow process definition at run time, yes?
Indeed, this is exactly what I am looking for - to be able, at any point in the execution of one process instance , to modify the rest of the workflow process instance based on the input from , for example, a rule engine.
A good example of this functionality is an Out-Of-Office rule - at each approval step (process node), before sending a notification for approval to the approver, check whether he is out of office, and if so - replace this approver with a new one and possibly modify the rest of the approval chain as well.
Thanks
Marina
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4148449#4148449
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4148449
16 years, 4 months
[Messaging, JMS & JBossMQ] - MDB not "watching" queue?
by scooter4j
JBoss 4.2.2
EJB 2.1
I have an MDB configured to process messages off of a given queue but it doesn't seem to realize that messages are accumulating in the queue.... it's like it doesn't even see the queue.
ejb-jar snippet:
<message-driven>
<ejb-name>SQMessageHandler</ejb-name>
<ejb-class>com.scott.messaging.MessageHandlerEJB</ejb-class>
<messaging-type>javax.jms.MessageListener</messaging-type>
<transaction-type>Bean</transaction-type>
<message-selector>selectorKey='order'</message-selector>
<message-driven-destination>
<destination-type>javax.jms.Queue</destination-type>
</message-driven-destination>
</message-driven>
jboss.xml snippet:
<enterprise-beans>
<message-driven>
<ejb-name>SQMessageHandler</ejb-name>
<configuration-name>Standard Message Driven Bean</configuration-name>
<destination-jndi-name>jms/OrderQueue</destination-jndi-name>
</message-driven>
</enterprise-beans>
Now, jms/OrderQueue is set up properly - I can see messages accumulating in there - I just don't know why these messages aren't being passed to the onMessage method of my MDB...(btw, I know my MDB is built correctly b/c we've been using it under another application server - I'm currently investigation the steps necessary to migrate to JBoss...)
I hope someone can help!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4148446#4148446
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4148446
16 years, 4 months