-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NPE when using war deployment #141
Comments
Hi, where are you using the war deployment? tomcat? I think you should open an issue on JoinFaces project and provide stacktrace, steps to reproduce and a sample project so they will be able to help you. |
Yes Tomcat. |
So, it is JoinFaces that does this integration with Spring, CDI and JSF. Not something we can fix in this project, I think. |
I created an issue |
Is it possible to configure |
Sure, we can do that if it's causing problems in SpringBoot integration. Can you create a separated issue? |
Anyway, it will not solve the problem. Tomcat will try to create |
But in admin-starter-tomcat we add DI capability by adding CDI implementation and configuring BeanManager in META-INF/context.xml and weld in web.xml, that doesn't help in this case also? |
It works ok because Weld is full CDI implementation, but Spring Boot is not full CDI implementation. However, usecase described in this issue is about running Admin Template with Spring Boot If we remove @webfilter annotation to avoid this situation, JoinFaces/Spring Boot can handle it, but it will break Weld usecase probably. |
I see, It is more a springboot limitation than an AdminFaces issue. Can I close this issue or we can try something else? |
Admin Template uses CDI injection in Servlet and Filter. Spring handle this only if it creates them. Unfortunately, this issue is not the case. |
HI, I am facing the same issue. Getting NPE on AdminFilter when running on Tomcat server. Could anyone help? java.lang.NullPointerException: null |
Hi, have you tried with admin-starter-tomcat? |
admin-starter-tomcat works, but it is not using spring boot. My application is spring boot application with joinfaces and adminfaces. |
thanks it works fine when i give the bean manager in context.xml |
That's is quite interesting! have you noticed any other side effect? @persapiens anything else we should take into account? perhaps we should include context.xml in admin-starter-springboot as well, WDYT? |
Hello, Can you explain how did you do? Thanks. |
I think @DhannyaP did something like this: #141 (comment) |
Added the three things u told me, but giving the following error: Caused by: java.lang.IllegalStateException: No WebApplicationContext found: no ContextLoaderListener registered? |
Can you share your project? |
You can check it here. Thanks. |
Hi @rmpestano did you check it? Thanks. |
Hi, i am using the joinfaces adminfaces-starter dependency for my project.
When running as spring boot jar with embedded tomcat everything works fine.
When using war deployment i am facing a NullPointerException in the AdminFilter because the AdminConfig could not be injected.
Any idea?
The text was updated successfully, but these errors were encountered: