问:
WAS8.5.5.12 and JAVA8 and JSF
Getting below exception while deploying the application using WAS8.5.5.12 and Java 8.

please help me to resolve this

Unsanitized stacktrace from failed start...
                                 com.sun.faces.config.ConfigurationException:
  Source Document: wsjar:file:/C:/xxxxxxxx/appxx/appxx-lib/lib/jsf-impl-2.0.6-FCS.jar!/com/sun/faces/jsf-ri-runtime.xml
  Cause: Unable to create a new instance of 'com.sun.faces.application.resource.ResourceHandlerImpl': java.lang.NullPointerException
    at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:293)
    at com.sun.faces.config.processor.ApplicationConfigProcessor.setResourceHandler(ApplicationConfigProcessor.java:767)
    at com.sun.faces.config.processor.ApplicationConfigProcessor.process(ApplicationConfigProcessor.java:314)
    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:216)
    at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:338)
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:226)
    at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1732)
    at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:415)
    at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88)
    at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:171)
    at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:904)
    at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:789)
    at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:427)
    at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:719)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1201)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1390)
    at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:639)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:979)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:785)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl$5.run(ApplicationMgrImpl.java:2220)
    at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5396)
    at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5612)
    at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2225)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:436)
    at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:379)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:127)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$CUInitializer.run(CompositionUnitMgrImpl.java:985)
    at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:524)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1892)
Caused by: java.lang.NullPointerException
    at com.sun.faces.application.resource.ResourceHandlerImpl.(ResourceHandlerImpl.java:94)
    at java.lang.J9VMInternals.newInstanceImpl(Native Method)
    at java.lang.Class.newInstance(Class.java:1899)
    at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:268)
    ... 33 more

[14/11/17 18:40:36:413 EST] 00000051 config        E   Critical error during deployment:
                                 com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! null
    at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:357)
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:226)
    at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1732)
    at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:415)
    at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88)
    at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:171)
    at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:904)
    at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:789)
    at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:427)
    at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:719)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1201)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1390)
    at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:639)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:979)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:785)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl$5.run(ApplicationMgrImpl.java:2220)
    at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5396)
    at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5612)
    at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2225)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:436)
    at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:379)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:127)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$CUInitializer.run(CompositionUnitMgrImpl.java:985)
    at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:524)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1892)
Caused by: java.lang.NullPointerException
    at com.sun.faces.application.resource.ResourceHandlerImpl.(ResourceHandlerImpl.java:94)
    at java.lang.J9VMInternals.newInstanceImpl(Native Method)
    at java.lang.Class.newInstance(Class.java:1899)
    at

[14/11/17 18:40:36:461 EST] 00000051 FfdcProvider  W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on C:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\ffdc\server1_7404068f_17.11.14_18.40.36.4132426497673250153005.txt com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated 1341
[14/11/17 18:40:36:461 EST] 00000051 webapp        E com.ibm.ws.webcontainer.webapp.WebApp notifyServletContextCreated SRVE0283E: Exception caught while initializing context: {0}
                                 java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! null
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:293)
    at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1732)
    at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:415)
    at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88)
    at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:171)
    at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:904)
    at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:789)
    at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:427)
    at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:719)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1201)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1390)
    at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:639)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:979)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:785)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl$5.run(ApplicationMgrImpl.java:2220)
    at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5396)
    at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5612)
    at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2225)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:436)
    at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:379)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:127)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$CUInitializer.run(CompositionUnitMgrImpl.java:985)
    at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:524)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1892)
Caused by: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! null
    at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:357)
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:226)
    ... 25 more
Caused by: java.lang.NullPointerException
    at com.sun.faces.application.resource.ResourceHandlerImpl.(ResourceHandlerImpl.java:94)
    at java.lang.J9VMInternals.newInstanceImpl(Native Method)
    at java.lang.Class.newInstance(Class.java:1899)

[14/11/17 18:40:36:461 EST] 00000051 FfdcProvider  W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on C:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\ffdc\server1_7404068f_17.11.14_18.40.36.4619182433776222551682.txt com.ibm.ws.webcontainer.webapp.WebGroup 131
[14/11/17 18:40:36:462 EST] 00000051 config        E   Unexpected exception when attempting to tear down the Mojarra runtime
                                 java.lang.IllegalStateException: No Factories configured for this Application. This happens if the faces-initialization does not work at all - make sure that you properly include all configuration settings necessary for a basic faces application and that all the necessary libs are included. Also check the logging output of your web application and your container for any exceptions!
If you did that and find nothing, the mistake might be due to the fact that you use some special web-containers which do not support registering context-listeners via TLD files and a context listener is not setup in your web.xml.
A typical config looks like this;

  org.apache.myfaces.webapp.StartupServletContextListener

```<code>at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:196)
at com.sun.faces.config.InitFacesContext.getApplication(InitFacesContext.java:108)
at com.sun.faces.config.ConfigureListener.contextDestroyed(ConfigureListener.java:326)
at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextDestroyed(WebApp.java:1799)
at com.ibm.ws.webcontainer.webapp.WebApp.destroy(WebApp.java:3165)
at com.ibm.ws.webcontainer.webapp.WebAppImpl.destroy(WebAppImpl.java:1566)
at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:97)
at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:171)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:904)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:789)
at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:427)
at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:719)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1201)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1390)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:639)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:979)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:785)
at com.ibm.ws.runtime.component.ApplicationMgrImpl$5.run(ApplicationMgrImpl.java:2220)
at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5396)
at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5612)
at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2225)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:436)
at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:379)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:127)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$CUInitializer.run(CompositionUnitMgrImpl.java:985)
at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:524)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1892)
</code>```

