问:
Adding Spring module in JBOSS EAP 6.2
jboss startup with error thats why application showing 404, where is tomcat running perfectly with same war.i am using jboss EAP 6.2, spring 4.3 ,java 7.

```15:03:40,846 WARN  [org.jboss.modules] (MSC service thread 1-5) Failed to define class org.springframework.web.servlet.tags.RequestContextAwareTag in Module "org.springframework.spring:main" from local module loader @3ff33ecb (finder: local module finder @7a9fa239 (roots: E:\software\jboss-eap-6.2.0\jboss-eap-6.2\modules,E:\software\jboss-eap-6.2.0\jboss-eap-6.2\modules\system\layers\base)): java.lang.LinkageError: Failed to link org/springframework/web/servlet/tags/RequestContextAwareTag (Module "org.springframework.spring:main" from local module loader @3ff33ecb (finder: local module finder @7a9fa239 (roots: E:\software\jboss-eap-6.2.0\jboss-eap-6.2\modules,E:\software\jboss-eap-6.2.0\jboss-eap-6.2\modules\system\layers\base)))
    at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:428) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.Module.loadModuleClass(Module.java:548) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:189) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_79]
    at java.lang.ClassLoader.defineClass(ClassLoader.java:800) [rt.jar:1.7.0_79]
    at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:345) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:423) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.Module.loadModuleClass(Module.java:548) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:189) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_79]
    at java.lang.ClassLoader.defineClass(ClassLoader.java:800) [rt.jar:1.7.0_79]
    at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:345) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:423) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.Module.loadModuleClass(Module.java:548) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:189) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at java.lang.Class.forName0(Native Method) [rt.jar:1.7.0_79]
    at java.lang.Class.forName(Class.java:274) [rt.jar:1.7.0_79]
    at org.jboss.as.server.deployment.reflect.DeploymentClassIndex.classIndex(DeploymentClassIndex.java:54)
    at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:85) [jboss-as-ee-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
    at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:77) [jboss-as-ee-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:120)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_79]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_79]
    at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_79]
Caused by: java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TryCatchFinally
    at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_79]
    at java.lang.ClassLoader.defineClass(ClassLoader.java:800) [rt.jar:1.7.0_79]
    at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:345) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:423) [jboss-modules.jar:1.3.0.Final-redhat-2]
    ... 43 more
Caused by: java.lang.ClassNotFoundException: javax.servlet.jsp.tagext.TryCatchFinally from [Module "org.springframework.spring:main" from local module loader @3ff33ecb (finder: local module finder @7a9fa239 (roots: E:\software\jboss-eap-6.2.0\jboss-eap-6.2\modules,E:\software\jboss-eap-6.2.0\jboss-eap-6.2\modules\system\layers\base))]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:197) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final-redhat-2]
    ... 47 more

15:03:40,853 WARN  [org.jboss.modules] (MSC service thread 1-5) Failed to define class org.springframework.web.servlet.tags.EvalTag in Module "org.springframework.spring:main" from local module loader @3ff33ecb (finder: local module finder @7a9fa239 (roots: E:\software\jboss-eap-6.2.0\jboss-eap-6.2\modules,E:\software\jboss-eap-6.2.0\jboss-eap-6.2\modules\system\layers\base)): java.lang.LinkageError: Failed to link org/springframework/web/servlet/tags/RequestContextAwareTag (Module "org.springframework.spring:main" from local module loader @3ff33ecb (finder: local module finder @7a9fa239 (roots: E:\software\jboss-eap-6.2.0\jboss-eap-6.2\modules,E:\software\jboss-eap-6.2.0\jboss-eap-6.2\modules\system\layers\base)))
    at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:428) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.Module.loadModuleClass(Module.java:548) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:189) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_79]
    at java.lang.ClassLoader.defineClass(ClassLoader.java:800) [rt.jar:1.7.0_79]
    at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:345) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:423) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.Module.loadModuleClass(Module.java:548) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:189) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_79]
    at java.lang.ClassLoader.defineClass(ClassLoader.java:800) [rt.jar:1.7.0_79]
    at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:345) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:423) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.Module.loadModuleClass(Module.java:548) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:189) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at java.lang.Class.forName0(Native Method) [rt.jar:1.7.0_79]
    at java.lang.Class.forName(Class.java:274) [rt.jar:1.7.0_79]
    at org.jboss.as.server.deployment.reflect.DeploymentClassIndex.classIndex(DeploymentClassIndex.java:54)
    at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:85) [jboss-as-ee-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
    at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:77) [jboss-as-ee-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:120)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_79]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_79]
    at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_79]
Caused by: java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TryCatchFinally
    at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_79]
    at java.lang.ClassLoader.defineClass(ClassLoader.java:800) [rt.jar:1.7.0_79]
    at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:345) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:423) [jboss-modules.jar:1.3.0.Final-redhat-2]
    ... 43 more
Caused by: java.lang.ClassNotFoundException: javax.servlet.jsp.tagext.TryCatchFinally from [Module "org.springframework.spring:main" from local module loader @3ff33ecb (finder: local module finder @7a9fa239 (roots: E:\software\jboss-eap-6.2.0\jboss-eap-6.2\modules,E:\software\jboss-eap-6.2.0\jboss-eap-6.2\modules\system\layers\base))]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:197) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final-redhat-2]
    ... 47 more

15:03:40,857 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC000001: Failed to start service jboss.deployment.unit."OnlineRegistration-0.0.1-SNAPSHOT.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."OnlineRegistration-0.0.1-SNAPSHOT.war".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of deployment "OnlineRegistration-0.0.1-SNAPSHOT.war"
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:127) [jboss-as-server-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_79]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_79]
    at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_79]
Caused by: java.lang.LinkageError: Failed to link org/springframework/web/servlet/tags/RequestContextAwareTag (Module "org.springframework.spring:main" from local module loader @3ff33ecb (finder: local module finder @7a9fa239 (roots: E:\software\jboss-eap-6.2.0\jboss-eap-6.2\modules,E:\software\jboss-eap-6.2.0\jboss-eap-6.2\modules\system\layers\base)))
    at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:428) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.Module.loadModuleClass(Module.java:548) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:189) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_79]
    at java.lang.ClassLoader.defineClass(ClassLoader.java:800) [rt.jar:1.7.0_79]
    at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:345) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:423) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.Module.loadModuleClass(Module.java:548) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:189) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_79]
    at java.lang.ClassLoader.defineClass(ClassLoader.java:800) [rt.jar:1.7.0_79]
    at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:345) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:423) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.Module.loadModuleClass(Module.java:548) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:189) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at java.lang.Class.forName0(Native Method) [rt.jar:1.7.0_79]
    at java.lang.Class.forName(Class.java:274) [rt.jar:1.7.0_79]
    at org.jboss.as.server.deployment.reflect.DeploymentClassIndex.classIndex(DeploymentClassIndex.java:54) [jboss-as-server-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
    at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:85)
    at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:77)
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:120) [jboss-as-server-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
    ... 5 more
Caused by: java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TryCatchFinally
    at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_79]
    at java.lang.ClassLoader.defineClass(ClassLoader.java:800) [rt.jar:1.7.0_79]
    at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:345) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:423) [jboss-modules.jar:1.3.0.Final-redhat-2]
    ... 43 more
Caused by: java.lang.ClassNotFoundException: javax.servlet.jsp.tagext.TryCatchFinally from [Module "org.springframework.spring:main" from local module loader @3ff33ecb (finder: local module finder @7a9fa239 (roots: E:\software\jboss-eap-6.2.0\jboss-eap-6.2\modules,E:\software\jboss-eap-6.2.0\jboss-eap-6.2\modules\system\layers\base))]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:197) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final-redhat-2]
    ... 47 more
```

i thing jboss-jsp-api_2.2_spec-1.0.1.Final-redhat-2.jar should contain TryCatchFinally class but in this case class not found.Do i need more configuration after adding spring module or  jboss library  conflicting with war lib?

please let me know if jboss 6.2 is not support spring 4.x version.

答:
It seems you defined a module org.springframework.spring, but you didn't define a dependency to javax.servlet.jsp.api within that module.xml.

JBoss doesn't add dependencies to your module automatically.

Title: Adding Spring module in JBOSS EAP 6.2

Body:
jboss startup with error thats why application showing 404, where is tomcat running perfectly with same war.i am using jboss EAP 6.2, spring 4.3 ,java 7.

