Fórum

LF 6.2 JSF2.0 Name [BeanManager] is not bound in this Context. Unable to fi

stephen zambaux, modificado 9 Anos atrás.

LF 6.2 JSF2.0 Name [BeanManager] is not bound in this Context. Unable to fi

Junior Member Postagens: 63 Data de Entrada: 03/10/14 Postagens Recentes
Hi, I try to make a new project based on JSF 2.0 and I have this error on startup:

06:45:44,761 ERROR [localhost-startStop-1][CDIContextListener:66] javax.naming.NameNotFoundException: Name [BeanManager] is not bound in this Context. Unable to find [BeanManager].
javax.naming.NameNotFoundException: Name [BeanManager] is not bound in this Context. Unable to find [BeanManager].
	at org.apache.naming.NamingContext.lookup(NamingContext.java:819)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:830)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:830)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:167)
	at org.apache.naming.SelectorContext.lookup(SelectorContext.java:156)
	at javax.naming.InitialContext.lookup(InitialContext.java:417)
	at com.liferay.cdi.portlet.bridge.CDIContextListener.contextInitialized(CDIContextListener.java:61)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4992)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5490)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:672)
	at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1862)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	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)
06:45:44,763 ERROR [localhost-startStop-1][CDIContextListener:71] Unable to get CDI bean manager


my portlet.xml

	<filter>
	    <filter-name>CDIPortletFilter</filter-name>
	    <filter-class>com.liferay.cdi.portlet.bridge.CDIPortletFilter</filter-class>
	    <lifecycle>ACTION_PHASE</lifecycle>
	    <lifecycle>EVENT_PHASE</lifecycle>
	    <lifecycle>RENDER_PHASE</lifecycle>
	    <lifecycle>RESOURCE_PHASE</lifecycle>
	</filter>
	<filter-mapping>
	    <filter-name>CDIPortletFilter</filter-name>
	    <portlet-name>uploadInvoicePortlet</portlet-name>
</filter-mapping>