[14/11/17 18:40:36:462 EST] 00000051 webapp        I com.ibm.ws.webcontainer.webapp.WebApp log SRVE0292I: Servlet Message - [appxxEAR8#appxx.war]:.Closing Spring root WebApplicationContext
[14/11/17 18:40:36:514 EST] 00000051 FfdcProvider  W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on C:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\ffdc\server1_7404068f_17.11.14_18.40.36.4956213751987669642611.txt com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextDestroyed 1405
[14/11/17 18:40:36:514 EST] 00000051 webapp        E com.ibm.ws.webcontainer.webapp.WebApp notifyServletContextDestroyed SRVE0285E: Exception caught while destroying context: {0}
                                 java.lang.IllegalStateException: No Factories configured for this Application. This happens if the faces-initialization does not work at all - make sure that you properly include all configuration settings necessary for a basic faces application and that all the necessary libs are included. Also check the logging output of your web application and your container for any exceptions!
If you did that and find nothing, the mistake might be due to the fact that you use some special web-containers which do not support registering context-listeners via TLD files and a context listener is not setup in your web.xml.
A typical config looks like this;

  org.apache.myfaces.webapp.StartupServletContextListener

```<code>at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:196)
at org.apache.myfaces.context.servlet.FacesContextImplBase.getApplication(FacesContextImplBase.java:131)
at org.apache.myfaces.webapp.AbstractFacesInitializer._dispatchApplicationEvent(AbstractFacesInitializer.java:272)
at org.apache.myfaces.webapp.AbstractFacesInitializer.destroyFaces(AbstractFacesInitializer.java:305)
at org.apache.myfaces.webapp.StartupServletContextListener.contextDestroyed(StartupServletContextListener.java:153)
at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextDestroyed(WebApp.java:1799)
at com.ibm.ws.webcontainer.webapp.WebApp.destroy(WebApp.java:3165)
at com.ibm.ws.webcontainer.webapp.WebAppImpl.destroy(WebAppImpl.java:1566)
at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:97)
at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:171)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:904)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:789)
at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:427)
at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:719)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1201)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1390)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:639)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:979)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:785)
at com.ibm.ws.runtime.component.ApplicationMgrImpl$5.run(ApplicationMgrImpl.java:2220)
at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5396)
at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5612)
at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2225)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:436)
at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:379)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:127)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$CUInitializer.run(CompositionUnitMgrImpl.java:985)
at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:524)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1892)
</code>```

[14/11/17 18:40:36:683 EST] 00000051 webapp        E com.ibm.ws.webcontainer.webapp.WebGroupImpl WebGroup SRVE0015E: Failure to initialize Web application appxx
[14/11/17 18:40:36:698 EST] 00000051 FfdcProvider  W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on C:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\ffdc\server1_7404068f_17.11.14_18.40.36.683260421270110660920.txt com.ibm.ws.webcontainer.WebContainer 736
[14/11/17 18:40:36:714 EST] 00000051 FfdcProvider  W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on C:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\ffdc\server1_7404068f_17.11.14_18.40.36.6981786598416651387312.txt com.ibm.ws.runtime.component.WebContainerImpl.install 124
[14/11/17 18:40:36:729 EST] 00000051 DeployedAppli W   WSVR0206E: Module, appxx.war, of application, appxxEAR8.ear/deployments/appxxEAR8, failed to start
[14/11/17 18:40:36:729 EST] 00000051 ApplicationMg W   WSVR0101W: An error occurred starting, appxxEAR8
[14/11/17 18:40:36:729 EST] 00000051 ApplicationMg A   WSVR0217I: Stopping application: appxxEAR8
[14/11/17 18:40:36:761 EST] 00000051 ApplicationMg A   WSVR0220I: Application stopped: appxxuiEAR8
[14/11/17 18:40:36:761 EST] 00000051 SystemOut     O WARN: The method class org.apache.commons.logging.impl.SLF4JLogFactory#release() was invoked.
[14/11/17 18:40:36:761 EST] 00000051 SystemOut     O WARN: Please see http://www.slf4j.org/codes.html#release for an explanation.
[14/11/17 18:40:36:792 EST] 00000051 FfdcProvider  W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on C:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\ffdc\server1_7404068f_17.11.14_18.40.36.7611284141919601609807.txt com.ibm.ws.runtime.component.ApplicationMgrImpl 2065
[14/11/17 18:40:36:792 EST] 00000051 CompositionUn E   WSVR0194E: Composition unit WebSphere:cuname=appxxEAR8 in BLA WebSphere:blaname=appxxEAR8 failed to start.
[14/11/17 18:40:36:792 EST] 00000051 FfdcProvider  W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on C:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\ffdc\server1_7404068f_17.11.14_18.40.36.7921253433477090411667.txt com.ibm.wsspi.runtime.component.WsComponentImpl 297
[14/11/17 18:40:36:792 EST] 00000001 ContainerHelp E   WSVR0501E: Error creating component com.ibm.ws.runtime.component.CompositionUnitMgrImpl@2d937a39
com.ibm.ws.exception.RuntimeWarning: com.ibm.ws.exception.RuntimeWarning: com.ibm.ws.webcontainer.exception.WebAppNotLoadedException: Failed to load webapp: Failed to load webapp: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! null
    at com.ibm.wsspi.runtime.component.WsComponentImpl.join(WsComponentImpl.java:432)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCUList(CompositionUnitMgrImpl.java:1295)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:275)
    at com.ibm.ws.runtime.component.ContainerHelper.startComponents(ContainerHelper.java:540)
    at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:627)
    at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:618)
    at com.ibm.ws.runtime.component.ApplicationServerImpl.start(ApplicationServerImpl.java:252)
    at com.ibm.ws.runtime.component.ContainerHelper.startComponents(ContainerHelper.java:540)
    at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:627)
    at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:618)
    at com.ibm.ws.runtime.component.ServerImpl.start(ServerImpl.java:540)
    at com.ibm.ws.runtime.WsServerImpl.bootServerContainer(WsServerImpl.java:316)
    at com.ibm.ws.runtime.WsServerImpl.start(WsServerImpl.java:229)
    at com.ibm.ws.runtime.WsServerImpl.main(WsServerImpl.java:702)
    at com.ibm.ws.runtime.WsServer.main(WsServer.java:59)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
    at java.lang.reflect.Method.invoke(Method.java:508)
    at com.ibm.wsspi.bootstrap.WSLauncher.launchMain(WSLauncher.java:234)
    at com.ibm.wsspi.bootstrap.WSLauncher.main(WSLauncher.java:96)
    at com.ibm.wsspi.bootstrap.WSLauncher.run(WSLauncher.java:77)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
    at java.lang.reflect.Method.invoke(Method.java:508)
    at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:587)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:198)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
    at java.lang.reflect.Method.invoke(Method.java:508)
    at org.eclipse.core.launcher.Main.invokeFramework(Main.java:340)
    at org.eclipse.core.launcher.Main.basicRun(Main.java:282)
    at org.eclipse.core.launcher.Main.run(Main.java:981)
    at com.ibm.wsspi.bootstrap.WSPreLauncher.launchEclipse(WSPreLauncher.java:406)
    at com.ibm.wsspi.bootstrap.WSPreLauncher.main(WSPreLauncher.java:169)
Caused by: com.ibm.ws.exception.RuntimeWarning: com.ibm.ws.webcontainer.exception.WebAppNotLoadedException: Failed to load webapp: Failed to load webapp: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! null
    at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:433)
    at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:719)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1201)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1390)
    at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:639)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:979)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:785)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl$5.run(ApplicationMgrImpl.java:2220)
    at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5396)
    at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5612)
    at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2225)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:436)
    at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:379)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:127)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$CUInitializer.run(CompositionUnitMgrImpl.java:985)
    at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:524)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1892)
Caused by: com.ibm.ws.webcontainer.exception.WebAppNotLoadedException: Failed to load webapp: Failed to load webapp: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! null
    at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:914)
    at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:789)
    at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:427)
    ... 18 more
Caused by: com.ibm.ws.webcontainer.exception.WebAppNotLoadedException: Failed to load webapp: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! null
    at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:186)
    at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:904)
    ... 20 more
Caused by: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! null
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:293)
    at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1732)
    at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:415)
    at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88)
    at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:171)
    ... 21 more
Caused by: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! null
    at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:357)
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:226)
    ... 25 more
Caused by: java.lang.NullPointerException
    at com.sun.faces.application.resource.ResourceHandlerImpl.(ResourceHandlerImpl.java:94)
    at java.lang.J9VMInternals.newInstanceImpl(Native Method)
    at java.lang.Class.newInstance(Class.java:1899)
    at

答:
Resolved Myself By adding Parent_last in EAR.

Thank You.

Title: WAS8.5.5.12 and JAVA8 and JSF

Body:
Getting below exception while deploying the application using WAS8.5.5.12 and Java 8.

please help me to resolve this

Unsanitized stacktrace from failed start...
                                 com.sun.faces.config.ConfigurationException:
  Source Document: wsjar:file:/C:/xxxxxxxx/appxx/appxx-lib/lib/jsf-impl-2.0.6-FCS.jar!/com/sun/faces/jsf-ri-runtime.xml
  Cause: Unable to create a new instance of 'com.sun.faces.application.resource.ResourceHandlerImpl': java.lang.NullPointerException
    at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:293)
    at com.sun.faces.config.processor.ApplicationConfigProcessor.setResourceHandler(ApplicationConfigProcessor.java:767)
    at com.sun.faces.config.processor.ApplicationConfigProcessor.process(ApplicationConfigProcessor.java:314)
    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:216)
    at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:338)
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:226)
    at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1732)
    at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:415)
    at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88)
    at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:171)
    at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:904)
    at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:789)
    at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:427)
    at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:719)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1201)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1390)
    at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:639)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:979)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:785)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl$5.run(ApplicationMgrImpl.java:2220)
    at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5396)
    at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5612)
    at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2225)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:436)
    at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:379)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:127)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$CUInitializer.run(CompositionUnitMgrImpl.java:985)
    at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:524)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1892)
Caused by: java.lang.NullPointerException
    at com.sun.faces.application.resource.ResourceHandlerImpl.(ResourceHandlerImpl.java:94)
    at java.lang.J9VMInternals.newInstanceImpl(Native Method)
    at java.lang.Class.newInstance(Class.java:1899)
    at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:268)
    ... 33 more

[14/11/17 18:40:36:413 EST] 00000051 config        E   Critical error during deployment:
                                 com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! null
    at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:357)
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:226)
    at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1732)
    at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:415)
    at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88)
    at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:171)
    at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:904)
    at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:789)
    at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:427)
    at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:719)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1201)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1390)
    at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:639)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:979)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:785)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl$5.run(ApplicationMgrImpl.java:2220)
    at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5396)
    at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5612)
    at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2225)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:436)
    at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:379)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:127)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$CUInitializer.run(CompositionUnitMgrImpl.java:985)
    at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:524)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1892)