15:03:40,846 WARN  [org.jboss.modules] (MSC service thread 1-5) Failed to define class org.springframework.web.servlet.tags.RequestContextAwareTag in Module "org.springframework.spring:main" from local module loader @3ff33ecb (finder: local module finder @7a9fa239 (roots: E:\software\jboss-eap-6.2.0\jboss-eap-6.2\modules,E:\software\jboss-eap-6.2.0\jboss-eap-6.2\modules\system\layers\base)): java.lang.LinkageError: Failed to link org/springframework/web/servlet/tags/RequestContextAwareTag (Module "org.springframework.spring:main" from local module loader @3ff33ecb (finder: local module finder @7a9fa239 (roots: E:\software\jboss-eap-6.2.0\jboss-eap-6.2\modules,E:\software\jboss-eap-6.2.0\jboss-eap-6.2\modules\system\layers\base)))
    at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:428) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.Module.loadModuleClass(Module.java:548) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:189) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_79]
    at java.lang.ClassLoader.defineClass(ClassLoader.java:800) [rt.jar:1.7.0_79]
    at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:345) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:423) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.Module.loadModuleClass(Module.java:548) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:189) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_79]
    at java.lang.ClassLoader.defineClass(ClassLoader.java:800) [rt.jar:1.7.0_79]
    at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:345) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:423) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.Module.loadModuleClass(Module.java:548) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:189) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at java.lang.Class.forName0(Native Method) [rt.jar:1.7.0_79]
    at java.lang.Class.forName(Class.java:274) [rt.jar:1.7.0_79]
    at org.jboss.as.server.deployment.reflect.DeploymentClassIndex.classIndex(DeploymentClassIndex.java:54)
    at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:85) [jboss-as-ee-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
    at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:77) [jboss-as-ee-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:120)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_79]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_79]
    at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_79]
Caused by: java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TryCatchFinally
    at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_79]
    at java.lang.ClassLoader.defineClass(ClassLoader.java:800) [rt.jar:1.7.0_79]
    at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:345) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:423) [jboss-modules.jar:1.3.0.Final-redhat-2]
    ... 43 more
Caused by: java.lang.ClassNotFoundException: javax.servlet.jsp.tagext.TryCatchFinally from [Module "org.springframework.spring:main" from local module loader @3ff33ecb (finder: local module finder @7a9fa239 (roots: E:\software\jboss-eap-6.2.0\jboss-eap-6.2\modules,E:\software\jboss-eap-6.2.0\jboss-eap-6.2\modules\system\layers\base))]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:197) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final-redhat-2]
    ... 47 more

15:03:40,853 WARN  [org.jboss.modules] (MSC service thread 1-5) Failed to define class org.springframework.web.servlet.tags.EvalTag in Module "org.springframework.spring:main" from local module loader @3ff33ecb (finder: local module finder @7a9fa239 (roots: E:\software\jboss-eap-6.2.0\jboss-eap-6.2\modules,E:\software\jboss-eap-6.2.0\jboss-eap-6.2\modules\system\layers\base)): java.lang.LinkageError: Failed to link org/springframework/web/servlet/tags/RequestContextAwareTag (Module "org.springframework.spring:main" from local module loader @3ff33ecb (finder: local module finder @7a9fa239 (roots: E:\software\jboss-eap-6.2.0\jboss-eap-6.2\modules,E:\software\jboss-eap-6.2.0\jboss-eap-6.2\modules\system\layers\base)))
    at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:428) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.Module.loadModuleClass(Module.java:548) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:189) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_79]
    at java.lang.ClassLoader.defineClass(ClassLoader.java:800) [rt.jar:1.7.0_79]
    at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:345) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:423) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.Module.loadModuleClass(Module.java:548) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:189) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_79]
    at java.lang.ClassLoader.defineClass(ClassLoader.java:800) [rt.jar:1.7.0_79]
    at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:345) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:423) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.Module.loadModuleClass(Module.java:548) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:189) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at java.lang.Class.forName0(Native Method) [rt.jar:1.7.0_79]
    at java.lang.Class.forName(Class.java:274) [rt.jar:1.7.0_79]
    at org.jboss.as.server.deployment.reflect.DeploymentClassIndex.classIndex(DeploymentClassIndex.java:54)
    at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:85) [jboss-as-ee-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
    at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:77) [jboss-as-ee-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:120)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_79]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_79]
    at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_79]
Caused by: java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TryCatchFinally
    at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_79]
    at java.lang.ClassLoader.defineClass(ClassLoader.java:800) [rt.jar:1.7.0_79]
    at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:345) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:423) [jboss-modules.jar:1.3.0.Final-redhat-2]
    ... 43 more
Caused by: java.lang.ClassNotFoundException: javax.servlet.jsp.tagext.TryCatchFinally from [Module "org.springframework.spring:main" from local module loader @3ff33ecb (finder: local module finder @7a9fa239 (roots: E:\software\jboss-eap-6.2.0\jboss-eap-6.2\modules,E:\software\jboss-eap-6.2.0\jboss-eap-6.2\modules\system\layers\base))]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:197) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final-redhat-2]
    ... 47 more

15:03:40,857 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC000001: Failed to start service jboss.deployment.unit."OnlineRegistration-0.0.1-SNAPSHOT.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."OnlineRegistration-0.0.1-SNAPSHOT.war".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of deployment "OnlineRegistration-0.0.1-SNAPSHOT.war"
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:127) [jboss-as-server-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_79]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_79]
    at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_79]
Caused by: java.lang.LinkageError: Failed to link org/springframework/web/servlet/tags/RequestContextAwareTag (Module "org.springframework.spring:main" from local module loader @3ff33ecb (finder: local module finder @7a9fa239 (roots: E:\software\jboss-eap-6.2.0\jboss-eap-6.2\modules,E:\software\jboss-eap-6.2.0\jboss-eap-6.2\modules\system\layers\base)))
    at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:428) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.Module.loadModuleClass(Module.java:548) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:189) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_79]
    at java.lang.ClassLoader.defineClass(ClassLoader.java:800) [rt.jar:1.7.0_79]
    at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:345) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:423) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.Module.loadModuleClass(Module.java:548) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:189) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_79]
    at java.lang.ClassLoader.defineClass(ClassLoader.java:800) [rt.jar:1.7.0_79]
    at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:345) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:423) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.Module.loadModuleClass(Module.java:548) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:189) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at java.lang.Class.forName0(Native Method) [rt.jar:1.7.0_79]
    at java.lang.Class.forName(Class.java:274) [rt.jar:1.7.0_79]
    at org.jboss.as.server.deployment.reflect.DeploymentClassIndex.classIndex(DeploymentClassIndex.java:54) [jboss-as-server-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
    at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:85)
    at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:77)
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:120) [jboss-as-server-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
    ... 5 more
Caused by: java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TryCatchFinally
    at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_79]
    at java.lang.ClassLoader.defineClass(ClassLoader.java:800) [rt.jar:1.7.0_79]
    at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:345) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:423) [jboss-modules.jar:1.3.0.Final-redhat-2]
    ... 43 more
Caused by: java.lang.ClassNotFoundException: javax.servlet.jsp.tagext.TryCatchFinally from [Module "org.springframework.spring:main" from local module loader @3ff33ecb (finder: local module finder @7a9fa239 (roots: E:\software\jboss-eap-6.2.0\jboss-eap-6.2\modules,E:\software\jboss-eap-6.2.0\jboss-eap-6.2\modules\system\layers\base))]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:197) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final-redhat-2]
    ... 47 more

i thing jboss-jsp-api_2.2_spec-1.0.1.Final-redhat-2.jar should contain TryCatchFinally class but in this case class not found.Do i need more configuration after adding spring module or  jboss library  conflicting with war lib?

please let me know if jboss 6.2 is not support spring 4.x version.


来源: stackexchange

问:
gradle file error when i changed recyclerview version from 23.0.1 to 23.2.1
```<code>apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "25.0.0"
    defaultConfig {
    applicationId "adhoc.mlm_app"
    minSdkVersion 15
    targetSdkVersion 23
    versionCode 4
    versionName "1.0.4"
   testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}
dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
     exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support.constraint:constraint-layout:1.0.2'//getting error

    compile 'com.android.support:appcompat-v7:23.2.1'
    compile 'com.android.support:design:23.0.1'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.android.support:cardview-v7:23.2.1'
    compile 'com.android.support:recyclerview-v7:23.2.1'
    testCompile 'junit:junit:4.12'
}
</code>```

