deltaspike-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Kernstock <t.kernst...@e-technologies.at>
Subject AW: Deltaspike 1.8.2 -> 1.9.3
Date Thu, 09 Apr 2020 12:15:17 GMT
Servus Mark,

I replaced the deltaspike modules with version 1.9.3 again, to include the CDI check in. What
I didn't see on the first try was the warning in eclipse, "No bean is eligible for injection
to the injection point [JSR-365 §5.2.2]" for the Logger and the ApplicationConfig Bean which
is located in another project. I don't know why this has to do with deltaspike, but this warning
isn't there when I use 1.8.2. Furthermore the JBoss Tools CDI Builder produces a Nullpointer
Exception while building the projects. This is very weird.

Anyway - the following bean is called right after deployment. I debugged the CDI.current()
and it seems to be fine. I can see the Beanmanager etc. So there are no null values.

@Eager
@ApplicationScoped
public class ConfigureApplication {
	@Inject ApplicationConfig appConfig;
	@Inject Logger logger;
	@Inject private ProjectStage projectStage;
	
	@PostConstruct
	public void init(){
		CDI<Object> cdi= CDI.current();
		
		if (ProjectStage.Production.equals(projectStage)) {
			appConfig.setBetriebsmodusTest(false);
			appConfig.setSendEmail(true);
		} else {
			appConfig.setSendEmail(false);
			appConfig.setBetriebsmodusTest(true);
		}
		logger.info("=== StartupConfig was called. Serverinfo: " + ((ServletContext) FacesContext.getCurrentInstance().getExternalContext().getContext()).getServerInfo());
	
		logger.info("=== JSF Stage: {} ", FacesContext.getCurrentInstance().getApplication().getProjectStage().toString());
		logger.info("=== Deltaspike: {} ",projectStage.toString());
		logger.info("=== Sendmails: {} ", appConfig.isSendEmail());

	}
}

But the Nullpointer I reported occurred on the first call of a page.

Liebe Grüße
Thomas

-----Ursprüngliche Nachricht-----
Von: Mark Struberg <struberg@yahoo.de.INVALID> 
Gesendet: Donnerstag, 9. April 2020 11:08
An: users@deltaspike.apache.org
Betreff: Re: Deltaspike 1.8.2 -> 1.9.3

Hmm, this means the BeanManager is null? 

Might habe to do with DELTASPIKE-1398?

I suspect the following change in BeanManagerProvider, but would need to debug into:

-        if (cdiClass != null && !CoreBaseConfig.BeanManagerIntegration.DELEGATE_LOOKUP)
+        if (cdiClass != null && CoreBaseConfig.BeanManagerIntegration.DELEGATE_LOOKUP)

the delegate_lookup got reversed.
Are we sure we use CDI.current() in your case, Thomas K? Can you please debug into this?

Happy to look at it together via hangout.


LieGrue,
strub