Caused by: java.lang.NullPointerException
    at com.sun.faces.application.resource.ResourceHandlerImpl.(ResourceHandlerImpl.java:94)
    at java.lang.J9VMInternals.newInstanceImpl(Native Method)
    at java.lang.Class.newInstance(Class.java:1899)
    at

[14/11/17 18:40:36:461 EST] 00000051 FfdcProvider  W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on C:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\ffdc\server1_7404068f_17.11.14_18.40.36.4132426497673250153005.txt com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated 1341
[14/11/17 18:40:36:461 EST] 00000051 webapp        E com.ibm.ws.webcontainer.webapp.WebApp notifyServletContextCreated SRVE0283E: Exception caught while initializing context: {0}
                                 java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! null
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:293)
    at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1732)
    at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:415)
    at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88)
    at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:171)
    at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:904)
    at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:789)
    at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:427)
    at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:719)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1201)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1390)
    at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:639)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:979)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:785)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl$5.run(ApplicationMgrImpl.java:2220)
    at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5396)
    at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5612)
    at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2225)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:436)
    at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:379)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:127)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$CUInitializer.run(CompositionUnitMgrImpl.java:985)
    at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:524)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1892)
Caused by: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! null
    at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:357)
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:226)
    ... 25 more
Caused by: java.lang.NullPointerException
    at com.sun.faces.application.resource.ResourceHandlerImpl.(ResourceHandlerImpl.java:94)
    at java.lang.J9VMInternals.newInstanceImpl(Native Method)
    at java.lang.Class.newInstance(Class.java:1899)

[14/11/17 18:40:36:461 EST] 00000051 FfdcProvider  W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on C:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\ffdc\server1_7404068f_17.11.14_18.40.36.4619182433776222551682.txt com.ibm.ws.webcontainer.webapp.WebGroup 131
[14/11/17 18:40:36:462 EST] 00000051 config        E   Unexpected exception when attempting to tear down the Mojarra runtime
                                 java.lang.IllegalStateException: No Factories configured for this Application. This happens if the faces-initialization does not work at all - make sure that you properly include all configuration settings necessary for a basic faces application and that all the necessary libs are included. Also check the logging output of your web application and your container for any exceptions!
If you did that and find nothing, the mistake might be due to the fact that you use some special web-containers which do not support registering context-listeners via TLD files and a context listener is not setup in your web.xml.
A typical config looks like this;

  org.apache.myfaces.webapp.StartupServletContextListener

at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:196)
at com.sun.faces.config.InitFacesContext.getApplication(InitFacesContext.java:108)
at com.sun.faces.config.ConfigureListener.contextDestroyed(ConfigureListener.java:326)
at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextDestroyed(WebApp.java:1799)
at com.ibm.ws.webcontainer.webapp.WebApp.destroy(WebApp.java:3165)
at com.ibm.ws.webcontainer.webapp.WebAppImpl.destroy(WebAppImpl.java:1566)
at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:97)
at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:171)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:904)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:789)
at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:427)
at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:719)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1201)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1390)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:639)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:979)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:785)
at com.ibm.ws.runtime.component.ApplicationMgrImpl$5.run(ApplicationMgrImpl.java:2220)
at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5396)
at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5612)
at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2225)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:436)
at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:379)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:127)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$CUInitializer.run(CompositionUnitMgrImpl.java:985)
at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:524)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1892)

[14/11/17 18:40:36:462 EST] 00000051 webapp        I com.ibm.ws.webcontainer.webapp.WebApp log SRVE0292I: Servlet Message - [appxxEAR8#appxx.war]:.Closing Spring root WebApplicationContext
[14/11/17 18:40:36:514 EST] 00000051 FfdcProvider  W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on C:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\ffdc\server1_7404068f_17.11.14_18.40.36.4956213751987669642611.txt com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextDestroyed 1405
[14/11/17 18:40:36:514 EST] 00000051 webapp        E com.ibm.ws.webcontainer.webapp.WebApp notifyServletContextDestroyed SRVE0285E: Exception caught while destroying context: {0}
                                 java.lang.IllegalStateException: No Factories configured for this Application. This happens if the faces-initialization does not work at all - make sure that you properly include all configuration settings necessary for a basic faces application and that all the necessary libs are included. Also check the logging output of your web application and your container for any exceptions!
If you did that and find nothing, the mistake might be due to the fact that you use some special web-containers which do not support registering context-listeners via TLD files and a context listener is not setup in your web.xml.
A typical config looks like this;

  org.apache.myfaces.webapp.StartupServletContextListener

at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:196)
at org.apache.myfaces.context.servlet.FacesContextImplBase.getApplication(FacesContextImplBase.java:131)
at org.apache.myfaces.webapp.AbstractFacesInitializer._dispatchApplicationEvent(AbstractFacesInitializer.java:272)
at org.apache.myfaces.webapp.AbstractFacesInitializer.destroyFaces(AbstractFacesInitializer.java:305)
at org.apache.myfaces.webapp.StartupServletContextListener.contextDestroyed(StartupServletContextListener.java:153)
at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextDestroyed(WebApp.java:1799)
at com.ibm.ws.webcontainer.webapp.WebApp.destroy(WebApp.java:3165)
at com.ibm.ws.webcontainer.webapp.WebAppImpl.destroy(WebAppImpl.java:1566)
at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:97)
at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:171)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:904)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:789)
at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:427)
at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:719)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1201)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1390)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:639)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:979)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:785)
at com.ibm.ws.runtime.component.ApplicationMgrImpl$5.run(ApplicationMgrImpl.java:2220)
at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5396)
at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5612)
at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2225)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:436)
at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:379)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:127)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$CUInitializer.run(CompositionUnitMgrImpl.java:985)
at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:524)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1892)

[14/11/17 18:40:36:683 EST] 00000051 webapp        E com.ibm.ws.webcontainer.webapp.WebGroupImpl WebGroup SRVE0015E: Failure to initialize Web application appxx
[14/11/17 18:40:36:698 EST] 00000051 FfdcProvider  W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on C:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\ffdc\server1_7404068f_17.11.14_18.40.36.683260421270110660920.txt com.ibm.ws.webcontainer.WebContainer 736
[14/11/17 18:40:36:714 EST] 00000051 FfdcProvider  W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on C:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\ffdc\server1_7404068f_17.11.14_18.40.36.6981786598416651387312.txt com.ibm.ws.runtime.component.WebContainerImpl.install 124
[14/11/17 18:40:36:729 EST] 00000051 DeployedAppli W   WSVR0206E: Module, appxx.war, of application, appxxEAR8.ear/deployments/appxxEAR8, failed to start
[14/11/17 18:40:36:729 EST] 00000051 ApplicationMg W   WSVR0101W: An error occurred starting, appxxEAR8
[14/11/17 18:40:36:729 EST] 00000051 ApplicationMg A   WSVR0217I: Stopping application: appxxEAR8
[14/11/17 18:40:36:761 EST] 00000051 ApplicationMg A   WSVR0220I: Application stopped: appxxuiEAR8
[14/11/17 18:40:36:761 EST] 00000051 SystemOut     O WARN: The method class org.apache.commons.logging.impl.SLF4JLogFactory#release() was invoked.
[14/11/17 18:40:36:761 EST] 00000051 SystemOut     O WARN: Please see http://www.slf4j.org/codes.html#release for an explanation.
[14/11/17 18:40:36:792 EST] 00000051 FfdcProvider  W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on C:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\ffdc\server1_7404068f_17.11.14_18.40.36.7611284141919601609807.txt com.ibm.ws.runtime.component.ApplicationMgrImpl 2065
[14/11/17 18:40:36:792 EST] 00000051 CompositionUn E   WSVR0194E: Composition unit WebSphere:cuname=appxxEAR8 in BLA WebSphere:blaname=appxxEAR8 failed to start.
[14/11/17 18:40:36:792 EST] 00000051 FfdcProvider  W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on C:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\ffdc\server1_7404068f_17.11.14_18.40.36.7921253433477090411667.txt com.ibm.wsspi.runtime.component.WsComponentImpl 297
[14/11/17 18:40:36:792 EST] 00000001 ContainerHelp E   WSVR0501E: Error creating component com.ibm.ws.runtime.component.CompositionUnitMgrImpl@2d937a39
com.ibm.ws.exception.RuntimeWarning: com.ibm.ws.exception.RuntimeWarning: com.ibm.ws.webcontainer.exception.WebAppNotLoadedException: Failed to load webapp: Failed to load webapp: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! null
    at com.ibm.wsspi.runtime.component.WsComponentImpl.join(WsComponentImpl.java:432)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCUList(CompositionUnitMgrImpl.java:1295)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:275)
    at com.ibm.ws.runtime.component.ContainerHelper.startComponents(ContainerHelper.java:540)
    at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:627)
    at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:618)
    at com.ibm.ws.runtime.component.ApplicationServerImpl.start(ApplicationServerImpl.java:252)
    at com.ibm.ws.runtime.component.ContainerHelper.startComponents(ContainerHelper.java:540)
    at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:627)
    at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:618)
    at com.ibm.ws.runtime.component.ServerImpl.start(ServerImpl.java:540)
    at com.ibm.ws.runtime.WsServerImpl.bootServerContainer(WsServerImpl.java:316)
    at com.ibm.ws.runtime.WsServerImpl.start(WsServerImpl.java:229)
    at com.ibm.ws.runtime.WsServerImpl.main(WsServerImpl.java:702)
    at com.ibm.ws.runtime.WsServer.main(WsServer.java:59)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
    at java.lang.reflect.Method.invoke(Method.java:508)
    at com.ibm.wsspi.bootstrap.WSLauncher.launchMain(WSLauncher.java:234)
    at com.ibm.wsspi.bootstrap.WSLauncher.main(WSLauncher.java:96)
    at com.ibm.wsspi.bootstrap.WSLauncher.run(WSLauncher.java:77)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
    at java.lang.reflect.Method.invoke(Method.java:508)
    at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:587)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:198)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
    at java.lang.reflect.Method.invoke(Method.java:508)
    at org.eclipse.core.launcher.Main.invokeFramework(Main.java:340)
    at org.eclipse.core.launcher.Main.basicRun(Main.java:282)
    at org.eclipse.core.launcher.Main.run(Main.java:981)
    at com.ibm.wsspi.bootstrap.WSPreLauncher.launchEclipse(WSPreLauncher.java:406)
    at com.ibm.wsspi.bootstrap.WSPreLauncher.main(WSPreLauncher.java:169)