my web.xml:
<!-- Instruct Mojarra to utilize JBoss-EL instead of the EL implementation provided by the servlet container. -->
	<context-param>
		<param-name>com.sun.faces.expressionFactory</param-name>
		<param-value>org.jboss.el.ExpressionFactoryImpl</param-value>
	</context-param>
	<!-- Instruct Mojarra to namespace parameters according to NamingContainer rules. -->
	<!-- JAVASERVERFACES-3031 -->
	<!--
	<context-param>
		<param-name>com.sun.faces.namespaceParameters</param-name>
		<param-value>true</param-value>
	</context-param>
	-->
	<filter>
		<filter-name>CDICrossContextFilter</filter-name>
		<filter-class>com.liferay.cdi.portlet.bridge.CDICrossContextFilter</filter-class>
	</filter>
	<filter-mapping>
		<filter-name>CDICrossContextFilter</filter-name>
		<url-pattern>/*</url-pattern>
		<dispatcher>INCLUDE</dispatcher>
		<dispatcher>FORWARD</dispatcher>
		<dispatcher>ERROR</dispatcher>
	</filter-mapping>
	<filter>
		<filter-name>WeldCrossContextFilter</filter-name>
		<filter-class>org.jboss.weld.servlet.WeldCrossContextFilter</filter-class>
	</filter>
	<filter-mapping>
		<filter-name>WeldCrossContextFilter</filter-name>
		<url-pattern>/*</url-pattern>
		<dispatcher>INCLUDE</dispatcher>
		<dispatcher>FORWARD</dispatcher>
		<dispatcher>ERROR</dispatcher>
	</filter-mapping>
	<listener>
		<listener-class>org.jboss.weld.environment.servlet.Listener</listener-class>
	</listener>
	<listener>
		<listener-class>com.liferay.cdi.portlet.bridge.CDIContextListener</listener-class>
	</listener>



Thank you
thumbnail
Neil Griffin, modificado 9 Anos atrás.

RE: LF 6.2 JSF2.0 Name [BeanManager] is not bound in this Context. Unable t

Liferay Legend Postagens: 2655 Data de Entrada: 27/07/05 Postagens Recentes
Hi Stephen,

I looked at the source code and I think you might be using an old version of the Liferay CDI portlet bridge. When you get a chance, please upgrade to cdi-portlet-bridge-shared-6.2.0.2.jar and let us know if the problem goes away.

Kind Regards,

Neil
fstn fs, modificado 8 Anos atrás.

RE: LF 6.2 JSF2.0 Name [BeanManager] is not bound in this Context. Unable t

Junior Member Postagens: 63 Data de Entrada: 03/10/14 Postagens Recentes
Hi,
We just remove spring to add weld injection on our project, we still have this error:

06:24:40,473 ERROR [ContainerBackgroundProcessor[StandardEngine[Catalina]]][CDIContextListener:74] javax.naming.NameNotFoundException: Name [BeanManager] is not bound in this Context. Unable to find [BeanManager].
javax.naming.NameNotFoundException: Name [BeanManager] is not bound in this Context. Unable to find [BeanManager].
	at org.apache.naming.NamingContext.lookup(NamingContext.java:819)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:830)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:830)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:167)
	at org.apache.naming.SelectorContext.lookup(SelectorContext.java:156)
	at javax.naming.InitialContext.lookup(InitialContext.java:417)
	at com.liferay.cdi.portlet.bridge.CDIContextListener.contextInitialized(CDIContextListener.java:69)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4992)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5490)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.StandardContext.reload(StandardContext.java:4007)
	at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:425)
	at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1345)
	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1546)
	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1556)
	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1556)
	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1524)
	at java.lang.Thread.run(Thread.java:745)


our pom.xml file:


		<dependency>
			<groupid>com.liferay.faces</groupid>
			<artifactid>liferay-faces-bridge-impl</artifactid>
			<version>3.2.4-ga5</version>
		</dependency>
		<dependency>
			<groupid>com.liferay.portal</groupid>
			<artifactid>portal-service</artifactid>
			<version>6.2.1</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupid>com.liferay.cdi</groupid>
			<artifactid>cdi-portlet-bridge-shared</artifactid>
			<version>6.2.0.2</version>
		</dependency>
<dependency>
			<groupid>com.liferay.portal</groupid>
			<artifactid>util-bridges</artifactid>
			<version>6.2.3</version>
		</dependency>
		<dependency>
			<groupid>com.liferay.portal</groupid>
			<artifactid>util-java</artifactid>
			<version>6.2.3</version>
		</dependency>
		<dependency>
			<groupid>com.liferay.portal</groupid>
			<artifactid>util-taglib</artifactid>
			<version>6.2.3</version>
			<scope>compile</scope>
		</dependency>
               <dependency>
			<groupid>org.jboss.weld.servlet</groupid>
			<artifactid>weld-servlet</artifactid>
                        <version>1.1.10.FINAL</version>
		</dependency>
		<dependency>
			<groupid>org.jboss.weld</groupid>
			<artifactid>weld-core</artifactid>
                        <version>1.1.10.FINAL</version>
		</dependency>


Thanks for reading
thumbnail
Vernon Singleton, modificado 8 Anos atrás.

RE: LF 6.2 JSF2.0 Name [BeanManager] is not bound in this Context. Unable t

Expert Postagens: 315 Data de Entrada: 14/01/13 Postagens Recentes
Hi Fstn,

My suspicion is that you may be running into this issue JAVASERVERFACES-3501. The fix for this issue has not yet been back ported to mojarra 2.1 as far as I know. But I also cannot reproduce the issue right now, and I have no idea why. I thought this was still an issue with mojarra 2.1.

What version of JSF are you using?

Vernon


fstn fs:
Hi,
We just remove spring to add weld injection on our project, we still have this error:

06:24:40,473 ERROR [ContainerBackgroundProcessor[StandardEngine[Catalina]]][CDIContextListener:74] javax.naming.NameNotFoundException: Name [BeanManager] is not bound in this Context. Unable to find [BeanManager].
javax.naming.NameNotFoundException: Name [BeanManager] is not bound in this Context. Unable to find [BeanManager].
	at org.apache.naming.NamingContext.lookup(NamingContext.java:819)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:830)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:830)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:167)
	at org.apache.naming.SelectorContext.lookup(SelectorContext.java:156)
	at javax.naming.InitialContext.lookup(InitialContext.java:417)
	at com.liferay.cdi.portlet.bridge.CDIContextListener.contextInitialized(CDIContextListener.java:69)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4992)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5490)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.StandardContext.reload(StandardContext.java:4007)
	at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:425)
	at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1345)
	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1546)
	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1556)
	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1556)
	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1524)
	at java.lang.Thread.run(Thread.java:745)


our pom.xml file:


		<dependency>
			<groupid>com.liferay.faces</groupid>
			<artifactid>liferay-faces-bridge-impl</artifactid>
			<version>3.2.4-ga5</version>
		</dependency>
		<dependency>
			<groupid>com.liferay.portal</groupid>
			<artifactid>portal-service</artifactid>
			<version>6.2.1</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupid>com.liferay.cdi</groupid>
			<artifactid>cdi-portlet-bridge-shared</artifactid>
			<version>6.2.0.2</version>
		</dependency>
<dependency>
			<groupid>com.liferay.portal</groupid>
			<artifactid>util-bridges</artifactid>
			<version>6.2.3</version>
		</dependency>
		<dependency>
			<groupid>com.liferay.portal</groupid>
			<artifactid>util-java</artifactid>
			<version>6.2.3</version>
		</dependency>
		<dependency>
			<groupid>com.liferay.portal</groupid>
			<artifactid>util-taglib</artifactid>
			<version>6.2.3</version>
			<scope>compile</scope>
		</dependency>
               <dependency>
			<groupid>org.jboss.weld.servlet</groupid>
			<artifactid>weld-servlet</artifactid>
                        <version>1.1.10.FINAL</version>
		</dependency>
		<dependency>
			<groupid>org.jboss.weld</groupid>
			<artifactid>weld-core</artifactid>
                        <version>1.1.10.FINAL</version>
		</dependency>


Thanks for reading
fstn fs, modificado 8 Anos atrás.

RE: LF 6.2 JSF2.0 Name [BeanManager] is not bound in this Context. Unable t

Junior Member Postagens: 63 Data de Entrada: 03/10/14 Postagens Recentes
Hi Vernon,


thank you for your reply,we are using jsf 2.1.21. How can I add weld's BeanManager in Tomcat's JNDI, I can see code in .patch but I don't know where I need to do changes.


Maybe, I'll try to use JSF 2.2 instead
thumbnail
Vernon Singleton, modificado 8 Anos atrás.

RE: LF 6.2 JSF2.0 Name [BeanManager] is not bound in this Context. Unable t

Expert Postagens: 315 Data de Entrada: 14/01/13 Postagens Recentes
Hi fstn,

fstn fs:
Maybe, I'll try to use JSF 2.2 instead

Hmm ... I am seeing this error even with mojarra 2.2 now. I thought this was fixed in 2.2, so now I am confused.
This appears to be a benign error. All of our portlets still work even with this error.
Since this is not causing us any issues that I can see with the functionality of our portlets, I am marking this as a low priority issue with mojarra.

Question: Is this error actually causing some other symptom of failure, or causing you a problem with a portlet's functionality?
fstn fs, modificado 8 Anos atrás.

RE: LF 6.2 JSF2.0 Name [BeanManager] is not bound in this Context. Unable t

Junior Member Postagens: 63 Data de Entrada: 03/10/14 Postagens Recentes
No, there is no symptom of failure that cause a problem with a portlet's functionality.