<< Back to previous view

[GLASSFISH-19065] NullPointerException after modifying faces-config.xml Created: 07/Sep/12  Updated: 28/Jun/13  Resolved: 12/Nov/12

Status: Closed
Project: glassfish
Component/s: configuration, jsf
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Blocker
Reporter: Ian Hlavats Assignee: Ed Burns
Resolution: Duplicate Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Mac OS X 10.8, MBP 2012 Retina Display, 500GB SSD, 8GB RAM, Intel Core i7 dual quad-core 2.6GHz CPU


Issue Links:
Related
is related to JAVASERVERFACES-2590 NullPointerException after modifying ... Closed
Tags:
Participants: ecerichter, Ed Burns, Ian Hlavats, Manfred Riem and Tom Mueller

 Description   

I modified faces-config.xml and simply copied it to my deployed application:

~/glassfish3/domains/domain1/applications/MyApp/WEB-INF/faces-config.xml

GF throws an exception and the application becomes unusable:

[#|2012-09-07T15:51:10.940+0200|SEVERE|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=18;_ThreadName=Thread-3;|com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! java.util.concurrent.ExecutionException: java.lang.NullPointerException
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:375)
at com.sun.faces.config.ConfigureListener.reload(ConfigureListener.java:586)
at com.sun.faces.config.ConfigureListener.access$600(ConfigureListener.java:128)
at com.sun.faces.config.ConfigureListener$WebConfigResourceMonitor.run(ConfigureListener.java:1037)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
Caused by: javax.faces.FacesException: java.util.concurrent.ExecutionException: java.lang.NullPointerException
at com.sun.faces.config.ConfigManager.getAnnotatedClasses(ConfigManager.java:433)
at com.sun.faces.config.processor.AbstractConfigProcessor.processAnnotations(AbstractConfigProcessor.java:326)
at com.sun.faces.config.processor.ApplicationConfigProcessor.process(ApplicationConfigProcessor.java:337)
at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:114)
at com.sun.faces.config.processor.LifecycleConfigProcessor.process(LifecycleConfigProcessor.java:116)
at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:114)
at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:222)
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:360)
... 12 more
Caused by: java.util.concurrent.ExecutionException: java.lang.NullPointerException
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
at java.util.concurrent.FutureTask.get(FutureTask.java:83)
at com.sun.faces.config.ConfigManager.getAnnotatedClasses(ConfigManager.java:429)
... 19 more
Caused by: java.lang.NullPointerException
at org.glassfish.faces.integration.GlassFishInjectionProvider.getAnnotatedClassesInCurrentModule(GlassFishInjectionProvider.java:113)
at com.sun.faces.config.DelegateToGlassFishAnnotationScanner.processAnnotations(DelegateToGlassFishAnnotationScanner.java:170)
at com.sun.faces.config.DelegateToGlassFishAnnotationScanner.getAnnotatedClasses(DelegateToGlassFishAnnotationScanner.java:82)
at com.sun.faces.config.DelegatingAnnotationProvider.getAnnotatedClasses(DelegatingAnnotationProvider.java:85)
at com.sun.faces.config.ConfigManager$AnnotationScanTask.call(ConfigManager.java:843)
at com.sun.faces.config.ConfigManager$AnnotationScanTask.call(ConfigManager.java:795)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:350)
... 12 more

#]

[#|2012-09-07T15:51:10.941+0200|INFO|glassfish3.1.2|javax.enterprise.resource.webcontainer.jsf.config|_ThreadID=18;_ThreadName=Thread-3;|Reload complete.|#]

Subsequent requests cause 500 errors:

[#|2012-09-07T17:42:50.116+0200|SEVERE|glassfish3.1.2|javax.faces|_ThreadID=19;_ThreadName=Thread-3;|Application was not properly initialized at startup, could not find Factory: javax.faces.render.RenderKitFactory. Attempting to find backup.|#]

[#|2012-09-07T17:42:50.187+0200|WARNING|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=19;_ThreadName=Thread-3;|StandardWrapperValve[Faces Servlet]: PWC1406: Servlet.service() for servlet Faces Servlet threw exception
java.lang.IllegalStateException: Could not find backup for factory javax.faces.render.RenderKitFactory.
at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:1008)
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:343)
at com.sun.faces.context.FacesContextImpl.<init>(FacesContextImpl.java:128)
at com.sun.faces.context.FacesContextFactoryImpl.getFacesContext(FacesContextFactoryImpl.java:93)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:583)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1542)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at com.jsftoolbox.container.render.glassfish.HtmlCleanupFilter.doFilter(HtmlCleanupFilter.java:50)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:680)

#]


 Comments   
Comment by Ian Hlavats [ 07/Sep/12 03:47 PM ]

Correction: the path to my deployed app is

~/glassfish3/glassfish/domains/domain1/applications/MyApp

Comment by Tom Mueller [ 07/Sep/12 03:56 PM ]

Ed, can you please take a look. It appears to be running into a problem in JSF.

Comment by Ed Burns [ 30/Oct/12 01:34 PM ]

The reporter is a JSF 2.2 EG member. Ian, I'll need more to reproduce this. In the best case, please give me an SSCCE < http://sscce.org/ >. Failing that, I need the exact software stack you are running, especially the GlassFish build number.

Ian, I'll send you a private email as well.

Comment by Ian Hlavats [ 30/Oct/12 10:05 PM ]

Thanks Ed, I will work on the SSCCE. The version of GlassFish I used is 3.1.2.

Comment by Manfred Riem [ 12/Nov/12 09:18 PM ]

See the associated issue for resolution

Comment by Ian Hlavats [ 14/Nov/12 12:44 AM ]

I have added detailed steps to reproduce the issue and attached a sample web application on the related issue:

http://java.net/jira/browse/JAVASERVERFACES-2590

Please have a look and let me know if any more information is required.

Comment by ecerichter [ 28/Jun/13 11:57 PM ]

I'm facing this exactly issue (already put my thoughts in the ticket JAVASERVERFACES-2590), but I don't think this is a Mojarra problem, since I can run exactly same application in Tomcat 7.0.40 without problem.

I'll try to provide a simplest application as possible to help fix this.

I've a important project to start, and I would like to recommend Glassfish, but this bug make entire application server unresponsive, and I can't deal with a complete crash caused by (expected) modification in a configuration file.

Generated at Thu Apr 17 01:45:53 UTC 2014 using JIRA 4.0.2#472.