Caused by: com.ibm.ws.exception.RuntimeWarning: com.ibm.ws.webcontainer.exception.WebAppNotLoadedException: Failed to load webapp: Failed to load webapp: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! null
    at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:433)
    at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:719)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1201)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1390)
    at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:639)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:979)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:785)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl$5.run(ApplicationMgrImpl.java:2220)
    at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5396)
    at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5612)
    at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2225)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:436)
    at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:379)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:127)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$CUInitializer.run(CompositionUnitMgrImpl.java:985)
    at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:524)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1892)
Caused by: com.ibm.ws.webcontainer.exception.WebAppNotLoadedException: Failed to load webapp: Failed to load webapp: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! null
    at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:914)
    at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:789)
    at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:427)
    ... 18 more
Caused by: com.ibm.ws.webcontainer.exception.WebAppNotLoadedException: Failed to load webapp: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! null
    at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:186)
    at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:904)
    ... 20 more
Caused by: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! null
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:293)
    at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1732)
    at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:415)
    at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88)
    at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:171)
    ... 21 more
Caused by: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! null
    at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:357)
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:226)
    ... 25 more
Caused by: java.lang.NullPointerException
    at com.sun.faces.application.resource.ResourceHandlerImpl.(ResourceHandlerImpl.java:94)
    at java.lang.J9VMInternals.newInstanceImpl(Native Method)
    at java.lang.Class.newInstance(Class.java:1899)
    at


来源: stackexchange

问:
CSS image inside another image with overflow:hidden
So I want to center an image inside another image (a computer screen), but it seem not to work with the overflow:hidden. I put posiition:absolute on the image inside, but then the other image disappered.

My CSScode:

  .desktop-image {
        background-image: url("image-1.png");
        background-repeat: no-repeat;
        background-size: contain;
        background-position: center;
    }

    .desktop-image img {
        width: 20%;
        position: relative;
        z-index: -999;
        left: 40%;
    }
```

<p>My HTML:
</p>

```

```

答:
set your "computer screen" image as a background of a div</p>

```<code>div {
  background: url('computer-screen.png');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}
</code>```

ContentLicense: CC BY-SA 3.0

Body:
So I want to center an image inside another image (a computer screen), but it seem not to work with the overflow:hidden. I put posiition:absolute on the image inside, but then the other image disappered.

My CSScode:

  .desktop-image {
        background-image: url("image-1.png");
        background-repeat: no-repeat;
        background-size: contain;
        background-position: center;
    }

    .desktop-image img {
        width: 20%;
        position: relative;
        z-index: -999;
        left: 40%;
    }

My HTML:

Body:
set your "computer screen" image as a background of a div

div {
  background: url('computer-screen.png');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}


问:
What is the most pythonic way to split a 3d array to 2d arrays with different second indexes?
I have a function foo that returns an array with the shape (1000, 3, 1000)
how can I split it to three arrays a(1000, 1000) and b(1000, 1000) and c(1000, 1000)
I'm looking for something like this:

```<code>a,b,c = foo()[:,*,:]
</code>```

that will result in a,b,c equal to:

```<code>res = foo()
a = res[:,0,:]
b = res[:,1,:]
c = res[:,2,:]
</code>```

答:
Also this shoud work:</p>

```<code>a,b,c = np.rollaxis(foo(), 1)
</code>```

Body:
I have a function foo that returns an array with the shape (1000, 3, 1000)
how can I split it to three arrays a(1000, 1000) and b(1000, 1000) and c(1000, 1000)
I'm looking for something like this:

a,b,c = foo()[:,*,:]

that will result in a,b,c equal to:

res = foo()
a = res[:,0,:]
b = res[:,1,:]
c = res[:,2,:]

Body:
Also this shoud work:

a,b,c = np.rollaxis(foo(), 1)


问:
webextension: Why does the browser add a trailing slash to the requested URL?
When I make a request to http://www.example.com, why does I see http://www.example.com/ in the webRequest.onBeforeRequestListener?

For example:

```<code>chrome.webRequest.onBeforeRequest.addListener(
  details => console.log('Sending request to', details.url),
  { urls: ['<all_urls>'] });
fetch('http://www.example.com');
</code>```

will print

```<code>Sending request to http://www.example.com/
</code>```

That is consistent with the request URL shown in the network request monitor. For example, if I take it and convert it to a curl command, the request looks like this:

```<code>curl 'http://www.example.com/' -H 'Accept: */*' -H 'Connection: keep-alive'
    -H 'Accept-Encoding: gzip, deflate' -H 'Accept-Language: en-US,en;q=0.9'
    -H 'User-Agent: ...' --compressed
