-
1. Re: JBAS018040: Failed to start context
jaysensharma Mar 2, 2016 5:20 AM (in response to akki07)1. Can you please post the Error that is mentioned in the server.log , from the point where the application deployment started and ended with the above mentioned error. If there is any stackTrace mentioned in the log then that will be more useful. Is there any Prior Error/Warning mentioned in the log?
2. Also let us know how are you trying to deploy the application using "deployments" directory based deployment or using some management utility like console/jboss-cli.sh ?
Regards
Jay SenSharma
-
2. Re: JBAS018040: Failed to start context
akki07 Mar 2, 2016 5:59 AM (in response to jaysensharma)I am trying to deploy the WAR file using the Jboss EAP platform console. I tried starting the standalone server and hit the http://localhost:9990. So, it opens up the EAP console and from the deployment tab i tried deploying the WAR file.
The error from the server.log :15:06:43,747 INFO [org.jboss.as.repository] (HttpManagementService-threads - 15) JBAS014901: Content removed from location D:\EAP 6.4.0\standalone\data\content\25\dea1a8e560b843b64a754d14a61bea7e0fe0ca\content
15:07:55,985 INFO [org.jboss.as.repository] (HttpManagementService-threads - 15) JBAS014900: Content added at location D:\EAP 6.4.0\standalone\data\content\32\fc6945b005e52d81c1dfc057c836f6eb2f605d\content
15:08:09,641 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015876: Starting deployment of "spring_1-1.0.0-SNAPSHOT.war" (runtime-name: "spring_1-1.0.0-SNAPSHOT.war")
15:08:10,921 INFO [org.jboss.web] (ServerService Thread Pool -- 89) JBAS018210: Register web context: /spring_1-1.0.0-SNAPSHOT
15:08:11,220 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/spring_1-1.0.0-SNAPSHOT]] (ServerService Thread Pool -- 89) Initializing Spring root WebApplicationContext
15:08:11,891 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/spring_1-1.0.0-SNAPSHOT]] (ServerService Thread Pool -- 89) JBWEB000287: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener: org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:341) [spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302) [spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143) [spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178) [spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149) [spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124) [spring-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:93) [spring-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130) [spring-context-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:467) [spring-context-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:397) [spring-context-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276) [spring-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197) [spring-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47) [spring-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3339) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3780) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:163) [jboss-as-web-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:61) [jboss-as-web-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:96) [jboss-as-web-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [rt.jar:1.8.0_11]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_11]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_11]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_11]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_11]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
at org.springframework.web.context.support.ServletContextResource.getInputStream(ServletContextResource.java:117) [spring-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:328) [spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
... 23 more
15:08:12,405 ERROR [org.apache.catalina.core] (ServerService Thread Pool -- 89) JBWEB001103: Error detected during context /spring_1-1.0.0-SNAPSHOT start, will stop it
15:08:12,421 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/spring_1-1.0.0-SNAPSHOT]] (ServerService Thread Pool -- 89) Closing Spring root WebApplicationContext
15:08:12,437 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 89) MSC000001: Failed to start service jboss.web.deployment.default-host."/spring_1-1.0.0-SNAPSHOT": org.jboss.msc.service.StartException in service jboss.web.deployment.default-host."/spring_1-1.0.0-SNAPSHOT": org.jboss.msc.service.StartException in anonymous service: JBAS018040: Failed to start context
at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:99)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [rt.jar:1.8.0_11]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_11]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_11]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_11]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_11]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: org.jboss.msc.service.StartException in anonymous service: JBAS018040: Failed to start context
at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:168)
at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:61)
at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:96)
... 6 more
15:08:12,499 ERROR [org.jboss.as.controller.management-operation] (HttpManagementService-threads - 15) JBAS014612: Operation ("deploy") failed - address: ([("deployment" => "spring_1-1.0.0-SNAPSHOT.war")]) - failure description: {"JBAS014671: Failed services" => {"jboss.web.deployment.default-host.\"/spring_1-1.0.0-SNAPSHOT\"" => "org.jboss.msc.service.StartException in service jboss.web.deployment.default-host.\"/spring_1-1.0.0-SNAPSHOT\": org.jboss.msc.service.StartException in anonymous service: JBAS018040: Failed to start context
Caused by: org.jboss.msc.service.StartException in anonymous service: JBAS018040: Failed to start context"}}
15:08:12,499 ERROR [org.jboss.as.server] (HttpManagementService-threads - 15) JBAS015870: Deploy of deployment "spring_1-1.0.0-SNAPSHOT.war" was rolled back with the following failure message:
{"JBAS014671: Failed services" => {"jboss.web.deployment.default-host.\"/spring_1-1.0.0-SNAPSHOT\"" => "org.jboss.msc.service.StartException in service jboss.web.deployment.default-host.\"/spring_1-1.0.0-SNAPSHOT\": org.jboss.msc.service.StartException in anonymous service: JBAS018040: Failed to start context
Caused by: org.jboss.msc.service.StartException in anonymous service: JBAS018040: Failed to start context"}}
15:08:12,546 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015877: Stopped deployment spring_1-1.0.0-SNAPSHOT.war (runtime-name: spring_1-1.0.0-SNAPSHOT.war) in 54ms
15:08:12,546 INFO [org.jboss.as.controller] (HttpManagementService-threads - 15) JBAS014774: Service status report
JBAS014775: New missing/unsatisfied dependencies:
service jboss.deployment.unit."spring_1-1.0.0-SNAPSHOT.war".component."org.springframework.web.context.ContextLoaderListener".START (missing) dependents: [service jboss.deployment.unit."spring_1-1.0.0-SNAPSHOT.war".deploymentCompleteService]
JBAS014777: Services which failed to start: service jboss.web.deployment.default-host."/spring_1-1.0.0-SNAPSHOT"
-
3. Re: JBAS018040: Failed to start context
jaysensharma Mar 2, 2016 8:34 AM (in response to akki07)Are you sure that your WAR "spring_1-1.0.0-SNAPSHOT.war" contains the file "/WEB-INF/applicationContext.xml" ? The error indicates it is not.
Caused by: java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
The above error indicates that the spring configuration file was not found (default to /WEB-INF/applicationContext.xml)
If you have the Spring configuration file defined with some other name then you can define it in the web.xml as following:
<context-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/YOURapplicationContext.xml</param-value> </context-param>
Info Needed
##########
1. Still if you face the same issue then please let us know if you are packaging the Spring JARs as a JBoss module or is it present inside the "WEB-INF/lib".
2. Also please post the web.xml snippet.
3. And let us know where is the Spring Configuration file placed inside your application?
Regards
Jay SenSharma
-
4. Re: JBAS018040: Failed to start context
akki07 Mar 3, 2016 12:43 AM (in response to jaysensharma)I will attach the expanded project explorer view screenshot. You can have a proper look at the project structure.
web.xml snippet :
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5">
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
</web-app>
PFA the 2 screenshots.
Regards,
AKSHAY KUMAR MISHRA
-
5. Re: JBAS018040: Failed to start context
jaysensharma Mar 3, 2016 1:40 AM (in response to akki07)In your web.xml try adding the following entry :
<!-- location of spring XML Or camel Spring XML files --> <context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:META-INF/spring/*.xml</param-value> </context-param>
Regards
Jay SenSharma
-
6. Re: JBAS018040: Failed to start context
akki07 Mar 3, 2016 2:01 AM (in response to jaysensharma)Did not work. The error from the server.log file :-
12:25:40,659 ERROR [org.jboss.as.controller.management-operation] (HttpManagementService-threads - 4) JBAS014612: Operation ("deploy") failed - address: ([("deployment" => "spring_1-1.0.0-SNAPSHOT.war")]) - failure description: {"JBAS014671: Failed services" => {"jboss.web.deployment.default-host.\"/spring_1-1.0.0-SNAPSHOT\"" => "org.jboss.msc.service.StartException in service jboss.web.deployment.default-host.\"/spring_1-1.0.0-SNAPSHOT\": org.jboss.msc.service.StartException in anonymous service: JBAS018040: Failed to start context
Caused by: org.jboss.msc.service.StartException in anonymous service: JBAS018040: Failed to start context"}}
12:25:40,659 ERROR [org.jboss.as.server] (HttpManagementService-threads - 4) JBAS015870: Deploy of deployment "spring_1-1.0.0-SNAPSHOT.war" was rolled back with the following failure message:
{"JBAS014671: Failed services" => {"jboss.web.deployment.default-host.\"/spring_1-1.0.0-SNAPSHOT\"" => "org.jboss.msc.service.StartException in service jboss.web.deployment.default-host.\"/spring_1-1.0.0-SNAPSHOT\": org.jboss.msc.service.StartException in anonymous service: JBAS018040: Failed to start context
Caused by: org.jboss.msc.service.StartException in anonymous service: JBAS018040: Failed to start context"}}
12:25:40,706 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015877: Stopped deployment spring_1-1.0.0-SNAPSHOT.war (runtime-name: spring_1-1.0.0-SNAPSHOT.war) in 42ms
12:25:40,706 INFO [org.jboss.as.controller] (HttpManagementService-threads - 4) JBAS014774: Service status report
JBAS014775: New missing/unsatisfied dependencies:
service jboss.deployment.unit."spring_1-1.0.0-SNAPSHOT.war".component."com.sun.faces.config.ConfigureListener".START (missing) dependents: [service jboss.deployment.unit."spring_1-1.0.0-SNAPSHOT.war".deploymentCompleteService]
service jboss.deployment.unit."spring_1-1.0.0-SNAPSHOT.war".component."javax.faces.webapp.FacetTag".START (missing) dependents: [service jboss.deployment.unit."spring_1-1.0.0-SNAPSHOT.war".deploymentCompleteService]
service jboss.deployment.unit."spring_1-1.0.0-SNAPSHOT.war".component."javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV".START (missing) dependents: [service jboss.deployment.unit."spring_1-1.0.0-SNAPSHOT.war".deploymentCompleteService]
service jboss.deployment.unit."spring_1-1.0.0-SNAPSHOT.war".component."javax.servlet.jsp.jstl.tlv.ScriptFreeTLV".START (missing) dependents: [service jboss.deployment.unit."spring_1-1.0.0-SNAPSHOT.war".deploymentCompleteService]
service jboss.deployment.unit."spring_1-1.0.0-SNAPSHOT.war".component."org.apache.catalina.servlets.DefaultServlet".START (missing) dependents: [service jboss.deployment.unit."spring_1-1.0.0-SNAPSHOT.war".deploymentCompleteService]
service jboss.deployment.unit."spring_1-1.0.0-SNAPSHOT.war".component."org.apache.jasper.servlet.JspServlet".START (missing) dependents: [service jboss.deployment.unit."spring_1-1.0.0-SNAPSHOT.war".deploymentCompleteService]
service jboss.deployment.unit."spring_1-1.0.0-SNAPSHOT.war".component."org.springframework.web.context.ContextLoaderListener".START (missing) dependents: [service jboss.deployment.unit."spring_1-1.0.0-SNAPSHOT.war".deploymentCompleteService]
service jboss.web.deployment.default-host."/spring_1-1.0.0-SNAPSHOT" (missing) dependents: [service jboss.deployment.unit."spring_1-1.0.0-SNAPSHOT.war".deploymentCompleteService]
service jboss.web.deployment.default-host."/spring_1-1.0.0-SNAPSHOT".realm (missing) dependents: [service jboss.deployment.unit."spring_1-1.0.0-SNAPSHOT.war".deploymentCompleteService]
JBAS014777: Services which failed to start: service jboss.web.deployment.default-host."/spring_1-1.0.0-SNAPSHOT"
Regards,
AKSHAY KUMAR MISHRA
-
7. Re: JBAS018040: Failed to start context
jaysensharma Mar 3, 2016 2:19 AM (in response to akki07)Hello,
I can consider it as a progress....
Please confirm if you still see the "FileNotFoundException" Exception in your logs?
I do not see any such error which you were getting earlier "Caused by: java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/applicationContext.xml]"? Do you still see it ?
Please post the fresh logs here as mentioned below for further investigation :
1). Remove the deployment "spring_1-1.0.0-SNAPSHOT.war"
2). Stop EAP6 and then freshly start it.
3). After the EAP6 is started successfully. Tail the server.log. So that we can see the new log as soon as we try deploying the app.
4). Deploy the "spring_1-1.0.0-SNAPSHOT.war" to it.
5). Post the Log here exactly from where the deployment activities logged to the server.log.
Regards
Jay SenSharma
-
8. Re: JBAS018040: Failed to start context
akki07 Mar 3, 2016 3:18 AM (in response to jaysensharma)Hello,
I did it as per the steps mentioned by you.
and i did not find any FileNotFoundException error.
The Server Log details are here right after the deployment failed.13:41:22,405 INFO [org.jboss.as.repository] (HttpManagementService-threads - 3) JBAS014900: Content added at location D:\EAP 6.4.0\standalone\data\content\de\d11d5e2baabecd98b5676ed027a5669c131bfc\content
13:41:22,479 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015876: Starting deployment of "spring_1-1.0.0-SNAPSHOT.war" (runtime-name: "spring_1-1.0.0-SNAPSHOT.war")
13:41:23,812 INFO [org.jboss.web] (ServerService Thread Pool -- 56) JBAS018210: Register web context: /spring_1-1.0.0-SNAPSHOT
13:41:23,921 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/spring_1-1.0.0-SNAPSHOT]] (ServerService Thread Pool -- 56) Initializing Spring root WebApplicationContext
13:41:25,669 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/spring_1-1.0.0-SNAPSHOT]] (ServerService Thread Pool -- 56) JBWEB000287: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 12 in XML document from "/D:/EAP 6.4.0/bin/content/spring_1-1.0.0-SNAPSHOT.war/WEB-INF/classes/META-INF/spring/camel-context.xml" is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 12; columnNumber: 136; cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'camelContext'.
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396) [spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334) [spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302) [spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143) [spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178) [spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149) [spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124) [spring-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:93) [spring-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130) [spring-context-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:467) [spring-context-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:397) [spring-context-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276) [spring-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197) [spring-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47) [spring-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3339) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3780) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:163) [jboss-as-web-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:61) [jboss-as-web-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:96) [jboss-as-web-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [rt.jar:1.8.0_11]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_11]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_11]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_11]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_11]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: org.xml.sax.SAXParseException; lineNumber: 12; columnNumber: 136; cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'camelContext'.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:196)
at org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:132)
at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:390)
at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:322)
at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:281)
at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:446)
at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3271)
at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1993)
at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:724)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:283)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1653)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:324)
at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:845)
at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:768)
at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:108)
at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:230)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:285)
at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75) [spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388) [spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
... 24 more
13:41:25,840 ERROR [org.apache.catalina.core] (ServerService Thread Pool -- 56) JBWEB001103: Error detected during context /spring_1-1.0.0-SNAPSHOT start, will stop it
13:41:25,871 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/spring_1-1.0.0-SNAPSHOT]] (ServerService Thread Pool -- 56) Closing Spring root WebApplicationContext
13:41:25,871 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 56) MSC000001: Failed to start service jboss.web.deployment.default-host."/spring_1-1.0.0-SNAPSHOT": org.jboss.msc.service.StartException in service jboss.web.deployment.default-host."/spring_1-1.0.0-SNAPSHOT": org.jboss.msc.service.StartException in anonymous service: JBAS018040: Failed to start context
at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:99)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [rt.jar:1.8.0_11]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_11]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_11]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_11]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_11]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: org.jboss.msc.service.StartException in anonymous service: JBAS018040: Failed to start context
at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:168)
at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:61)
at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:96)
... 6 more
13:41:25,903 ERROR [org.jboss.as.controller.management-operation] (HttpManagementService-threads - 3) JBAS014612: Operation ("add") failed - address: ([{"deployment" => "spring_1-1.0.0-SNAPSHOT.war"}]) - failure description: {"JBAS014671: Failed services" => {"jboss.web.deployment.default-host.\"/spring_1-1.0.0-SNAPSHOT\"" => "org.jboss.msc.service.StartException in service jboss.web.deployment.default-host.\"/spring_1-1.0.0-SNAPSHOT\": org.jboss.msc.service.StartException in anonymous service: JBAS018040: Failed to start context
Caused by: org.jboss.msc.service.StartException in anonymous service: JBAS018040: Failed to start context"}}
13:41:25,903 ERROR [org.jboss.as.server] (HttpManagementService-threads - 3) JBAS015870: Deploy of deployment "spring_1-1.0.0-SNAPSHOT.war" was rolled back with the following failure message:
{"JBAS014671: Failed services" => {"jboss.web.deployment.default-host.\"/spring_1-1.0.0-SNAPSHOT\"" => "org.jboss.msc.service.StartException in service jboss.web.deployment.default-host.\"/spring_1-1.0.0-SNAPSHOT\": org.jboss.msc.service.StartException in anonymous service: JBAS018040: Failed to start context
Caused by: org.jboss.msc.service.StartException in anonymous service: JBAS018040: Failed to start context"}}
13:41:25,949 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment spring_1-1.0.0-SNAPSHOT.war (runtime-name: spring_1-1.0.0-SNAPSHOT.war) in 41ms
13:41:25,949 INFO [org.jboss.as.controller] (HttpManagementService-threads - 3) JBAS014774: Service status report
JBAS014775: New missing/unsatisfied dependencies:
service jboss.deployment.unit."spring_1-1.0.0-SNAPSHOT.war".component."com.sun.faces.config.ConfigureListener".START (missing) dependents: [service jboss.deployment.unit."spring_1-1.0.0-SNAPSHOT.war".deploymentCompleteService]
service jboss.deployment.unit."spring_1-1.0.0-SNAPSHOT.war".component."javax.faces.webapp.FacetTag".START (missing) dependents: [service jboss.deployment.unit."spring_1-1.0.0-SNAPSHOT.war".deploymentCompleteService]
service jboss.deployment.unit."spring_1-1.0.0-SNAPSHOT.war".component."javax.servlet.jsp.jstl.tlv.ScriptFreeTLV".START (missing) dependents: [service jboss.deployment.unit."spring_1-1.0.0-SNAPSHOT.war".deploymentCompleteService]
service jboss.deployment.unit."spring_1-1.0.0-SNAPSHOT.war".component."org.apache.catalina.servlets.DefaultServlet".START (missing) dependents: [service jboss.deployment.unit."spring_1-1.0.0-SNAPSHOT.war".deploymentCompleteService]
service jboss.deployment.unit."spring_1-1.0.0-SNAPSHOT.war".component."org.apache.jasper.servlet.JspServlet".START (missing) dependents: [service jboss.deployment.unit."spring_1-1.0.0-SNAPSHOT.war".deploymentCompleteService]
service jboss.deployment.unit."spring_1-1.0.0-SNAPSHOT.war".component."org.springframework.web.context.ContextLoaderListener".START (missing) dependents: [service jboss.deployment.unit."spring_1-1.0.0-SNAPSHOT.war".deploymentCompleteService]
service jboss.web.deployment.default-host."/spring_1-1.0.0-SNAPSHOT" (missing) dependents: [service jboss.deployment.unit."spring_1-1.0.0-SNAPSHOT.war".deploymentCompleteService]
service jboss.web.deployment.default-host."/spring_1-1.0.0-SNAPSHOT".realm (missing) dependents: [service jboss.deployment.unit."spring_1-1.0.0-SNAPSHOT.war".deploymentCompleteService]
JBAS014777: Services which failed to start: service jboss.web.deployment.default-host."/spring_1-1.0.0-SNAPSHOT"
-
9. Re: JBAS018040: Failed to start context
jaysensharma Mar 3, 2016 3:52 AM (in response to akki07)As i suspected that this time the cause of deployment failure might be different. (that is correct)
Cur
Caused by: org.xml.sax.SAXParseException; lineNumber: 12; columnNumber: 136; cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'camelContext'.
.
.
Line 12 in XML document from "/D:/EAP 6.4.0/bin/content/spring_1-1.0.0-SNAPSHOT.war/WEB-INF/classes/META-INF/spring/camel-context.xml" is invalid;
What can be done?
===============
The current issue is with your "camel-context.xml" file. Please attach or paste your camel-context file here.
OR
Please double check if you are using the proper namespace declaration there or not?
Example:
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camel="http://camel.apache.org/schema/spring" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> . . <camelContext xmlns="http://camel.apache.org/schema/spring"> <route> . . </route> </camelContext> . . </beans>
Regards
Jay SenSharma
-
10. Re: JBAS018040: Failed to start context
ehugonnet Mar 3, 2016 3:51 AM (in response to akki07)So it appears your spring configuration file "camel-context.xml" is invalid at lineNumber: 12; columnNumber: 136 The matching wildcard is strict, but no declaration can be found for element 'camelContext'.
-
11. Re: JBAS018040: Failed to start context
akki07 Mar 3, 2016 4:37 AM (in response to jaysensharma)<?xml version="1.0" encoding="UTF-8"?>
<!-- Configures the Camel Context-->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
<!-- here is a sample which processes the input files
(leaving them in place - see the 'noop' flag)
then performs content based routing on the message using XPath --><camelContext xmlns="http://camel.apache.org/schema/spring">
<route>
<from uri="file:D:\EAP_demo_file\input"/>
<log message="file picked" loggingLevel="INFO"/>
</route>
</camelContext>
</beans>
-
12. Re: JBAS018040: Failed to start context
ehugonnet Mar 3, 2016 4:50 AM (in response to ehugonnet)It's simple you are trying to redefine the default namespace after having set it.
-
13. Re: JBAS018040: Failed to start context
akki07 Mar 3, 2016 5:11 AM (in response to ehugonnet)What should be done then ?
-
14. Re: JBAS018040: Failed to start context
jaysensharma Mar 3, 2016 5:48 AM (in response to akki07)Do you have the camel JARs bundled with your Web App? Or the custom module and referring it from the application?
Specially the JAR "camel-spring-2.x.jar" that contains the "camel-spring.xsd" (apart from other camel jars like camel-core.jar) inside your "WEB-INF/lib"
Regards
Jay SenSharma