All com.android.support libraries must use the exact same version
  specification (mixing versions can lead to runtime crashes). Found
  versions 23.2.1, 23.0.1. Examples include
  com.android.support:animated-vector-drawable:23.2.1 and
  com.android.support:design:23.0.1 )

答:
update gradle file with below code</p>

```<code>    dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
     exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support.constraint:constraint-layout:1.0.2'

    compile 'com.android.support:appcompat-v7:23.2.1'
    compile 'com.android.support:design:23.2.1'//change here
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.android.support:cardview-v7:23.2.1'
    compile 'com.android.support:recyclerview-v7:23.2.1'
    testCompile 'junit:junit:4.12'
}
</code>```

ContentLicense: CC BY-SA 3.0

Body:
apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "25.0.0"
    defaultConfig {
    applicationId "adhoc.mlm_app"
    minSdkVersion 15
    targetSdkVersion 23
    versionCode 4
    versionName "1.0.4"
   testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}
dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
     exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support.constraint:constraint-layout:1.0.2'//getting error

    compile 'com.android.support:appcompat-v7:23.2.1'
    compile 'com.android.support:design:23.0.1'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.android.support:cardview-v7:23.2.1'
    compile 'com.android.support:recyclerview-v7:23.2.1'
    testCompile 'junit:junit:4.12'
}

All com.android.support libraries must use the exact same version
  specification (mixing versions can lead to runtime crashes). Found
  versions 23.2.1, 23.0.1. Examples include
  com.android.support:animated-vector-drawable:23.2.1 and
  com.android.support:design:23.0.1 )

Body:
update gradle file with below code

    dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
     exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support.constraint:constraint-layout:1.0.2'

    compile 'com.android.support:appcompat-v7:23.2.1'
    compile 'com.android.support:design:23.2.1'//change here
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.android.support:cardview-v7:23.2.1'
    compile 'com.android.support:recyclerview-v7:23.2.1'
    testCompile 'junit:junit:4.12'
}


问:
SpicIE - How to get the real address in the address bar?
I'm trying to write a small addon for Internet Explorer using SpicIE.
I understood how to respond to events using code like:

```<code>this.OnDocumentComplete += new SpicIE.Common.WebBrowserEvent_DocumentComplete(SamplePlugin_OnDocumentComplete);
this.OnNavigateComplete += new SpicIE.Common.WebBrowserEvent_NavigateComplete2(SamplePlugin_OnNavigateComplete);
this.OnBeforeNavigate += new SpicIE.Common.WebBrowserEvent_BeforeNavigate2(SamplePlugin_OnBeforeNavigate);
</code>```

When the eventhandlers are called, I can see the current URL of the event.
The eventhandlers, however, are called for every webbrowser object event, including iframes. I need to respond only when the url that is in the address bar is changed (where you type the url that you want to navigate to).

How do I find out if the event belongs to the top frame\webbrowser? Is there a way to grab the address-bar url using the pDisp object or something else?

答:
After adding a reference to Interop.SHDocVw I can look at:

```<code>HostInstance.BrowserRef.LocationURL
</code>```

The eventhandlers are called to many times (because of the iframes) but I can check every time if the new address is different from the old one.

HostInstance is set in the plugin constructor like most examples - don't forget to verify that HostInstance is not null.

ContentLicense: CC BY-SA 2.5

Body:
I'm trying to write a small addon for Internet Explorer using SpicIE.
I understood how to respond to events using code like:

this.OnDocumentComplete += new SpicIE.Common.WebBrowserEvent_DocumentComplete(SamplePlugin_OnDocumentComplete);
this.OnNavigateComplete += new SpicIE.Common.WebBrowserEvent_NavigateComplete2(SamplePlugin_OnNavigateComplete);
this.OnBeforeNavigate += new SpicIE.Common.WebBrowserEvent_BeforeNavigate2(SamplePlugin_OnBeforeNavigate);

When the eventhandlers are called, I can see the current URL of the event.
The eventhandlers, however, are called for every webbrowser object event, including iframes. I need to respond only when the url that is in the address bar is changed (where you type the url that you want to navigate to).

How do I find out if the event belongs to the top frame\webbrowser? Is there a way to grab the address-bar url using the pDisp object or something else?

Body:
After adding a reference to Interop.SHDocVw I can look at:

HostInstance.BrowserRef.LocationURL

The eventhandlers are called to many times (because of the iframes) but I can check every time if the new address is different from the old one.

HostInstance is set in the plugin constructor like most examples - don't forget to verify that HostInstance is not null.


问:
Changing active tab using angular
Angular tab change on new value?

```<code><ul class="nav nav-tabs">
    <li class="active">
        <a class="A" data-target="#A">Nye({{c.data.feil_nye_ant}})</a>
    </li>
    <li class="nav">
        <a class="B" data-target="#B">Aktive({{c.data.feil_aktive_ant}})</a>
    </li>
    <li class="nav">
        <a class="C" data-target="#C">HASTER({{c.data.feil_haster_ant}})</a>
    </li>
    <li class="nav">
        <a class="D" data-target="#D">Ferdige({{c.data.feil_ferdig_ant}})</a>
    </li>
</ul>
</code>```

Need to draw focus by opening the "HASTER" tab (means "urgent"), when the value of c.data.feil_haster_ant is updated.

答:
You can use ng-class to make your tabs active. When you perform an event on the tab (like click), set the value of some condition to trigger changes for the css of that tab using ng-class.

HTML:

```<code><ul class="nav nav-tabs">
    <li class="active"  ng-class="{'active': Some condition}">
        <a class="A" data-target="#A">Nye({{c.data.feil_nye_ant}})</a>
    </li>
    <li class="nav"  ng-class="{'active': Some condition}">
        <a class="B" data-target="#B">Aktive({{c.data.feil_aktive_ant}})</a>
    </li>
    <li class="nav"  ng-class="{'active': Some condition}">
        <a class="C" data-target="#C">HASTER({{c.data.feil_haster_ant}})</a>
    </li>
    <li class="nav"  ng-class="{'active': Some condition}">
        <a class="D" data-target="#D">Ferdige({{c.data.feil_ferdig_ant}})</a>
    </li>
</ul>
</code>```

CSS:

```<code>.active{
 your css styles for active tab
}
</code>```

Title: Changing active tab using angular

Body:
Angular tab change on new value?

        Nye({{c.data.feil_nye_ant}})

        Aktive({{c.data.feil_aktive_ant}})

        HASTER({{c.data.feil_haster_ant}})

        Ferdige({{c.data.feil_ferdig_ant}})

Need to draw focus by opening the "HASTER" tab (means "urgent"), when the value of c.data.feil_haster_ant is updated.

Body:
You can use ng-class to make your tabs active. When you perform an event on the tab (like click), set the value of some condition to trigger changes for the css of that tab using ng-class.

HTML:

<ul class="nav nav-tabs">
    <li class="active"  ng-class="{'active': Some condition}">
        <a class="A" data-target="#A">Nye({{c.data.feil_nye_ant}})</a>
    </li>
    <li class="nav"  ng-class="{'active': Some condition}">
        <a class="B" data-target="#B">Aktive({{c.data.feil_aktive_ant}})</a>
    </li>
    <li class="nav"  ng-class="{'active': Some condition}">
        <a class="C" data-target="#C">HASTER({{c.data.feil_haster_ant}})</a>
    </li>
    <li class="nav"  ng-class="{'active': Some condition}">
        <a class="D" data-target="#D">Ferdige({{c.data.feil_ferdig_ant}})</a>
    </li>
</ul>

CSS:

.active{
 your css styles for active tab
}


问:
Convert query from Oracle to SQL server
I want to convert below Oracle query into SQL server environment-

```<code>select to_date(substr(to_char(col1, 'YYYYMMDD HH24MISS),1,8), 'YYYYMMDD') from tab;
</code>```

From the above query i want to convert it into first time in Date format and then second time Time format. It means two times i want this query while above one in Date format.

答:
This is not even how I would do this in Oracle.  This is converting the date/time value to a date, with no time component.  In SQL Server:

```<code>select cast(col1 as date)
from tab;
</code>```

In Oracle:

```<code>select trunc(col1)
from tab;
</code>```

Title: Convert query from Oracle to SQL server