</code>```

So, the original request that goes out is for http://www.example.com/ not for http://www.example.com. That decision must have been made in the browser, not by the server.

The same behavior also occurs when using XMLHttpRequest instead of fetch. In my example, I used Chrome, but on Firefox it is the same.

Questions:

Why does the browser change it automatically? It also happens with other URLs. From my understanding, adding a trailing slash will often work, but in general, it is a breaking change.

If I want to filter in the onBeforeRequest listener for the current request to a specific URL, how can you reliably match it? For instance, just checking whether the URLs are identical will fail.

Are there more rewrite URL rules in the browser to be aware of?

答:
Think, I found it. The browser is just fixing an invalid URL.

To cite from Wikipedia, a URL looks like this:

scheme:[//[user[:password]@]host[:port]][/path][?query][#fragment]

The path must begin with a single slash (/) if an authority part was present, and may also if one was not, but must not begin with a double slash. The path is always defined, though the defined path may be empty (zero length), therefore no trailing slash.

http://example.com has an authority part (in this example, the schema plus hostname: http://example.com), but that leaves the path empty. According to the specification, the path must start with a /, so the browser fixes it by replacing the empty path by /.

If you use a valid URL instead, like http://example.com/abc, it does not need to modify it.

Body:
When I make a request to http://www.example.com, why does I see http://www.example.com/ in the webRequest.onBeforeRequestListener?

For example:

chrome.webRequest.onBeforeRequest.addListener(
  details => console.log('Sending request to', details.url),
  { urls: ['<all_urls>'] });
fetch('http://www.example.com');

will print

Sending request to http://www.example.com/

That is consistent with the request URL shown in the network request monitor. For example, if I take it and convert it to a curl command, the request looks like this:

curl 'http://www.example.com/' -H 'Accept: */*' -H 'Connection: keep-alive'
    -H 'Accept-Encoding: gzip, deflate' -H 'Accept-Language: en-US,en;q=0.9'
    -H 'User-Agent: ...' --compressed

So, the original request that goes out is for http://www.example.com/ not for http://www.example.com. That decision must have been made in the browser, not by the server.

The same behavior also occurs when using XMLHttpRequest instead of fetch. In my example, I used Chrome, but on Firefox it is the same.

Questions:

Why does the browser change it automatically? It also happens with other URLs. From my understanding, adding a trailing slash will often work, but in general, it is a breaking change.

If I want to filter in the onBeforeRequest listener for the current request to a specific URL, how can you reliably match it? For instance, just checking whether the URLs are identical will fail.

Are there more rewrite URL rules in the browser to be aware of?


问:
SOLR Nested Documents filtered ok, but not sorted by relevance
I have this query:

+parent_field:blabla +query:{!parent which=type:parent}+child_field:xxx~1

and in FL

parent_field,[child parentFilter=type:parent childFilter=child_field:xxx~1]

It works fine, meaning that:

It filters the parents that have parent_field=blabla and has at least one child which has child_field=xxx

And it returns from parent: parent_field along with a children list
the children list is filtered by: child_field=xxx, which is good
but the ORDER of relevance, of children list, is not taken into account, it's always the same order. The order of the Parents indeed is ok.

Example:

This is what it returns

```<code>{
  parent_field: "blabla",
  children: [
    {
      child_field: "xxxx"
    },{
      child_field: "xxx"
    }
  ]
}
</code>```

This is what I want it to return!

```<code>{
  parent_field: "blabla",
  children: [
    {
      child_field: "xxx"
    },{
      child_field: "xxxx"
    }
  ]
}
</code>```

答:
I found out. I just used sub-queries !

q=(type_s:parent AND parent_field:blabla)&fl=*,children:[subquery]&children.q=({!terms f=fk_id_parent v=$row.id_parent} AND child_field:xxx~1)

Body:
I have this query:

+parent_field:blabla +query:{!parent which=type:parent}+child_field:xxx~1

and in FL

parent_field,[child parentFilter=type:parent childFilter=child_field:xxx~1]

It works fine, meaning that:

It filters the parents that have parent_field=blabla and has at least one child which has child_field=xxx

And it returns from parent: parent_field along with a children list
the children list is filtered by: child_field=xxx, which is good
but the ORDER of relevance, of children list, is not taken into account, it's always the same order. The order of the Parents indeed is ok.

Example:

This is what it returns

{
  parent_field: "blabla",
  children: [
    {
      child_field: "xxxx"
    },{
      child_field: "xxx"
    }
  ]
}

This is what I want it to return!

{
  parent_field: "blabla",
  children: [
    {
      child_field: "xxx"
    },{
      child_field: "xxxx"
    }
  ]
}


问:
Angular-CLI (ng build --prod) fails with external local package
I'm having one local package built (similar to npm package) and put it inside 'src/assets/external_js/test' directory (not in node_modules). and used it as below:

```<code>import { TestModule } from 'assets/external_js/test'
</code>```

I am able to run my application using ng serve, also able to build using ng build --prod --aot=false, but getting error with --aot=true or (ng build --prod).

Getting below error.

Module not found: Error: Can't resolve /home/demo/src/$$_gendir/assets/external_js/test/test.module.ngFactory in '/home/demo/src'

Also this runs perfectly, (able to build using --aot=true) if i put my local package 'Test' in node_modules directory but not working, if i put it outside node_modules directory.

Can anyone help me out, what i'm missing. Or how can i build my project with --aot=true.

答:
This is because in aot=true, it is compiling your application ahead of time.So it needs every dependency (viz. your test module) in advance i.e. at build time.
For complete reference of AOT compilation: https://angular.io/guide/aot-compiler</p>

Body:
I'm having one local package built (similar to npm package) and put it inside 'src/assets/external_js/test' directory (not in node_modules). and used it as below:

import { TestModule } from 'assets/external_js/test'

I am able to run my application using ng serve, also able to build using ng build --prod --aot=false, but getting error with --aot=true or (ng build --prod).

Getting below error.

Module not found: Error: Can't resolve /home/demo/src/$$_gendir/assets/external_js/test/test.module.ngFactory in '/home/demo/src'

Also this runs perfectly, (able to build using --aot=true) if i put my local package 'Test' in node_modules directory but not working, if i put it outside node_modules directory.

Can anyone help me out, what i'm missing. Or how can i build my project with --aot=true.


问:
RxJS 5.5 error: take is not a function. Issue with chained functions
I'm reading about introduction of lettable/pipeable functions in RxJS, but nowhere does it state that this is potentially a breaking change for chained methods. This caught me out in one of our scipts where it started throwing an error after the upgrade:

```<code>let things = new BehaviorSubject<Thing[]>([]);
things.filter((things) => things.length > 0).take(1).subscribe( ... )
</code>```

ERROR TypeError: tasks.filter(...).take is not a function

Could somebody explain / point out an article explaining why this is happening? Btw, the fix was to wrap take(1) in pipe() function:

```<code>things.filter((things) => things.length > 0).pipe(take(1)).subscribe( ... )
</code>```

..but I'm not sure why am forced to do this all of a sudden.

答:
Angular 5 supports RxJS 5.5, which introduced lettable operators that should help to the tree-shaking process to remove unused code during app bundling. You can import operators from 'rxjs/operators' and then wrap them into a function pipe() that takes a variable number of parameters, for example:

```<code>import { debounceTime, map} from 'rxjs/operators';
...
let keyupValue$ = keyup$
  .pipe(
     debounceTime(500),
     map(event => event['target'].value))
  .subscribe(val => this.doSomething(val));
</code>```

I liked the older syntax better. I don't think it's a breaking change though. You can keep using the older syntax if you won't use import from 'rxjs/operators'.

Body:
I'm reading about introduction of lettable/pipeable functions in RxJS, but nowhere does it state that this is potentially a breaking change for chained methods. This caught me out in one of our scipts where it started throwing an error after the upgrade:

let things = new BehaviorSubject<Thing[]>([]);
things.filter((things) => things.length > 0).take(1).subscribe( ... )

ERROR TypeError: tasks.filter(...).take is not a function

Could somebody explain / point out an article explaining why this is happening? Btw, the fix was to wrap take(1) in pipe() function:

things.filter((things) => things.length > 0).pipe(take(1)).subscribe( ... )

..but I'm not sure why am forced to do this all of a sudden.

Body:
Angular 5 supports RxJS 5.5, which introduced lettable operators that should help to the tree-shaking process to remove unused code during app bundling. You can import operators from 'rxjs/operators' and then wrap them into a function pipe() that takes a variable number of parameters, for example:

import { debounceTime, map} from 'rxjs/operators';
...
let keyupValue$ = keyup$
  .pipe(
     debounceTime(500),
     map(event => event['target'].value))
  .subscribe(val => this.doSomething(val));

I liked the older syntax better. I don't think it's a breaking change though. You can keep using the older syntax if you won't use import from 'rxjs/operators'.


问:
Tokenizer efficiency question
I'm writing a compiler front end for a project and I'm trying to understand what's the best method of tokenize the source code.
I can't choose between two ways:

1) the tokenizer read all tokens:

```<code>bool Parser::ReadAllTokens()
{
  Token token;
  while( m_Lexer->ReadToken( &token ) )
  {
    m_Tokens->push_back( token );
    token.Reset(); // reset the token values..
  }

  return !m_Tokens->empty();
}
</code>```

and then the parsing phase begins, operating on the m_Tokens list. In this way the methods getNextToken(), peekNextToken() and ungetToken() are relatively easy to implement by iterator, and the parsing code is well written and clear ( not broken by getNextToken() i.e. :

```<code> getNextToken();
 useToken();
 getNextToken();
 peekNextToken();
 if( peeked is something )
  ungetToken();
 ..
 ..
