[JBoss JIRA] (WFLY-10281) NPE when initializing CDI bean during startup that injects PushContext
by Dmitrii Tikhomirov (JIRA)
[ https://issues.jboss.org/browse/WFLY-10281?page=com.atlassian.jira.plugin... ]
Dmitrii Tikhomirov updated WFLY-10281:
--------------------------------------
Attachment: jsf-pushcontext.tar.xz
> NPE when initializing CDI bean during startup that injects PushContext
> ----------------------------------------------------------------------
>
> Key: WFLY-10281
> URL: https://issues.jboss.org/browse/WFLY-10281
> Project: WildFly
> Issue Type: Bug
> Components: CDI / Weld, JSF
> Affects Versions: 12.0.0.Final
> Reporter: Rich DiCroce
> Assignee: Dmitrii Tikhomirov
> Attachments: jsf-pushcontext.tar.xz
>
>
> If a CDI bean injects PushContext (for JSF websocket support, new in JSF 2.3) and is instantiated during startup, a NullPointerException occurs.
> The offending method is part of Mojarra. Looking at the code, I'm guessing FacesContext is null since JSF has not initialized yet, and apparently the BeanManager has not been bound in JNDI yet either. It doesn't try CDI.current() at all, though I have no idea if that would help.
> I'm currently working around this by injecting Instance<PushContext> instead.
> {code}
> 2018-04-20 11:48:39,577 ERROR [com.sgi.song.gpnms.timer.ExecutorTimerService] (EE-ManagedExecutorService-default-Thread-2) Exception invoking timer com.sg.song.nms.endpoint.sbc.SmartBinOverviewBean performRefresh: java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_162]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_162]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_162]
> at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_162]
> at com.sgi.song.gpnms.timer.ExecutorTimerService.lambda$0(ExecutorTimerService.java:72) [gp-ispn-shared-2.0.0-SNAPSHOT.jar:]
> at com.sgi.song.gpnms.timer.ExecutorTimerService.lambda$2(ExecutorTimerService.java:199) [gp-ispn-shared-2.0.0-SNAPSHOT.jar:]
> at org.jboss.as.ee.concurrent.ControlPointUtils$ControlledRunnable.run(ControlPointUtils.java:105) [wildfly-ee-12.0.0.Final.jar:12.0.0.Final]
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [rt.jar:1.8.0_162]
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_162]
> at org.glassfish.enterprise.concurrent.internal.ManagedFutureTask.run(ManagedFutureTask.java:141) [javax.enterprise.concurrent-1.0.jar:]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_162]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_162]
> at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_162]
> at org.glassfish.enterprise.concurrent.ManagedThreadFactoryImpl$ManagedThread.run(ManagedThreadFactoryImpl.java:250) [javax.enterprise.concurrent-1.0.jar:]
> at org.jboss.as.ee.concurrent.service.ElytronManagedThreadFactory$ElytronManagedThread.run(ElytronManagedThreadFactory.java:78)
> Caused by: org.jboss.weld.exceptions.WeldException: WELD-000049: Unable to invoke void com.sg.song.nms.endpoint.sbc.SmartBinOverviewBean.init() on com.sg.song.nms.endpoint.sbc.SmartBinOverviewBean@7afeacb8
> at org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.invokeMethods(DefaultLifecycleCallbackInvoker.java:85) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
> at org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.postConstruct(DefaultLifecycleCallbackInvoker.java:66) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
> at org.jboss.weld.injection.producer.BasicInjectionTarget.postConstruct(BasicInjectionTarget.java:122) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
> at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:172) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
> at org.jboss.weld.contexts.AbstractContext.get(AbstractContext.java:96) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
> at org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.get(ContextualInstanceStrategy.java:100) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
> at org.jboss.weld.bean.ContextualInstanceStrategy$ApplicationScopedContextualInstanceStrategy.get(ContextualInstanceStrategy.java:140) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
> at org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.java:50) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
> at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:102) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
> at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:105) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
> at com.sg.song.nms.endpoint.sbc.SmartBinOverviewBean$Proxy$_$$_WeldClientProxy.performRefresh(Unknown Source) [classes:]
> ... 15 more
> Caused by: java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_162]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_162]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_162]
> at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_162]
> at org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.invokeMethods(DefaultLifecycleCallbackInvoker.java:83) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
> ... 25 more
> Caused by: java.lang.NullPointerException
> at com.sun.faces.cdi.CdiUtils.isScopeActive(CdiUtils.java:378) [jsf-impl-2.3.3.SP1.jar:2.3.3.SP1]
> at com.sun.faces.push.WebsocketPushContext.<init>(WebsocketPushContext.java:95) [jsf-impl-2.3.3.SP1.jar:2.3.3.SP1]
> at com.sun.faces.cdi.WebsocketPushContextProducer.produce(WebsocketPushContextProducer.java:86) [jsf-impl-2.3.3.SP1.jar:2.3.3.SP1]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_162]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_162]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_162]
> at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_162]
> at org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:95) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
> at org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:85) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
> at org.jboss.weld.injection.producer.ProducerMethodProducer.produce(ProducerMethodProducer.java:103) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
> at org.jboss.weld.injection.producer.AbstractMemberProducer.produce(AbstractMemberProducer.java:161) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
> at org.jboss.weld.bean.AbstractProducerBean.create(AbstractProducerBean.java:180) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
> at org.jboss.weld.contexts.unbound.DependentContextImpl.get(DependentContextImpl.java:70) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
> at org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.get(ContextualInstanceStrategy.java:100) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
> at org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.java:50) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
> at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:689) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
> at org.jboss.weld.manager.BeanManagerImpl.getInjectableReference(BeanManagerImpl.java:789) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
> at org.jboss.weld.injection.FieldInjectionPoint.inject(FieldInjectionPoint.java:92) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
> at org.jboss.weld.util.Beans.injectBoundFields(Beans.java:335) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
> at org.jboss.weld.util.Beans.injectFieldsAndInitializers(Beans.java:346) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
> at org.jboss.weld.injection.producer.ResourceInjector$1.proceed(ResourceInjector.java:69) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
> at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:48) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
> at org.jboss.weld.injection.producer.ResourceInjector.inject(ResourceInjector.java:71) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
> at org.jboss.weld.injection.producer.BasicInjectionTarget.inject(BasicInjectionTarget.java:117) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
> at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:159) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
> at org.jboss.weld.contexts.AbstractContext.get(AbstractContext.java:96) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
> at org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.get(ContextualInstanceStrategy.java:100) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
> at org.jboss.weld.bean.ContextualInstanceStrategy$ApplicationScopedContextualInstanceStrategy.get(ContextualInstanceStrategy.java:140) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
> at org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.java:50) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
> at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:102) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
> at org.jboss.weld.bean.proxy.ProxyMethodHandler.getInstance(ProxyMethodHandler.java:131) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
> at com.sg.song.nms.network.command.CommandSender$Proxy$_$$_WeldClientProxy.registerSender(Unknown Source) [classes:]
> at com.sg.song.nms.endpoint.sbc.SmartBinOverviewBean.init(SmartBinOverviewBean.java:86) [classes:]
> ... 30 more
> {code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 9 months
[JBoss JIRA] (DROOLS-2951) Unable to debug drools file with eclipse
by raghu thota (JIRA)
[ https://issues.jboss.org/browse/DROOLS-2951?page=com.atlassian.jira.plugi... ]
raghu thota updated DROOLS-2951:
--------------------------------
Issue Type: Bug (was: Feature Request)
> Unable to debug drools file with eclipse
> ----------------------------------------
>
> Key: DROOLS-2951
> URL: https://issues.jboss.org/browse/DROOLS-2951
> Project: Drools
> Issue Type: Bug
> Reporter: raghu thota
> Assignee: Mario Fusco
> Labels: Drools, debugging
>
> I am trying to debug a .drl file using Eclipse mars (version Mars.2 Release (4.5.2)) and drools version 5.5.0.FINAL. I have added drools runtime. After running the Junit test as "Debug as Drools Junit test" , I got the following error.
> An internal error occurred during: "Launching DroolsDummyTest.testHelloWorldRule (1)".
> org.drools.eclipse.launching.DroolsVMDebugger.renderProcessLabel([Ljava/lang/String;)Ljava/lang/String;
> This is the problem with incompatibility of drools and eclipse. I am able to debug other drools (version 5.5.0.FINAL) applications using Eclipse Helios. But, My current project is written in Java 7 which is not supported by Helios.
> I am referring the link : http://docs.jboss.org/drools/release/5.5.0.Final/drools-expert-docs/html/...
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 9 months
[JBoss JIRA] (JBMETA-404) Validation errors with "jboss-web_11_0.xsd
by ehsavoie Hugonnet (JIRA)
[ https://issues.jboss.org/browse/JBMETA-404?page=com.atlassian.jira.plugin... ]
ehsavoie Hugonnet resolved JBMETA-404.
--------------------------------------
Resolution: Done
> Validation errors with "jboss-web_11_0.xsd
> ------------------------------------------
>
> Key: JBMETA-404
> URL: https://issues.jboss.org/browse/JBMETA-404
> Project: JBoss Metadata
> Issue Type: Bug
> Affects Versions: 10.0.2.Final
> Reporter: ehsavoie Hugonnet
> Assignee: ehsavoie Hugonnet
> Fix For: 12.0.0.Final
>
>
> Eclipse reports some errors when validating a "jboss-web.xml" file which defines the 11.0 xsd.
> First problem: "web-app_3_1.xsd" is imported. The target namespace seems to be invalid, it should be "http://xmlns.jcp.org/xml/ns/javaee" instead of "http://java.sun.com/xml/ns/javaee"
> <xsd:import namespace="http://xmlns.jcp.org/xml/ns/javaee" schemaLocation="http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"/>
> The validation error: *"The namespace attribute 'http://java.sun.com/xml/ns/javaee' of an import element information must be identical to the targetNamespace attribute 'http://xmlns.jcp.org/xml/ns/javaee' of the imported document".*
> It would probably also make sense to include the full schemaLocation URL ;-).
> After fixing the namespace, there are four more errors left:
> *src-resolve: Cannot resolve the name 'jboss:jndiEnvironmentRefsGroup' to a( n ) group component
> src-resolve: Cannot resolve the name 'javaee:generic-booleanType' to a( n ) 'simpleType definition' component
> src-ct.2.1: Complex type definition Representation Error for type 'symbolic-link-allowedType' ...
> src-resolve: Cannot resolve the name 'jboss:security-roleType' to a( n ) 'type definition' component*
> The first two errors: previous versions of jboss-web.xsd imported "jboss-common_6_0.xsd" which defined a "jndiEnvironmentRefsGroup". This file also imported "javaee_6.xsd", which defines the "generic-booleanType".
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 9 months