Body:
I want to convert below Oracle query into SQL server environment-

select to_date(substr(to_char(col1, 'YYYYMMDD HH24MISS),1,8), 'YYYYMMDD') from tab;

From the above query i want to convert it into first time in Date format and then second time Time format. It means two times i want this query while above one in Date format.

Body:
This is not even how I would do this in Oracle.  This is converting the date/time value to a date, with no time component.  In SQL Server:

select cast(col1 as date)
from tab;

In Oracle:

select trunc(col1)
from tab;


问:
I don't understand why it says ArrayOutOfBound error
I am trying to create a blackjack game.

First of all, I created an array called deck size 52 using a class constructor.

```<code>    public Deck(){
    for(int i=0; i<13; i++){ //Spades
      if(i>9){
        deck[i]=10;
      }
      else{
        deck[i]=(i+1);
      }
    }
    for(int i=13; i<26; i++){ //Hearts
      if(i>21){
        deck[i]=10;
      }
      else{
        deck[i]=(i-12);
      }
    }
    for(int i=26; i<39; i++){ //Clubs
      if(i>34){
        deck[i]=10;
      }
      else{
        deck[i]=(i-25);
      }

    }
    for(int i=39; i<52; i++){ //Diamonds
      if(i>47){
        deck[i]=10;
      }
      else{
        deck[i]=(i-38);
      }

    }
}
</code>```

Then, I also created a shuffleDeck function in the Deck class.

```<code>public void shuffleDeck(){
  int[] temp = new int[52];
  int[] indexChecker = new int[52];
  for(int i=0 ; i<52 ; i++){
    indexChecker[i]=0;
  }
  int index = 0;
  for(int i=0; i<52 ; i++){
    index = number.nextInt(52);
    for(i=0; i<52 ; i++){
      while(index == indexChecker[i])
      index = number.nextInt(52);
    }
    temp[i] = deck[index]; //The error is here
  }

  for(int i=0; i<52; i++){
    deck[i] = temp [i];
  }
}
</code>```

I use this algorithm to make sure that my random index generator does not generate the same number to shuffle my deck.

But when I try to shuffle it in the main class, it doesn't work.

```<code>    public static void main(String[] args) {

    Deck card = new Deck();

    System.out.println("Decks are created");
    card.getDeck();

    System.out.println("Shuffling...");
    card.shuffleDeck();

    System.out.println("Shuffled deck.");
    card.getDeck();
</code>```

The output:

```<code>run:
Decks are created
0-1
1-2
2-3
3-4
4-5
5-6
6-7
7-8
8-9
9-10
10-10
11-10
12-10
13-1
14-2
15-3
16-4
17-5
18-6
19-7
20-8
21-9
22-10
23-10
24-10
25-10
26-1
27-2
28-3
29-4
30-5
31-6
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 52
32-7
33-8
34-9
35-10
36-10
37-10
38-10
39-1
40-2
    at blackjack.pkg5.pkg0.Deck.shuffleDeck(Deck.java:69)
41-3
42-4
43-5
44-6
45-7
    at blackjack.pkg5.pkg0.Blackjack50.main(Blackjack50.java:13)
46-8
47-9
48-10
49-10
50-10
51-10
Shuffling...
C:\Users\Afrie Irham\AppData\Local\NetBeans\Cache\8.2\executor-snippets\run.xml:53: Java returned: 1
BUILD FAILED (total time: 0 seconds)
</code>```

答:
```<code>  for(int i=0; i<52 ; i++){
    index = number.nextInt(52);
    for(i=0; i<52 ; i++){
      while(index == indexChecker[i])
      index = number.nextInt(52);
    }
    temp[i] = deck[index]; //The error is here
  }
</code>```

You are reusing i in the inner loop, thus erasing the old value and incrementing until !(i < 52), i.e. i >= 52, then after the loop you are accessing temp[i], which is out of bounds for i >= 52. So just introduce a new iteration variable j to replace i in the inner loop.

Body:
I am trying to create a blackjack game.

First of all, I created an array called deck size 52 using a class constructor.

    public Deck(){
    for(int i=0; i<13; i++){ //Spades
      if(i>9){
        deck[i]=10;
      }
      else{
        deck[i]=(i+1);
      }
    }
    for(int i=13; i<26; i++){ //Hearts
      if(i>21){
        deck[i]=10;
      }
      else{
        deck[i]=(i-12);
      }
    }
    for(int i=26; i<39; i++){ //Clubs
      if(i>34){
        deck[i]=10;
      }
      else{
        deck[i]=(i-25);
      }

    }
    for(int i=39; i<52; i++){ //Diamonds
      if(i>47){
        deck[i]=10;
      }
      else{
        deck[i]=(i-38);
      }

    }
}

Then, I also created a shuffleDeck function in the Deck class.

public void shuffleDeck(){
  int[] temp = new int[52];
  int[] indexChecker = new int[52];
  for(int i=0 ; i<52 ; i++){
    indexChecker[i]=0;
  }
  int index = 0;
  for(int i=0; i<52 ; i++){
    index = number.nextInt(52);
    for(i=0; i<52 ; i++){
      while(index == indexChecker[i])
      index = number.nextInt(52);
    }
    temp[i] = deck[index]; //The error is here
  }

  for(int i=0; i<52; i++){
    deck[i] = temp [i];
  }
}

I use this algorithm to make sure that my random index generator does not generate the same number to shuffle my deck.

But when I try to shuffle it in the main class, it doesn't work.

    public static void main(String[] args) {

    Deck card = new Deck();

    System.out.println("Decks are created");
    card.getDeck();

    System.out.println("Shuffling...");
    card.shuffleDeck();

    System.out.println("Shuffled deck.");
    card.getDeck();

The output:

run:
Decks are created
0-1
1-2
2-3
3-4
4-5
5-6
6-7
7-8
8-9
9-10
10-10
11-10
12-10
13-1
14-2
15-3
16-4
17-5
18-6
19-7
20-8
21-9
22-10
23-10
24-10
25-10
26-1
27-2
28-3
29-4
30-5
31-6
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 52
32-7
33-8
34-9
35-10
36-10
37-10
38-10
39-1
40-2
    at blackjack.pkg5.pkg0.Deck.shuffleDeck(Deck.java:69)
41-3
42-4
43-5
44-6
45-7
    at blackjack.pkg5.pkg0.Blackjack50.main(Blackjack50.java:13)
46-8
47-9
48-10
49-10
50-10
51-10
Shuffling...
C:\Users\Afrie Irham\AppData\Local\NetBeans\Cache\8.2\executor-snippets\run.xml:53: Java returned: 1
BUILD FAILED (total time: 0 seconds)

Body:
  for(int i=0; i<52 ; i++){
    index = number.nextInt(52);
    for(i=0; i<52 ; i++){
      while(index == indexChecker[i])
      index = number.nextInt(52);
    }
    temp[i] = deck[index]; //The error is here
  }

You are reusing i in the inner loop, thus erasing the old value and incrementing until !(i < 52), i.e. i >= 52, then after the loop you are accessing temp[i], which is out of bounds for i >= 52. So just introduce a new iteration variable j to replace i in the inner loop.


问:
How can i concatenate 2 strings in node.js?
```<code>var link = 'https://thisIsAlink'
var line = 'this is a line'
</code>```

what i have done is

```<code>var full_path = session.send(link + line)
</code>```

The output i got :https://thisIsAlink this is a line

The output i want :https://thisIsAlinkthis is a line

答:
```<code>Var1 = 'this sentence'
Var2 = 'new sentence'
Var2 += Var1
</code>```

This output is : new sentencethis sentence

If you want just switch the contat and you get the opposite

ContentLicense: CC BY-SA 4.0

Body:
var link = 'https://thisIsAlink'
var line = 'this is a line'

what i have done is

var full_path = session.send(link + line)

The output i got :https://thisIsAlink this is a line

The output i want :https://thisIsAlinkthis is a line

Body:
Var1 = 'this sentence'
Var2 = 'new sentence'
Var2 += Var1

This output is : new sentencethis sentence

If you want just switch the contat and you get the opposite


问:
Counting the number of a specific word inside a php string
I have a php string like as follows :

```<code> $string = 'www absjdjjd www123 dkkd www wwww ghy ww';
</code>```

How to count the no. of words just only "www" present in this string.There are two words in this string so result should be 2.
I have tried something like below but not working.

```<code>$val = 'www';
$count = substr_count($string, $val);
</code>```

答:
Using explode() and array_count_values().</p>

```<code><?php
$string = 'www absjdjjd www123 dkkd www wwww ghy ww';

$arr = array_count_values(explode(" ", $string));

echo isset($arr['www']) ? $arr['www'] : 0; //2
</code>```

Body:
I have a php string like as follows :

 $string = 'www absjdjjd www123 dkkd www wwww ghy ww';

How to count the no. of words just only "www" present in this string.There are two words in this string so result should be 2.
I have tried something like below but not working.

$val = 'www';
$count = substr_count($string, $val);

Body:
Using explode() and array_count_values().

<?php
$string = 'www absjdjjd www123 dkkd www wwww ghy ww';

$arr = array_count_values(explode(" ", $string));

echo isset($arr['www']) ? $arr['www'] : 0; //2


问:
svn 1.7 fresh checkout can't commit change
I have an SVN subtree that has been working fine for 2+ years. I now encountered that I cannot commit some files.

I did a fresh checkout and ensured no other program accesses the folder.

When I do:

```<code>svn ci -m"fix filter" symfony/lib/filter/doctrine/MembershipForm.class.php
svn: E200009: Commit failed (details follow):
svn: E200009:     '/home/jochen/projects/nzgbctest/symfony/lib/filter/doctrine/MembershipForm.class.php' is not under version control
</code>```

Any ideas how to fix this?

```<code>svn status symfony/lib/filter/doctrine/MembershipForm.class.php
</code>```

shows nothing

```<code>svn add symfony/lib/filter/doctrine/MembershipForm.class.php
</code>```

or

```<code>svn add --force symfony/lib/filter/doctrine/MembershipForm.class.php
</code>```

show

```<code>svn: warning: W155010: '/home/jochen/projects/nzgbc/symfony/lib/filter/doctrine/MembershipForm.class.php' not found
svn: E200009: Could not add all targets because some targets don't exist
svn: E200009: Illegal target for the requested operation
</code>```

strangely:

```<code>ls -la symfony/lib/filter/doctrine/MembershipForm.class.php
</code>```

and

```<code>cd symfony/lib/filter/doctrine/
ls -la MembershipForm.class.php
</code>```

show

```<code>ls: cannot access MembershipForm.class.php: No such file or directory
</code>```

but

```<code>cd symfony/lib/filter/doctrine/
ls -la
</code>```

contains

```<code>-rwxrwxrwx 1 jochen jochen 7671 Jun 28 13:08 MembershipFormFilter.class.php
</code>```

Is my disk broken? My IDE finds the file and I can edit it, but

```<code>nano symfony/lib/filter/doctrine/MembershipForm.class.php
</code>```

shows an empty file!

apache can read the file as well, as changes have an effect.

The same repository is also checked out on the live site and works fine there.

答: make sure you added correct folder or file.  To fix the error of E200009, you can just svn add {file or folder} --force. And you need add first, then commit

Body:
I have an SVN subtree that has been working fine for 2+ years. I now encountered that I cannot commit some files.

I did a fresh checkout and ensured no other program accesses the folder.

When I do:

svn ci -m"fix filter" symfony/lib/filter/doctrine/MembershipForm.class.php
svn: E200009: Commit failed (details follow):
svn: E200009:     '/home/jochen/projects/nzgbctest/symfony/lib/filter/doctrine/MembershipForm.class.php' is not under version control

Any ideas how to fix this?

svn status symfony/lib/filter/doctrine/MembershipForm.class.php

shows nothing

svn add symfony/lib/filter/doctrine/MembershipForm.class.php

or

svn add --force symfony/lib/filter/doctrine/MembershipForm.class.php

show

svn: warning: W155010: '/home/jochen/projects/nzgbc/symfony/lib/filter/doctrine/MembershipForm.class.php' not found
svn: E200009: Could not add all targets because some targets don't exist
svn: E200009: Illegal target for the requested operation

strangely:

ls -la symfony/lib/filter/doctrine/MembershipForm.class.php

and

cd symfony/lib/filter/doctrine/
ls -la MembershipForm.class.php

show

ls: cannot access MembershipForm.class.php: No such file or directory

but

cd symfony/lib/filter/doctrine/
ls -la

contains

-rwxrwxrwx 1 jochen jochen 7671 Jun 28 13:08 MembershipFormFilter.class.php

Is my disk broken? My IDE finds the file and I can edit it, but

nano symfony/lib/filter/doctrine/MembershipForm.class.php

shows an empty file!

apache can read the file as well, as changes have an effect.

The same repository is also checked out on the live site and works fine there.


问:
Google Maps Api v3 - several Marker hovers with Javascript
I want to set different hovers for different marker icons i use on my map.

This is my marker icon array

```<code>//Marker Icons
    var markerIcon = {
        unvisitedMarker: {
            url: 'img/marker.png',
            size: new google.maps.Size(30, 30),
            origin: new google.maps.Point(0, 0),
            anchor: new google.maps.Point(15, 15)
        },
        unvisitedMarkerHover: {
            url: 'img/marker.png',
            size: new google.maps.Size(30, 30),
            origin: new google.maps.Point(30, 0),
            anchor: new google.maps.Point(15, 15)
        },
        activeMarker: {
            url: 'img/marker.png',
            size: new google.maps.Size(30, 30),
            origin: new google.maps.Point(60, 0),
            anchor: new google.maps.Point(15, 15)
        },
        visitedMarker: {
            url: 'img/marker.png',
            size: new google.maps.Size(30, 30),
            origin: new google.maps.Point(90, 0),
            anchor: new google.maps.Point(15, 15)
        },
        visitedMarkerHover: {
            url: 'img/marker.png',
            size: new google.maps.Size(30, 30),
            origin: new google.maps.Point(120, 0),
            anchor: new google.maps.Point(15, 15)
        }
</code>```

I got all icons in one sprite.
I want to set the hover effect for the 'unvisitedMarker' with 'unvisitedMarkerHover' and for 'visitedMarker with 'visitedMarkerHover'. If the marker has the 'activeMarker' icon it should not get a hover effect.

My Problem with this is - i don't know how to set the "if" requirement for that.

```<code>//marker hover effect
        marker.addListener('mouseover', function() {
            if (???) { ... }
        });

        marker.addListener('mouseout', function() {
            if (???) { ... }
        });
</code>```

After that i know i can set the icon with:

```<code>marker.setIcon(markerIcon['unvisitedMarker']);
</code>```

So if someone could help me with the if requirement - that would be awesome!

答:
This one is not that simple. Since I don't have the details such as the URL to your images, I created a sample application in which we have at least 90% similarity. Important: Please don't use the images I've used to avoid copyright issues.

First, I've created public variables: map, markers. "markers" is an empty array.

```<code>var map;
var markers = [];
</code>```

I've also created my own version of markerIcon object.

```<code>var markerIcon = {
    url : 'http://oi68.tinypic.com/30idv0z.jpg',
    unvisitedMarkerHover: 'http://oi65.tinypic.com/jgo3r8.jpg',
    originlUrl: 'http://oi68.tinypic.com/30idv0z.jpg',
    visitedMarkerHover: 'http://oi65.tinypic.com/ejbn88.jpg',
    status: {
      unvisitedMarker : {
        statusName: 'unvisitedMarker',
      },
      activeMarker : {
        statusName: 'activeMarker',
      },
      visitedMarker : {
        statusName: 'visitedMarker',
      }
    }
};
</code>```

I've used a coordinate in San Francisco for my map's center and for Google Maps Javascript API Places Library. I've used Nearby Search as a Place Search and used San Francisco's coordinate for the location property. The radius is set to 500 (measured in meters). This is essential as a combination of the location property - specifying the center of the circle as a LatLng object. For the types, i restricted it only to stores. To learn more about supported types, please check list of supported types.

```<code>var service = new google.maps.places.PlacesService(map);
service.nearbySearch({
    location: myLatLng,
    radius: '500',
    type: ['store']
}, callback);
</code>```

In Nearby Search callback, it returns an array of results. This is what I did:

```<code>function createMarker(place, markerId) {
 var placeLoc = place.geometry.location;
 var marker = new google.maps.Marker({
     id: markerId,
     map: map,
     position: placeLoc,
     title: 'Hello World!',
     anchor: new google.maps.Point(15, 15),
     icon: {
       url : markerIcon.url,
     },
     currentStatus: '',
     status: markerIcon.status.unvisitedMarker.statusName,
     size: new google.maps.Size(30,30),
  });
  markers.push(marker);
}

function callback(results, status) {
  if (status === google.maps.places.PlacesServiceStatus.OK) {
    for (var i = 0; i < results.length; i++) {
        createMarker(results[i],i);
    }
  }
}
</code>```

I created a createMarker() function that accepts two arguments: the
place object, and markerId.

What the function does is it creates a new Google Maps Javascript
API
Marker
and then set the property and its values accordingly. And also, after
creating the new "marker" object, it will be pushed in to
markers array.

You will also notice that I've added custom properties:
currentStatus, and status. This will play a very important role in
our mouse events.

Since the callback results is an array, I iterate through each array
and called createMarker() function.

This is where the fun begins, in createMarker(), I've also added lines for  Google Maps Javascript API Events. This is what I did on my end. Whenever there's a mouseover on a marker, it checks first the currentStatus property of the mouseovered marker. If the currentStatus is an empty string '', it will do another checking for the status property. If the status is 'unvisited', the current icon will now change to a new one. When a mouseout has been detected, the new icon will change to the original one.

Meanwhile, when a marker is clicked, the currentStatus property will be updated to "activeMarker" and then the "status" property is changed to "visitedMarker" as well. You will notice that if the marker has an "activeMarker" currentStatus, nothing will happen when there's a mouseover.

In order to remove the "activeMarker" currentStatus, you will have to click another marker. The "activeMarker" now is transferred to this "another marker". You will also notice that there's a new mouseover effect on the previous marker because I've set a new icon if the marker's status is "unvisitedMarker". You can all find all icon URLs in the markerIcon object.

```<code>  google.maps.event.addListener(marker, 'mouseover', function() {
     if ( this.currentStatus !== markerIcon.status.activeMarker.statusName ) {
       if ( this.status === markerIcon.status.unvisitedMarker.statusName ) {
         this.setIcon(markerIcon.unvisitedMarkerHover);
       } else {
         this.setIcon(markerIcon.visitedMarkerHover);
       }
      this.setPosition(this.position);
      console.log(this.currentStatus, this.status, this.id);
     }
  });
  google.maps.event.addListener(marker, 'mouseout', function() {
      this.setIcon(markerIcon.originlUrl);
  });
  google.maps.event.addListener(marker, 'click', function() {
     for ( var i = 0; i < markers.length; i++ ) {
       markers[i].currentStatus = '';
     }
     this.currentStatus = markerIcon.status.activeMarker.statusName;
     this.status = markerIcon.status.visitedMarker.statusName;
     console.log(this.currentStatus, this.status);
  });
</code>```

Whole code below:

var map;
var markers = [];
var markerIcon = {
    url : 'http://oi68.tinypic.com/30idv0z.jpg',
    unvisitedMarkerHover: 'http://oi65.tinypic.com/jgo3r8.jpg',
    originlUrl: 'http://oi68.tinypic.com/30idv0z.jpg',
    visitedMarkerHover: 'http://oi65.tinypic.com/ejbn88.jpg',
    status: {
      unvisitedMarker : {
        //origin: new google.maps.Point(0, 0),
        statusName: 'unvisitedMarker',
      },
      activeMarker : {
        //origin: new google.maps.Point(60, 0),
        statusName: 'activeMarker',
      },
      visitedMarker : {
        //origin: new google.maps.Point(90, 0),
        statusName: 'visitedMarker',
      },
    }
};

function initMap() {

  var myLatLng = {lat: 37.773972, lng: -122.431297};

  map = new google.maps.Map(document.getElementById('map'), {
    zoom: 16,
    center: myLatLng
  });

  var service = new google.maps.places.PlacesService(map);
  service.nearbySearch({
    location: myLatLng,
    radius: '500',
    type: ['store']
  }, callback);

}

function createMarker(place, markerId) {
  var placeLoc = place.geometry.location;
  var marker = new google.maps.Marker({
        id: markerId,
        map: map,
        position: placeLoc,
        title: 'Hello World!',
        anchor: new google.maps.Point(15, 15),
        icon: {
          url : markerIcon.url,
        },
        currentStatus: '',
        status: markerIcon.status.unvisitedMarker.statusName,
        size: new google.maps.Size(30,30),
  });

  markers.push(marker);

  google.maps.event.addListener(marker, 'mouseover', function() {
     if ( this.currentStatus !== markerIcon.status.activeMarker.statusName ) {
       if ( this.status === markerIcon.status.unvisitedMarker.statusName ) {
         this.setIcon(markerIcon.unvisitedMarkerHover);
       } else {
         this.setIcon(markerIcon.visitedMarkerHover);
       }
      this.setPosition(this.position);
      //console.log(this.currentStatus, this.status, this.id);
     }
  });
  google.maps.event.addListener(marker, 'mouseout', function() {
      this.setIcon(markerIcon.originlUrl);
  });
  google.maps.event.addListener(marker, 'click', function() {
     for ( var i = 0; i < markers.length; i++ ) {
       markers[i].currentStatus = '';
     }
     this.currentStatus = markerIcon.status.activeMarker.statusName;
     this.status = markerIcon.status.visitedMarker.statusName;
  });
}

function callback(results, status) {
  if (status === google.maps.places.PlacesServiceStatus.OK) {
    for (var i = 0; i < results.length; i++) {
        createMarker(results[i],i);
    }
  }
}```
<pre class="snippet-code-css lang-css prettyprint-override"><code>/* Always set the map height explicitly to define the size of the div
       * element that contains the map. */
      #map {
        height: 100%;
      }
      /* Optional: Makes the sample page fill the window. */
      html, body {
        height: 100%;
        margin: 0;
        padding: 0;
      }</code>```

        ```

Hope this application could help and happy coding!

Body:
I want to set different hovers for different marker icons i use on my map.

This is my marker icon array

//Marker Icons
    var markerIcon = {
        unvisitedMarker: {
            url: 'img/marker.png',
            size: new google.maps.Size(30, 30),
            origin: new google.maps.Point(0, 0),
            anchor: new google.maps.Point(15, 15)
        },
        unvisitedMarkerHover: {
            url: 'img/marker.png',
            size: new google.maps.Size(30, 30),
            origin: new google.maps.Point(30, 0),
            anchor: new google.maps.Point(15, 15)
        },
        activeMarker: {
            url: 'img/marker.png',
            size: new google.maps.Size(30, 30),
            origin: new google.maps.Point(60, 0),
            anchor: new google.maps.Point(15, 15)
        },
        visitedMarker: {
            url: 'img/marker.png',
            size: new google.maps.Size(30, 30),
            origin: new google.maps.Point(90, 0),
            anchor: new google.maps.Point(15, 15)
        },
        visitedMarkerHover: {
            url: 'img/marker.png',
            size: new google.maps.Size(30, 30),
            origin: new google.maps.Point(120, 0),
            anchor: new google.maps.Point(15, 15)
        }

I got all icons in one sprite.
I want to set the hover effect for the 'unvisitedMarker' with 'unvisitedMarkerHover' and for 'visitedMarker with 'visitedMarkerHover'. If the marker has the 'activeMarker' icon it should not get a hover effect.

My Problem with this is - i don't know how to set the "if" requirement for that.

//marker hover effect
        marker.addListener('mouseover', function() {
            if (???) { ... }
        });

        marker.addListener('mouseout', function() {
            if (???) { ... }
        });

After that i know i can set the icon with:

marker.setIcon(markerIcon['unvisitedMarker']);

So if someone could help me with the if requirement - that would be awesome!

Body:
This one is not that simple. Since I don't have the details such as the URL to your images, I created a sample application in which we have at least 90% similarity. Important: Please don't use the images I've used to avoid copyright issues.

First, I've created public variables: map, markers. "markers" is an empty array.

var map;
var markers = [];

I've also created my own version of markerIcon object.

var markerIcon = {
    url : 'http://oi68.tinypic.com/30idv0z.jpg',
    unvisitedMarkerHover: 'http://oi65.tinypic.com/jgo3r8.jpg',
    originlUrl: 'http://oi68.tinypic.com/30idv0z.jpg',
    visitedMarkerHover: 'http://oi65.tinypic.com/ejbn88.jpg',
    status: {
      unvisitedMarker : {
        statusName: 'unvisitedMarker',
      },
      activeMarker : {
        statusName: 'activeMarker',
      },
      visitedMarker : {
        statusName: 'visitedMarker',
      }
    }
};

I've used a coordinate in San Francisco for my map's center and for Google Maps Javascript API Places Library. I've used Nearby Search as a Place Search and used San Francisco's coordinate for the location property. The radius is set to 500 (measured in meters). This is essential as a combination of the location property - specifying the center of the circle as a LatLng object. For the types, i restricted it only to stores. To learn more about supported types, please check list of supported types.

var service = new google.maps.places.PlacesService(map);
service.nearbySearch({
    location: myLatLng,
    radius: '500',
    type: ['store']
}, callback);

In Nearby Search callback, it returns an array of results. This is what I did:

function createMarker(place, markerId) {
 var placeLoc = place.geometry.location;
 var marker = new google.maps.Marker({
     id: markerId,
     map: map,
     position: placeLoc,
     title: 'Hello World!',
     anchor: new google.maps.Point(15, 15),
     icon: {
       url : markerIcon.url,
     },
     currentStatus: '',
     status: markerIcon.status.unvisitedMarker.statusName,
     size: new google.maps.Size(30,30),
  });
  markers.push(marker);
}

function callback(results, status) {
  if (status === google.maps.places.PlacesServiceStatus.OK) {
    for (var i = 0; i < results.length; i++) {
        createMarker(results[i],i);
    }
  }
}

I created a createMarker() function that accepts two arguments: the
place object, and markerId.

What the function does is it creates a new Google Maps Javascript
API
Marker
and then set the property and its values accordingly. And also, after
creating the new "marker" object, it will be pushed in to
markers array.

You will also notice that I've added custom properties:
currentStatus, and status. This will play a very important role in
our mouse events.

Since the callback results is an array, I iterate through each array
and called createMarker() function.

This is where the fun begins, in createMarker(), I've also added lines for  Google Maps Javascript API Events. This is what I did on my end. Whenever there's a mouseover on a marker, it checks first the currentStatus property of the mouseovered marker. If the currentStatus is an empty string '', it will do another checking for the status property. If the status is 'unvisited', the current icon will now change to a new one. When a mouseout has been detected, the new icon will change to the original one.

Meanwhile, when a marker is clicked, the currentStatus property will be updated to "activeMarker" and then the "status" property is changed to "visitedMarker" as well. You will notice that if the marker has an "activeMarker" currentStatus, nothing will happen when there's a mouseover.

In order to remove the "activeMarker" currentStatus, you will have to click another marker. The "activeMarker" now is transferred to this "another marker". You will also notice that there's a new mouseover effect on the previous marker because I've set a new icon if the marker's status is "unvisitedMarker". You can all find all icon URLs in the markerIcon object.

  google.maps.event.addListener(marker, 'mouseover', function() {
     if ( this.currentStatus !== markerIcon.status.activeMarker.statusName ) {
       if ( this.status === markerIcon.status.unvisitedMarker.statusName ) {
         this.setIcon(markerIcon.unvisitedMarkerHover);
       } else {
         this.setIcon(markerIcon.visitedMarkerHover);
       }
      this.setPosition(this.position);
      console.log(this.currentStatus, this.status, this.id);
     }
  });
  google.maps.event.addListener(marker, 'mouseout', function() {
      this.setIcon(markerIcon.originlUrl);
  });
  google.maps.event.addListener(marker, 'click', function() {
     for ( var i = 0; i < markers.length; i++ ) {
       markers[i].currentStatus = '';
     }
     this.currentStatus = markerIcon.status.activeMarker.statusName;
     this.status = markerIcon.status.visitedMarker.statusName;
     console.log(this.currentStatus, this.status);
  });

Whole code below:

var map;
var markers = [];
var markerIcon = {
    url : 'http://oi68.tinypic.com/30idv0z.jpg',
    unvisitedMarkerHover: 'http://oi65.tinypic.com/jgo3r8.jpg',
    originlUrl: 'http://oi68.tinypic.com/30idv0z.jpg',
    visitedMarkerHover: 'http://oi65.tinypic.com/ejbn88.jpg',
    status: {
      unvisitedMarker : {
        //origin: new google.maps.Point(0, 0),
        statusName: 'unvisitedMarker',
      },
      activeMarker : {
        //origin: new google.maps.Point(60, 0),
        statusName: 'activeMarker',
      },
      visitedMarker : {
        //origin: new google.maps.Point(90, 0),
        statusName: 'visitedMarker',
      },
    }
};

function initMap() {

  var myLatLng = {lat: 37.773972, lng: -122.431297};

  map = new google.maps.Map(document.getElementById('map'), {
    zoom: 16,
    center: myLatLng
  });

  var service = new google.maps.places.PlacesService(map);
  service.nearbySearch({
    location: myLatLng,
    radius: '500',
    type: ['store']
  }, callback);

}

function createMarker(place, markerId) {
  var placeLoc = place.geometry.location;
  var marker = new google.maps.Marker({
        id: markerId,
        map: map,
        position: placeLoc,
        title: 'Hello World!',
        anchor: new google.maps.Point(15, 15),
        icon: {
          url : markerIcon.url,
        },
        currentStatus: '',
        status: markerIcon.status.unvisitedMarker.statusName,
        size: new google.maps.Size(30,30),
  });

  markers.push(marker);

  google.maps.event.addListener(marker, 'mouseover', function() {
     if ( this.currentStatus !== markerIcon.status.activeMarker.statusName ) {
       if ( this.status === markerIcon.status.unvisitedMarker.statusName ) {
         this.setIcon(markerIcon.unvisitedMarkerHover);
       } else {
         this.setIcon(markerIcon.visitedMarkerHover);
       }
      this.setPosition(this.position);
      //console.log(this.currentStatus, this.status, this.id);
     }
  });
  google.maps.event.addListener(marker, 'mouseout', function() {
      this.setIcon(markerIcon.originlUrl);
  });
  google.maps.event.addListener(marker, 'click', function() {
     for ( var i = 0; i < markers.length; i++ ) {
       markers[i].currentStatus = '';
     }
     this.currentStatus = markerIcon.status.activeMarker.statusName;
     this.status = markerIcon.status.visitedMarker.statusName;
  });
}

function callback(results, status) {
  if (status === google.maps.places.PlacesServiceStatus.OK) {
    for (var i = 0; i < results.length; i++) {
        createMarker(results[i],i);
    }
  }
}

/* Always set the map height explicitly to define the size of the div
       * element that contains the map. */
      #map {
        height: 100%;
      }
      /* Optional: Makes the sample page fill the window. */
      html, body {
        height: 100%;
        margin: 0;
        padding: 0;
      }

<div id="map"></div>
        <script src="https://maps.googleapis.com/maps/api/js?libraries=places&key=AIzaSyCzjs-bUR6iIl8yGLr60p6-zbdFtRpuXTQ&callback=initMap"
    async defer></script>

Hope this application could help and happy coding!


问:
Parse XML namespace and schema in PHP
I am aware there are many similar posts, however I could not implement any of the suggestions successfully.

I have the following extract of Data - XML with two data sets available here:

```<code><?xml version="1.0" encoding="UTF-8" standalone="no" ?>
  <message:MessageGroup xmlns:message="http://www.SDMX.org/resources/SDMXML/schemas/v1_0/message" xmlns:common="http://www.SDMX.org/resources/SDMXML/schemas/v1_0/common" xmlns:frb="http://www.federalreserve.gov/structure/compact/common" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.SDMX.org/resources/SDMXML/schemas/v1_0/message SDMXMessage.xsd http://www.federalreserve.gov/structure/compact/common frb_common.xsd">

      <?frb EmbargoDate="2017-10-24T00:00:00"?>

  <frb:DataSet id="Yields" xmlns:kf="http://www.federalreserve.gov/structure/compact/Yields_Yields" xsi:schemaLocation="http://www.federalreserve.gov/structure/compact/Yields_Yields Yields_Yields.xsd">
  </frb:DataSet>

  <frb:DataSet id="Yields" xmlns:kf="http://www.federalreserve.gov/structure/compact/Yields_Parameters" xsi:schemaLocation="http://www.federalreserve.gov/structure/compact/Yields_Parameters Yields_Parameters.xsd">
    <kf:Series BT="Nominal" CURRENCY="NA" FREQ="9" Parameter="B0" SERIES_NAME="BETA0" UNIT="Number" UNIT_MULT="1">
      <frb:Annotations>
        <common:Annotation>
          <common:AnnotationType>Short Description</common:AnnotationType>
          <common:AnnotationText>Beta0 Coefficient for Nominal Treasury Yields as Estimated by the Svensson Term Structure Model</common:AnnotationText>
        </common:Annotation>
      </frb:Annotations>
      <frb:Obs OBS_STATUS="A" OBS_VALUE="3.91760612" TIME_PERIOD="1961-06-14"/>
      <frb:Obs OBS_STATUS="A" OBS_VALUE="3.97849787" TIME_PERIOD="1961-06-15"/>
      <frb:Obs OBS_STATUS="A" OBS_VALUE="3.98435045" TIME_PERIOD="1961-06-16"/>
      <frb:Obs OBS_STATUS="A" OBS_VALUE="4.00437935" TIME_PERIOD="1961-06-19"/>
      <frb:Obs OBS_STATUS="A" OBS_VALUE="3.98578922" TIME_PERIOD="1961-06-20"/>
      <frb:Obs OBS_STATUS="A" OBS_VALUE="4.00405894" TIME_PERIOD="1961-06-21"/>
      <frb:Obs OBS_STATUS="A" OBS_VALUE="4.00089634" TIME_PERIOD="1961-06-22"/>
    </kf:Series>
  </frb:DataSet>
</message:MessageGroup>
</code>```

YieldsParameters.xsd file extract:

```<code>xmlns:frb="http://www.federalreserve.gov/structure/compact/common">
<xs:import namespace="http://www.federalreserve.gov/structure/compact/common" schemaLocation="frb_common.xsd"/>
</code>```

I am interested in retrieving the OBS_VALUE and TIME_PERIOD attributes from the 2nd data set. I would also like to count the observations within series.

Using the following suggestion my sample code looks like this:

```<code>$myFileXml = 'feds200628.xml';
$xml = simplexml_load_file($myFileXml);

$xml->DataSet[1]->Series[0] as $Ser
$ns_dc = $Ser ->children('http://www.federalreserve.gov/structure/compact/common');
echo $ns_dc->Obs[0]->->Attributes()->OBS_VALUE;

echo $count = count($xml->children('http://www.federalreserve.gov/structure/compact/common',true)->DataSet[1]->Series[0]->Obs);
</code>```

Considering I do not retrieve the observation value and the count returns 0, I believe I am missing something very basic here. I also find it weird that

```<code>print_r($xml);
</code>```

returns:

SimpleXMLElement Object ( [frb] => SimpleXMLElement Object ( )
[comment] => SimpleXMLElement Object ( ) )

答:
There are quite a few problems with the method your trying, this method uses XPath to find the data your after and this removes a lot of the need to move around the DOM to find data.  The main thing with XPath though is to register the namespaces to allow you to use them in the query...

```<code>$myFileXml = 'feds200628.xml';
$xml = simplexml_load_file($myFileXml);
$xml->registerXPathNamespace('frb', 'http://www.federalreserve.gov/structure/compact/common');
$xml->registerXPathNamespace('kf', "http://www.federalreserve.gov/structure/compact/Yields_Parameters");
$ns_dc = $xml->xpath("//frb:DataSet[2]/kf:Series[1]/frb:Obs");
echo $ns_dc[0]->Attributes()->OBS_VALUE.PHP_EOL;
$count = count($ns_dc);
echo $count.PHP_EOL;
</code>```

The XPath returns just the Obs elements (Note that XPath arrays are 1 based whereas PHP arrays are 0 based - which is why I use 2 to fetch the second element).

Title: Parse XML namespace and schema in PHP

Body:
I am aware there are many similar posts, however I could not implement any of the suggestions successfully.

I have the following extract of Data - XML with two data sets available here:

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
  <message:MessageGroup xmlns:message="http://www.SDMX.org/resources/SDMXML/schemas/v1_0/message" xmlns:common="http://www.SDMX.org/resources/SDMXML/schemas/v1_0/common" xmlns:frb="http://www.federalreserve.gov/structure/compact/common" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.SDMX.org/resources/SDMXML/schemas/v1_0/message SDMXMessage.xsd http://www.federalreserve.gov/structure/compact/common frb_common.xsd">

      <?frb EmbargoDate="2017-10-24T00:00:00"?>

  <frb:DataSet id="Yields" xmlns:kf="http://www.federalreserve.gov/structure/compact/Yields_Yields" xsi:schemaLocation="http://www.federalreserve.gov/structure/compact/Yields_Yields Yields_Yields.xsd">
  </frb:DataSet>

  <frb:DataSet id="Yields" xmlns:kf="http://www.federalreserve.gov/structure/compact/Yields_Parameters" xsi:schemaLocation="http://www.federalreserve.gov/structure/compact/Yields_Parameters Yields_Parameters.xsd">
    <kf:Series BT="Nominal" CURRENCY="NA" FREQ="9" Parameter="B0" SERIES_NAME="BETA0" UNIT="Number" UNIT_MULT="1">
      <frb:Annotations>
        <common:Annotation>
          <common:AnnotationType>Short Description</common:AnnotationType>
          <common:AnnotationText>Beta0 Coefficient for Nominal Treasury Yields as Estimated by the Svensson Term Structure Model</common:AnnotationText>
        </common:Annotation>
      </frb:Annotations>
      <frb:Obs OBS_STATUS="A" OBS_VALUE="3.91760612" TIME_PERIOD="1961-06-14"/>
      <frb:Obs OBS_STATUS="A" OBS_VALUE="3.97849787" TIME_PERIOD="1961-06-15"/>
      <frb:Obs OBS_STATUS="A" OBS_VALUE="3.98435045" TIME_PERIOD="1961-06-16"/>
      <frb:Obs OBS_STATUS="A" OBS_VALUE="4.00437935" TIME_PERIOD="1961-06-19"/>
      <frb:Obs OBS_STATUS="A" OBS_VALUE="3.98578922" TIME_PERIOD="1961-06-20"/>
      <frb:Obs OBS_STATUS="A" OBS_VALUE="4.00405894" TIME_PERIOD="1961-06-21"/>
      <frb:Obs OBS_STATUS="A" OBS_VALUE="4.00089634" TIME_PERIOD="1961-06-22"/>
    </kf:Series>
  </frb:DataSet>
</message:MessageGroup>

YieldsParameters.xsd file extract:

xmlns:frb="http://www.federalreserve.gov/structure/compact/common">
<xs:import namespace="http://www.federalreserve.gov/structure/compact/common" schemaLocation="frb_common.xsd"/>

I am interested in retrieving the OBS_VALUE and TIME_PERIOD attributes from the 2nd data set. I would also like to count the observations within series.

Using the following suggestion my sample code looks like this:

$myFileXml = 'feds200628.xml';
$xml = simplexml_load_file($myFileXml);

$xml->DataSet[1]->Series[0] as $Ser
$ns_dc = $Ser ->children('http://www.federalreserve.gov/structure/compact/common');
echo $ns_dc->Obs[0]->->Attributes()->OBS_VALUE;

echo $count = count($xml->children('http://www.federalreserve.gov/structure/compact/common',true)->DataSet[1]->Series[0]->Obs);

Considering I do not retrieve the observation value and the count returns 0, I believe I am missing something very basic here. I also find it weird that

print_r($xml);

returns:

SimpleXMLElement Object ( [frb] => SimpleXMLElement Object ( )
[comment] => SimpleXMLElement Object ( ) )

Body:
There are quite a few problems with the method your trying, this method uses XPath to find the data your after and this removes a lot of the need to move around the DOM to find data.  The main thing with XPath though is to register the namespaces to allow you to use them in the query...

$myFileXml = 'feds200628.xml';
$xml = simplexml_load_file($myFileXml);
$xml->registerXPathNamespace('frb', 'http://www.federalreserve.gov/structure/compact/common');
$xml->registerXPathNamespace('kf', "http://www.federalreserve.gov/structure/compact/Yields_Parameters");
$ns_dc = $xml->xpath("//frb:DataSet[2]/kf:Series[1]/frb:Obs");
echo $ns_dc[0]->Attributes()->OBS_VALUE.PHP_EOL;
$count = count($ns_dc);
echo $count.PHP_EOL;

The XPath returns just the Obs elements (Note that XPath arrays are 1 based whereas PHP arrays are 0 based - which is why I use 2 to fetch the second element).