</code>```

)

2) the parsing phase begins and when needed, the token is created and used ( the code seems not so clear )

What's the best method??and why??and the efficiency??
thanks in advance for the answers

答: It would be better to use something like Boost::Spirit to tokenise. Why reinvent the wheel?</p>

ContentLicense: CC BY-SA 2.5

Title: Tokenizer efficiency question

Body:
I'm writing a compiler front end for a project and I'm trying to understand what's the best method of tokenize the source code.
I can't choose between two ways:

1) the tokenizer read all tokens:

bool Parser::ReadAllTokens()
{
  Token token;
  while( m_Lexer->ReadToken( &token ) )
  {
    m_Tokens->push_back( token );
    token.Reset(); // reset the token values..
  }

  return !m_Tokens->empty();
}

and then the parsing phase begins, operating on the m_Tokens list. In this way the methods getNextToken(), peekNextToken() and ungetToken() are relatively easy to implement by iterator, and the parsing code is well written and clear ( not broken by getNextToken() i.e. :

 getNextToken();
 useToken();
 getNextToken();
 peekNextToken();
 if( peeked is something )
  ungetToken();
 ..
 ..

)

2) the parsing phase begins and when needed, the token is created and used ( the code seems not so clear )

What's the best method??and why??and the efficiency??
thanks in advance for the answers


问:
How to fix unhandled exception access violation
I have written a logic to find out common elements from two arrays. But the program breaks at the if condition giving an exception saying Access violation reading location 0x00000002.

```<code>#include<stdio.h>
void intersect(int[2][2],int[2][2],int,int);
int main()
{
    int arr1[2][2]={{2,5},{6,8}};
    int arr2[2][2]={{1,2},{8,8}};
row = (sizeof(arr1)/sizeof(arr1[0]));
     col = (sizeof(arr1[0])/sizeof(arr1[0][1]));
intersect(arr1,arr2,row,col);
}

void intersect(int **ptr1, int **ptr2,int row, int col)
{
    int i = 0, j= 0, x = 0, y = 0;

    for(i = 0; i <row ; i++)
    {
        for(j = 0 ; j < col ; j++)
        {
                for(x = 0; x < row ; x++)
                {
                    for(y = 0; y < col ; y++)
                    {
                        if(ptr1[i][j] == ptr2[x][y])
                            printf("%d\t",ptr1[i][j]);

                    }
                }
        }
    }
}
</code>```

This is what it says in detail: First-chance exception at 0x002b1572 in Array.exe: 0xC0000005: Access violation reading location 0x00000002. Unhandled exception at 0x002b1572 in Array.exe: 0xC0000005: Access violation reading location 0x00000002.

答:
This works... not sure if it's what you wanted.</p>

```<code>void intersect(int** ptr1, int** ptr2, size_t row, size_t col)
{
int i = 0, j = 0, x = 0, y = 0;

for (i = 0; i < row; i++)
{
    for (j = 0; j < col; j++)
    {
        for (x = 0; x < row; x++)
        {
            for (y = 0; y < col; y++)
            {
                int a = *(int*)((DWORD)ptr1 + (i * (col * sizeof(int))) + (j * sizeof(int)));
                int b = *(int*)((DWORD)ptr2 + (x * (col * sizeof(int))) + (y * sizeof(int)));

                if (a == b)
                    printf("%d\t", a);
            }
         }
      }
    }
 }
</code>```

Body:
I have written a logic to find out common elements from two arrays. But the program breaks at the if condition giving an exception saying Access violation reading location 0x00000002.

#include<stdio.h>
void intersect(int[2][2],int[2][2],int,int);
int main()
{
    int arr1[2][2]={{2,5},{6,8}};
    int arr2[2][2]={{1,2},{8,8}};
row = (sizeof(arr1)/sizeof(arr1[0]));
     col = (sizeof(arr1[0])/sizeof(arr1[0][1]));
intersect(arr1,arr2,row,col);
}

void intersect(int **ptr1, int **ptr2,int row, int col)
{
    int i = 0, j= 0, x = 0, y = 0;

    for(i = 0; i <row ; i++)
    {
        for(j = 0 ; j < col ; j++)
        {
                for(x = 0; x < row ; x++)
                {
                    for(y = 0; y < col ; y++)
                    {
                        if(ptr1[i][j] == ptr2[x][y])
                            printf("%d\t",ptr1[i][j]);

                    }
                }
        }
    }
}

This is what it says in detail: First-chance exception at 0x002b1572 in Array.exe: 0xC0000005: Access violation reading location 0x00000002. Unhandled exception at 0x002b1572 in Array.exe: 0xC0000005: Access violation reading location 0x00000002.

Body:
This works... not sure if it's what you wanted.

void intersect(int** ptr1, int** ptr2, size_t row, size_t col)
{
int i = 0, j = 0, x = 0, y = 0;

for (i = 0; i < row; i++)
{
    for (j = 0; j < col; j++)
    {
        for (x = 0; x < row; x++)
        {
            for (y = 0; y < col; y++)
            {
                int a = *(int*)((DWORD)ptr1 + (i * (col * sizeof(int))) + (j * sizeof(int)));
                int b = *(int*)((DWORD)ptr2 + (x * (col * sizeof(int))) + (y * sizeof(int)));

                if (a == b)
                    printf("%d\t", a);
            }
         }
      }
    }
 }


问:
blueimp Gallery adding delete button under images always opens gallery
I'm trying to add a delete button under my list of images that will delete the selected image from the gallery using Ajax.

The issue I’m having is that whenever the delete button is clicked it opens the gallery of images, the script below opens the gallery, which is opened when clicked inside of the 'links' div. So this is still initiating when I click on the Delete button but I’ve can’t seem to find away around it.

Script

```<code>document.getElementById('links').onclick = function (event) {
    event = event || window.event;
    var target = event.target || event.srcElement,
        link = target.src ? target.parentNode : target.parentNode,
        options = { index: link, event: event },
        links = this.getElementsByClassName('image');
    blueimp.Gallery(links, options);
};
</code>```

Html

```<code><div id="links">
        <div class="property-image">
            <a class="image" href="6e575f42-1da8-4da0-bf84-7752930aea75.JPG">
                <img src=" 6e575f42-1da8-4da0-bf84-7752930aea75.JPG">
            </a>
            <a class="btn btn-danger delete-confirm-ajax close" data-ajax="true" data-id="72758" href=" ">Delete</a>
        </div>
</div>
</code>```

答:
patricia's answer will remove the functionality of the blueimp Gallery, didn't you notice you're not able to swipe to the next photo or close the modal?

Here is the completed solution https://jsfiddle.net/dfhjruft/, I'm using if else statement to detect whether is it button clicked or not.

Body:
I'm trying to add a delete button under my list of images that will delete the selected image from the gallery using Ajax.

The issue I’m having is that whenever the delete button is clicked it opens the gallery of images, the script below opens the gallery, which is opened when clicked inside of the 'links' div. So this is still initiating when I click on the Delete button but I’ve can’t seem to find away around it.

Script

document.getElementById('links').onclick = function (event) {
    event = event || window.event;
    var target = event.target || event.srcElement,
        link = target.src ? target.parentNode : target.parentNode,
        options = { index: link, event: event },
        links = this.getElementsByClassName('image');
    blueimp.Gallery(links, options);
};

Html

            Delete


问:
Attributes for passing data in HTML
I am using jQuery and in order to perform dynamic computations I need to store some information along an anchor tag, such as:

```<code><a href="blah.html" username="some value" age="12" address="blah">click</a>
</code>```

Of course this code will not pass validation, and since I need more than one data to store using rel attribute, for example, wouldn't be enough. I know HTML5 addresses this issue ,but int the meantime (until HTMl5 is fully accepted) what other options do I have?

Thanks,

Joel

答:
You can prefix your address attribute with 'data-' and access it using $.data like so:

```<code><a href="blah.html" username="some value" age="12" data-address="blah">click</a>

alert($("a").data("address"));
</code>```

Try it here.

Title: Attributes for passing data in HTML

Body:
I am using jQuery and in order to perform dynamic computations I need to store some information along an anchor tag, such as:

click

Of course this code will not pass validation, and since I need more than one data to store using rel attribute, for example, wouldn't be enough. I know HTML5 addresses this issue ,but int the meantime (until HTMl5 is fully accepted) what other options do I have?

Thanks,

Joel

Body:
You can prefix your address attribute with 'data-' and access it using $.data like so:

<a href="blah.html" username="some value" age="12" data-address="blah">click</a>

alert($("a").data("address"));

Try it here.


问:
Git local branch out of date, but nothing to pull?
I have a problem with git branch called nightly in my repo. When I was trying to git push to branch I got an error:

```<code> ! [rejected]        nightly -> nightly (non-fast-forward)
 error: failed to push some refs to 'https://github.com/Martin819/quoll.git'
 hint: Updates were rejected because a pushed branch tip is behind its remote
 hint: counterpart. Check out this branch and integrate the remote changes
 hint: (e.g. 'git pull ...') before pushing again.
 hint: See the 'Note about fast-forwards' in 'git push --help' for details.