> Am 06.04.2020 um 20:36 schrieb Thomas Kernstock <t.kernstock@e-technologies.at>:
> 
> Hi guys,
> 
> Me again. After a while I tried upgrading to 1.9.3 again.
> Right now my application is running perfectly fine on Payarafish 5.201 with Deltaspike
1.8.2, Omnifaces 3.3. and Primefaces  8.0. In my project I use the modules
> 
>  *   Bean-validation
>  *   JPA
>  *   JSF (Proxy and Security)
>  *   Partial-bean
> 
> When I replace the Deltaspike jars with 1.9.3 there are no problems in eclipse (like
in my mail from February) Instead I get a stacktrace while deploying the application:
> 
> 2020-04-06T20:27:54.823+0200|INFORMATION: Karriereportal was successfully deployed in
17.698 milliseconds.
> 2020-04-06T20:28:17.326+0200|WARNUNG: BeanProvider shall not be used to create @Dependent
scoped beans. Bean: Producer Method [WindowContext] with qualifiers [@Default @Named @Any]
declared as [[BackedAnnotatedMethod] @Produces @Named @Dependent public org.apache.deltaspike.core.impl.scope.window.WindowContextProducer.getWindowContext()]
> 2020-04-06T20:28:17.357+0200|SCHWERWIEGEND: [1876507d-b3e1-4a25-bba2-f108db145eba][0:0:0:0:0:0:0:1]
FacesExceptionFilter: An exception occurred during processing servlet request. Error page
'/errorpages/error.jsp' will be shown.
> java.lang.NullPointerException
>       at org.apache.deltaspike.jsf.impl.listener.system.JsfSystemEventBroadcaster.processEvent(JsfSystemEventBroadcaster.java:56)
>       at javax.faces.event.SystemEvent.processListener(SystemEvent.java:123)
>       at com.sun.faces.application.applicationimpl.Events.processListeners(Events.java:253)
>       at com.sun.faces.application.applicationimpl.Events.invokeListenersFor(Events.java:231)
>       at com.sun.faces.application.applicationimpl.Events.publishEvent(Events.java:115)
>       at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:127)
>       at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:119)
>       at javax.faces.application.ApplicationWrapper.publishEvent(ApplicationWrapper.java:776)
>       at javax.faces.application.ApplicationWrapper.publishEvent(ApplicationWrapper.java:776)
>       at javax.faces.application.ApplicationWrapper.publishEvent(ApplicationWrapper.java:776)
>       at javax.faces.application.ApplicationWrapper.publishEvent(ApplicationWrapper.java:776)
>       at org.apache.deltaspike.jsf.impl.injection.InjectionAwareApplicationWrapper.publishEvent(InjectionAwareApplicationWrapper.java:148)
>       at com.sun.faces.lifecycle.Phase.queueException(Phase.java:135)
>       at com.sun.faces.lifecycle.Phase.queueException(Phase.java:124)
>       at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:84)
>       at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:110)
>       at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:177)
>       at org.apache.deltaspike.jsf.impl.listener.request.DeltaSpikeLifecycleWrapper.execute(DeltaSpikeLifecycleWrapper.java:89)
>       at javax.faces.lifecycle.LifecycleWrapper.execute(LifecycleWrapper.java:73)
>       at javax.faces.webapp.FacesServlet.executeLifecyle(FacesServlet.java:707)
>       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:451)
>       at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1636)
>       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:331)
>       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:211)
>       at org.omnifaces.filter.FacesExceptionFilter.doFilter(FacesExceptionFilter.java:133)
>       at org.omnifaces.filter.FacesExceptionFilter.doFilter(FacesExceptionFilter.java:118)
>       at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:108)
>       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:253)
>       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:211)
>       at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:89)
>       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:253)
>       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:211)
>       at org.glassfish.tyrus.servlet.TyrusServletFilter.doFilter(TyrusServletFilter.java:282)
>       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:253)
>       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:211)
>       at org.omnifaces.filter.CacheControlFilter.doFilter(CacheControlFilter.java:239)
>       at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:108)
>       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:253)
>       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:211)
>       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:257)
>       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
>       at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:757)
>       at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:577)
>       at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
>       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:158)
>       at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:371)
>       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:238)
>       at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:520)
>       at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:217)
>       at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:182)
>       at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:156)
>       at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:218)
>       at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:95)
>       at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:260)
>       at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:177)
>       at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:109)
>       at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:88)
>       at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:53)
>       at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:524)
>       at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:89)
>       at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:94)
>       at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:33)
>       at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:114)
>       at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:569)
>       at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:549)
>       at java.lang.Thread.run(Thread.java:748)
> 
> 2020-04-06T20:28:18.063+0200|SCHWERWIEGEND: [df043efb-6374-4d9a-9595-bdb71e54c54e][0:0:0:0:0:0:0:1]
FacesExceptionFilter: An exception occurred during processing servlet request. Error page
'/errorpages/error.jsp' will be shown.
> java.lang.NullPointerException
>       at org.apache.deltaspike.core.api.provider.BeanProvider.getContextualReference(BeanProvider.java:144)
>       at org.apache.deltaspike.jsf.impl.listener.request.DeltaSpikeFacesContextWrapper.init(DeltaSpikeFacesContextWrapper.java:157)
>       at org.apache.deltaspike.jsf.impl.listener.request.DeltaSpikeFacesContextWrapper.lazyInit(DeltaSpikeFacesContextWrapper.java:147)
>       at org.apache.deltaspike.jsf.impl.listener.request.DeltaSpikeFacesContextWrapper.broadcastDestroyedJsfRequestEvent(DeltaSpikeFacesContextWrapper.java:136)
>       at org.apache.deltaspike.jsf.impl.listener.request.DeltaSpikeFacesContextWrapper.release(DeltaSpikeFacesContextWrapper.java:104)
>       at javax.faces.context.FacesContextWrapper.release(FacesContextWrapper.java:319)
>       at org.primefaces.context.PrimeFacesContext.release(PrimeFacesContext.java:123)
>       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:454)
>       at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1636)
>       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:331)
>       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:211)
>       at org.omnifaces.filter.FacesExceptionFilter.doFilter(FacesExceptionFilter.java:133)
>       at org.omnifaces.filter.FacesExceptionFilter.doFilter(FacesExceptionFilter.java:118)
>       at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:108)
>       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:253)
>       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:211)
>       at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:89)
>       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:253)
>       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:211)
>       at org.glassfish.tyrus.servlet.TyrusServletFilter.doFilter(TyrusServletFilter.java:282)
>       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:253)
>       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:211)
>       at org.omnifaces.filter.CacheControlFilter.doFilter(CacheControlFilter.java:239)
>       at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:108)
>       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:253)
>       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:211)
>       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:257)
>       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
>       at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:757)
>       at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:577)
>       at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
>       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:158)
>       at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:371)
>       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:238)
>       at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:520)
>       at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:217)
>       at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:182)
>       at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:156)
>       at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:218)
>       at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:95)
>       at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:260)
>       at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:177)
>       at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:109)
>       at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:88)
>       at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:53)
>       at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:524)
>       at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:89)
>       at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:94)
>       at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:33)
>       at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:114)
>       at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:569)
>       at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:549)
>       at java.lang.Thread.run(Thread.java:748)
> 
> I couldn't find any infos in the what's new pages regarding changes in the configuration/faces.xml
ect.
> Any idea what I should check to avoid/repair this problem?
> 
> Br
> Thomas
> 


Mime
View raw message