</code>```

I have already run into this problem several times, so I thought the solution is straight forward. I had to git pull.

But, when I tries to git pull it says:

```<code> * branch            nightly    -> FETCH_HEAD
 Already up to date.
</code>```

So I tried to check the status with git remote show origin and got:

```<code>  HEAD branch: master
  Remote branches:
    master    tracked
    nightly   tracked
  Local branches configured for 'git pull':
    master  merges with remote master
    nightly merges with remote nightly
  Local refs configured for 'git push':
    master    pushes to master    (up to date)
    nightly   pushes to nightly   (local out of date)
</code>```

I'm now confused, because there it says that local branch is out of date, but when trying to pull it says Already up to date. Anyway how to solce this?

答: OK, problem solved. I have accidently checkouted to 'nigthly' branch instead of 'nightly' creating a new local branch, which caused this problem. After chechout to the branch the problem disappeared.</p>

Body:
I have a problem with git branch called nightly in my repo. When I was trying to git push to branch I got an error:

 ! [rejected]        nightly -> nightly (non-fast-forward)
 error: failed to push some refs to 'https://github.com/Martin819/quoll.git'
 hint: Updates were rejected because a pushed branch tip is behind its remote
 hint: counterpart. Check out this branch and integrate the remote changes
 hint: (e.g. 'git pull ...') before pushing again.
 hint: See the 'Note about fast-forwards' in 'git push --help' for details.

I have already run into this problem several times, so I thought the solution is straight forward. I had to git pull.

But, when I tries to git pull it says:

 * branch            nightly    -> FETCH_HEAD
 Already up to date.

So I tried to check the status with git remote show origin and got:

  HEAD branch: master
  Remote branches:
    master    tracked
    nightly   tracked
  Local branches configured for 'git pull':
    master  merges with remote master
    nightly merges with remote nightly
  Local refs configured for 'git push':
    master    pushes to master    (up to date)
    nightly   pushes to nightly   (local out of date)

I'm now confused, because there it says that local branch is out of date, but when trying to pull it says Already up to date. Anyway how to solce this?


问:
Get the most important words in the corpus using tf-idf (Gensim)
I am calculating tf-idf as follows.

```<code>texts=['human interface computer',
 'survey user computer system response time',
 'eps user interface system',
 'system human system eps',
 'user response time']

dictionary = corpora.Dictionary(texts)
corpus = [dictionary.doc2bow(text) for text in texts]
tfidf = models.TfidfModel(corpus)
corpus_tfidf = tfidf[corpus]
analyzedDocument = namedtuple('AnalyzedDocument', 'word tfidf_score')
d=[]
for doc in corpus_tfidf:
    for id, value in doc:
        word = dictionary.get(id)
        score = value
        d.append(analyzedDocument(word, score))
</code>```

However, now I want to identify the most 3 important words in my corpus using the words that has the highest idf values. Please let me know how to do it?

答:
Assuming you are getting your list d ok, you should be able to get it arranged as follows: At top:

```<code>from operator import itemgetter
</code>```

Then at bottom:

```<code>e=sorted(d, key=itemgetter(1))
top3 = e[:3]
print(top3)
</code>```

Body:
I am calculating tf-idf as follows.

texts=['human interface computer',
 'survey user computer system response time',
 'eps user interface system',
 'system human system eps',
 'user response time']

dictionary = corpora.Dictionary(texts)
corpus = [dictionary.doc2bow(text) for text in texts]
tfidf = models.TfidfModel(corpus)
corpus_tfidf = tfidf[corpus]
analyzedDocument = namedtuple('AnalyzedDocument', 'word tfidf_score')
d=[]
for doc in corpus_tfidf:
    for id, value in doc:
        word = dictionary.get(id)
        score = value
        d.append(analyzedDocument(word, score))

However, now I want to identify the most 3 important words in my corpus using the words that has the highest idf values. Please let me know how to do it?

Body:
Assuming you are getting your list d ok, you should be able to get it arranged as follows: At top:

from operator import itemgetter

Then at bottom:

e=sorted(d, key=itemgetter(1))
top3 = e[:3]
print(top3)


问:
Exception SQL state [null]; error code [31]; The connection is closed: The connection is closed; nested exception is java.sql.SQLException
we are using our own data source  which is built on top of PoolDataSourceFactory

```<code><bean id="dataSource" class="oracle.ucp.jdbc.PoolDataSourceFactory"
      factory-method="getPoolDataSource" lazy-init="true" >
    <property name="connectionFactoryClassName" value="oracle.jdbc.pool.OracleDataSource"/>
    <property name="user" value="${jdbc.username}" />
    <property name="password" value="${jdbc.password}" />
    <property name="URL" value="${jdbc.url}" />
    <property name="connectionWaitTimeout" value="30" />
    <property name="minPoolSize" value="3"/>
    <property name="maxPoolSize" value="20"/>
    <property name="abandonedConnectionTimeout" value="300"/>
    <property name="inactiveConnectionTimeout" value="900"/>
    <property name="validateConnectionOnBorrow" value="true"/>
    <property name="exceptionManager" value="exceptionManager"/>
</bean>
</code>```

Tomcat Server Log:

2017-10-17 20:33:25,913 ERROR [http-nio-8101-exec-4] u: - JdbcStoredProcedureWrapper.selectUserDetails: Could not execute stored procedure: Exception [{}] org.springframework.jdbc.UncategorizedSQLException: CallableStatementCallback; uncategorized SQLException for SQL [{? = call SP_NAME(?, ?, ?, )}]; SQL state [null]; error code [31]; The connection is closed: The connection is closed; nested exception is java.sql.SQLException: The co nnection is closed: The connection is closed at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:84) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:1137) at org.springframework.jdbc.core.JdbcTemplate.call(JdbcTemplate.java:1173) at org.springframework.jdbc.object.StoredProcedure.execute(StoredProcedure.java:142) at com.vodafone.gdsp.provisioning.dataaccess.jdbc.JdbcStoredProcedureCaller.execute(JdbcStoredProcedureCaller.java:561) at com.vodafone.gdsp.provisioning.dataaccess.jdbc.JdbcStore

I stuck with this issue if any help is highly appreciated

Please help me on the above issue

答:
After Struggling one week finally I fixed the Issue:

Solution: Most likely that a cursor is opened based on a global temporary table(GTT), which had been created with ON COMMIT DELETE ROWS option. And the cause of the ORA-08103: object no longer exists error is commit statement that followed right after the delete statement. DBA team didn't agree to change the GTT as on commit preserve rows so finally I added code base in Java Service Layer[Implementing the Spring - Programmatic Transaction] but forgot to add transactionManager.rollback(status) int catch block this is causing the connection closed error.

FiX :

package com.test;

```<code>import java.util.List;
import javax.sql.DataSource;

import org.springframework.dao.DataAccessException;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.TransactionDefinition;
import org.springframework.transaction.TransactionStatus;
import org.springframework.transaction.support.DefaultTransactionDefinition;

public class StudentJDBCTemplate implements StudentDAO {
   private DataSource dataSource;
   private JdbcTemplate jdbcTemplateObject;
   private PlatformTransactionManager transactionManager;

   public void setDataSource(DataSource dataSource) {
      this.dataSource = dataSource;
      this.jdbcTemplateObject = new JdbcTemplate(dataSource);
   }
   public void setTransactionManager(PlatformTransactionManager transactionManager) {
      this.transactionManager = transactionManager;
   }
   public void create(String name, Integer age, Integer marks, Integer year){
      TransactionDefinition def = new DefaultTransactionDefinition();
      TransactionStatus status = transactionManager.getTransaction(def);

      try {
         String SQL1 = "insert into Student (name, age) values (?, ?)";
         jdbcTemplateObject.update( SQL1, name, age);

         // Get the latest student id to be used in Marks table
         String SQL2 = "select max(id) from Student";
         int sid = jdbcTemplateObject.queryForInt( SQL2 );

         String SQL3 = "insert into Marks(sid, marks, year) " + "values (?, ?, ?)";
         jdbcTemplateObject.update( SQL3, sid, marks, year);

         System.out.println("Created Name = " + name + ", Age = " + age);
         transactionManager.commit(status);
      }
      catch (DataAccessException e) {
         System.out.println("Error in creating record, rolling back");
         **transactionManager.rollback(status);**
         throw e;
      }
      return;
   }
   public List<StudentMarks> listStudents() {
      String SQL = "select * from Student, Marks where Student.id=Marks.sid";
      List <StudentMarks> studentMarks = jdbcTemplateObject.query(SQL,
         new StudentMarksMapper());

      return studentMarks;
   }
}
</code>```

Body:
we are using our own data source  which is built on top of PoolDataSourceFactory

<bean id="dataSource" class="oracle.ucp.jdbc.PoolDataSourceFactory"
      factory-method="getPoolDataSource" lazy-init="true" >
    <property name="connectionFactoryClassName" value="oracle.jdbc.pool.OracleDataSource"/>
    <property name="user" value="${jdbc.username}" />
    <property name="password" value="${jdbc.password}" />
    <property name="URL" value="${jdbc.url}" />
    <property name="connectionWaitTimeout" value="30" />
    <property name="minPoolSize" value="3"/>
    <property name="maxPoolSize" value="20"/>
    <property name="abandonedConnectionTimeout" value="300"/>
    <property name="inactiveConnectionTimeout" value="900"/>
    <property name="validateConnectionOnBorrow" value="true"/>
    <property name="exceptionManager" value="exceptionManager"/>
</bean>

Tomcat Server Log:

2017-10-17 20:33:25,913 ERROR [http-nio-8101-exec-4] u: - JdbcStoredProcedureWrapper.selectUserDetails: Could not execute stored procedure: Exception [{}] org.springframework.jdbc.UncategorizedSQLException: CallableStatementCallback; uncategorized SQLException for SQL [{? = call SP_NAME(?, ?, ?, )}]; SQL state [null]; error code [31]; The connection is closed: The connection is closed; nested exception is java.sql.SQLException: The co nnection is closed: The connection is closed at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:84) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:1137) at org.springframework.jdbc.core.JdbcTemplate.call(JdbcTemplate.java:1173) at org.springframework.jdbc.object.StoredProcedure.execute(StoredProcedure.java:142) at com.vodafone.gdsp.provisioning.dataaccess.jdbc.JdbcStoredProcedureCaller.execute(JdbcStoredProcedureCaller.java:561) at com.vodafone.gdsp.provisioning.dataaccess.jdbc.JdbcStore

I stuck with this issue if any help is highly appreciated

Please help me on the above issue

Body:
After Struggling one week finally I fixed the Issue:

Solution: Most likely that a cursor is opened based on a global temporary table(GTT), which had been created with ON COMMIT DELETE ROWS option. And the cause of the ORA-08103: object no longer exists error is commit statement that followed right after the delete statement. DBA team didn't agree to change the GTT as on commit preserve rows so finally I added code base in Java Service Layer[Implementing the Spring - Programmatic Transaction] but forgot to add transactionManager.rollback(status) int catch block this is causing the connection closed error.

FiX :

package com.test;

import java.util.List;
import javax.sql.DataSource;

import org.springframework.dao.DataAccessException;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.TransactionDefinition;
import org.springframework.transaction.TransactionStatus;
import org.springframework.transaction.support.DefaultTransactionDefinition;

public class StudentJDBCTemplate implements StudentDAO {
   private DataSource dataSource;
   private JdbcTemplate jdbcTemplateObject;
   private PlatformTransactionManager transactionManager;

   public void setDataSource(DataSource dataSource) {
      this.dataSource = dataSource;
      this.jdbcTemplateObject = new JdbcTemplate(dataSource);
   }
   public void setTransactionManager(PlatformTransactionManager transactionManager) {
      this.transactionManager = transactionManager;
   }
   public void create(String name, Integer age, Integer marks, Integer year){
      TransactionDefinition def = new DefaultTransactionDefinition();
      TransactionStatus status = transactionManager.getTransaction(def);

      try {
         String SQL1 = "insert into Student (name, age) values (?, ?)";
         jdbcTemplateObject.update( SQL1, name, age);

         // Get the latest student id to be used in Marks table
         String SQL2 = "select max(id) from Student";
         int sid = jdbcTemplateObject.queryForInt( SQL2 );

         String SQL3 = "insert into Marks(sid, marks, year) " + "values (?, ?, ?)";
         jdbcTemplateObject.update( SQL3, sid, marks, year);

         System.out.println("Created Name = " + name + ", Age = " + age);
         transactionManager.commit(status);
      }
      catch (DataAccessException e) {
         System.out.println("Error in creating record, rolling back");
         **transactionManager.rollback(status);**
         throw e;
      }
      return;
   }
   public List<StudentMarks> listStudents() {
      String SQL = "select * from Student, Marks where Student.id=Marks.sid";
      List <StudentMarks> studentMarks = jdbcTemplateObject.query(SQL,
         new StudentMarksMapper());

      return studentMarks;
   }
}


问:
Render part of a large data set - dragToPan
I have 20000+ data points of the format [Date, Number], actual data is per hour for the last load of months.

I would like to show only the latest 28 days in the chart, but use the chart option explorer.actions: ['dragToPan', 'rightClickToReset'] to view data older than 28 days.

Basically, i want to show a subset of the data and then scroll to older data.

Is this even possible?  Can someone provide an example of how its done?

```<code>google.charts.load('current', {
  callback: function () {

    var element = document.getElementById('#chart');

    var data = google.visualization.arrayToDataTable([["Date","hits"],["2017-07-01",30],["2017-07-02",20],["2017-07-03",16],["2017-07-4",10],["2017-07-5",31],["2017-07-6",20],["2017-07-7",2],["2017-07-8",8],["2017-07-09",30],["2017-07-10",20],["2017-07-11",16],["2017-07-12",10],["2017-07-13",31],["2017-07-14",20],["2017-07-15",2],["2017-07-16",8]]);

    var chart = new google.visualization.AreaChart(element);

    var options = {
                width: "100%",
                height: "100%",
                fontSize: 13,
                animation: { duration: 1250, easing: 'out' },
                legend: 'none',
                chartArea: {
                    left: 40,
                    height: "80%",
                    width: "85%"
                },
                explorer: {
                    actions: ['dragToPan', 'rightClickToReset'],
                    axis: 'horizontal',
                    keepInBounds: false
                },
                hAxis: {
                    showTextEvery: 2,
                    textPosition: 'out',
                    format: 'dd MMM yy',
                }
            };

    chart.draw(data, options);
  },
  packages:['corechart']
});
</code>```

答:
You can use hAxis.viewWindow.max and hAxis.viewWindow.max as per: https://developers.google.com/chart/interactive/docs/gallery/linechart

See: https://jsfiddle.net/5h7jxqq8/169/

Body:
I have 20000+ data points of the format [Date, Number], actual data is per hour for the last load of months.

I would like to show only the latest 28 days in the chart, but use the chart option explorer.actions: ['dragToPan', 'rightClickToReset'] to view data older than 28 days.

Basically, i want to show a subset of the data and then scroll to older data.

Is this even possible?  Can someone provide an example of how its done?

google.charts.load('current', {
  callback: function () {

    var element = document.getElementById('#chart');

    var data = google.visualization.arrayToDataTable([["Date","hits"],["2017-07-01",30],["2017-07-02",20],["2017-07-03",16],["2017-07-4",10],["2017-07-5",31],["2017-07-6",20],["2017-07-7",2],["2017-07-8",8],["2017-07-09",30],["2017-07-10",20],["2017-07-11",16],["2017-07-12",10],["2017-07-13",31],["2017-07-14",20],["2017-07-15",2],["2017-07-16",8]]);

    var chart = new google.visualization.AreaChart(element);

    var options = {
                width: "100%",
                height: "100%",
                fontSize: 13,
                animation: { duration: 1250, easing: 'out' },
                legend: 'none',
                chartArea: {
                    left: 40,
                    height: "80%",
                    width: "85%"
                },
                explorer: {
                    actions: ['dragToPan', 'rightClickToReset'],
                    axis: 'horizontal',
                    keepInBounds: false
                },
                hAxis: {
                    showTextEvery: 2,
                    textPosition: 'out',
                    format: 'dd MMM yy',
                }
            };

    chart.draw(data, options);
  },
  packages:['corechart']
});