2 Replies Latest reply on Mar 17, 2009 10:27 AM by aa ds

# Failed deployment, several tomcat deployment and ctxPath=/we

Hello everybody!

I have a spring application that I try to deploy in JBoss 5.0.0 GA. For that I put the war file (sipre.war) under server/default/deploy directory but I do not get to finish the deployment. According to stacktrace it seems that there are several tomcat deployment and I do not understand why. Moreover, at first tomcat deployment the ctxPath is my context (ctxPath=/sipre) and vfsUrl is my war file (vfsUrl=sipre.war) but at last tomcat deployment ctxPath=/web.xml and vfsUrl=sipre/WEB-INF/web.xml and then I get: java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/applicationContext.xml]

The stacktrace is:

```10:20:41,631 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'jav
a:JmsXA'
10:20:41,693 INFO [TomcatDeployment] deploy, ctxPath=/, vfsUrl=ROOT.war
10:20:41,975 INFO [TomcatDeployment] deploy, ctxPath=/jmx-console, vfsUrl=jmx-console.war
10:20:56,819 INFO [TomcatDeployment] deploy, ctxPath=/sipre, vfsUrl=sipre.war
10:21:01,678 INFO [[/sipre]] Initializing Spring root WebApplicationContext
10:21:08,350 INFO [Version] Hibernate Annotations 3.4.0.GA
10:21:08,413 INFO [Environment] Hibernate 3.3.1.GA
10:21:08,444 INFO [Environment] Bytecode provider name : javassist
10:21:08,444 INFO [Environment] using JDK 1.4 java.sql.Timestamp handling
10:21:08,647 INFO [Version] Hibernate Commons Annotations 3.1.0.GA
10:21:08,678 INFO [Configuration] configuring from url: vfszip:/C:/Tools/jboss-5.0.0.GA/server/default/deploy/sipre.war/WEB-INF/classes/hibernate.cfg.xml

*** more mapping*****

10:21:12,366 INFO [Version] Hibernate Validator 3.1.0.GA
10:21:13,210 INFO [ConnectionProviderFactory] Initializing connection provider: org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider
10:21:13,397 INFO [STDOUT] AbandonedObjectPool is used (org.apache.commons.dbcp.AbandonedObjectPool@1d6d501)
10:21:13,397 INFO [STDOUT] LogAbandoned: false
10:21:13,397 INFO [STDOUT] RemoveAbandoned: true
10:21:13,397 INFO [STDOUT] RemoveAbandonedTimeout: 60
10:21:15,194 INFO [SettingsFactory] RDBMS: Oracle, version: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
10:21:15,194 INFO [SettingsFactory] JDBC driver: Oracle JDBC driver, version: 9.2.0.1.0
10:21:15,272 INFO [Dialect] Using dialect: org.hibernate.dialect.Oracle9Dialect
10:21:15,272 WARN [Oracle9Dialect] The Oracle9Dialect dialect has been deprecated; use either Oracle9iDialect or Oracle10gDialect instead
10:21:15,288 INFO [TransactionFactoryFactory] Using default transaction strategy (direct JDBC transactions)
10:21:15,288 INFO [TransactionManagerLookupFactory] No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional se
cond-level cache is not recommended)
10:21:15,303 INFO [SettingsFactory] Automatic flush during beforeCompletion(): disabled
10:21:15,303 INFO [SettingsFactory] Automatic session close at end of transaction: disabled
10:21:15,303 INFO [SettingsFactory] JDBC batch size: 15
10:21:15,303 INFO [SettingsFactory] JDBC batch updates for versioned data: disabled
10:21:15,303 INFO [SettingsFactory] Scrollable result sets: enabled
10:21:15,319 INFO [SettingsFactory] JDBC3 getGeneratedKeys(): disabled
10:21:15,319 INFO [SettingsFactory] Connection release mode: on_close
10:21:15,319 INFO [SettingsFactory] Default batch fetch size: 1
10:21:15,319 INFO [SettingsFactory] Generate SQL with comments: disabled
10:21:15,319 INFO [SettingsFactory] Order SQL updates by primary key: disabled
10:21:15,319 INFO [SettingsFactory] Order SQL inserts for batching: disabled
10:21:15,319 INFO [SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
10:21:15,350 INFO [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
10:21:15,350 INFO [SettingsFactory] Query language substitutions: {}
10:21:15,350 INFO [SettingsFactory] JPA-QL strict compliance: disabled
10:21:15,350 INFO [SettingsFactory] Second-level cache: enabled
10:21:15,350 INFO [SettingsFactory] Query cache: disabled
10:21:15,350 INFO [SettingsFactory] Cache region factory : org.hibernate.cache.impl.NoCachingRegionFactory
10:21:15,366 INFO [SettingsFactory] Optimize cache for minimal puts: disabled
10:21:15,366 INFO [SettingsFactory] Structured second-level cache entries: disabled
10:21:15,382 INFO [SettingsFactory] Statistics: disabled
10:21:15,382 INFO [SettingsFactory] Deleted entity synthetic identifier rollback: disabled
10:21:15,397 INFO [SettingsFactory] Default entity-mode: pojo
10:21:15,397 INFO [SettingsFactory] Named query checking : enabled
10:21:15,741 INFO [SessionFactoryImpl] building session factory
10:21:17,897 INFO [SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured
10:21:19,428 INFO [Configuration] configuring from url: vfszip:/C:/Tools/jboss-5.0.0.GA/server/default/deploy/sipre.war/WEB-INF/classes/hibernate.cfg
.xml

** more mapping **

10:21:21,444 INFO [ConnectionProviderFactory] Initializing connection provider: org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider
10:21:21,444 INFO [SettingsFactory] RDBMS: Oracle, version: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
10:21:21,444 INFO [SettingsFactory] JDBC driver: Oracle JDBC driver, version: 9.2.0.1.0
10:21:21,444 INFO [Dialect] Using dialect: org.hibernate.dialect.Oracle9Dialect
10:21:21,444 WARN [Oracle9Dialect] The Oracle9Dialect dialect has been deprecated; use either Oracle9iDialect or Oracle10gDialect instead
10:21:21,460 INFO [TransactionFactoryFactory] Using default transaction strategy (direct JDBC transactions)
10:21:21,460 INFO [TransactionManagerLookupFactory] No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional se
cond-level cache is not recommended)
10:21:21,460 INFO [SettingsFactory] Automatic flush during beforeCompletion(): disabled
10:21:21,460 INFO [SettingsFactory] Automatic session close at end of transaction: disabled
10:21:21,460 INFO [SettingsFactory] JDBC batch size: 15
10:21:21,460 INFO [SettingsFactory] JDBC batch updates for versioned data: disabled
10:21:21,460 INFO [SettingsFactory] Scrollable result sets: enabled
10:21:21,475 INFO [SettingsFactory] JDBC3 getGeneratedKeys(): disabled
10:21:21,475 INFO [SettingsFactory] Connection release mode: on_close
10:21:21,475 INFO [SettingsFactory] Default batch fetch size: 1
10:21:21,475 INFO [SettingsFactory] Generate SQL with comments: disabled
10:21:21,475 INFO [SettingsFactory] Order SQL updates by primary key: disabled
10:21:21,475 INFO [SettingsFactory] Order SQL inserts for batching: disabled
10:21:21,475 INFO [SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
10:21:21,491 INFO [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
10:21:21,491 INFO [SettingsFactory] Query language substitutions: {}
10:21:21,491 INFO [SettingsFactory] JPA-QL strict compliance: disabled
10:21:21,491 INFO [SettingsFactory] Second-level cache: enabled
10:21:21,491 INFO [SettingsFactory] Query cache: disabled
10:21:21,491 INFO [SettingsFactory] Cache region factory : org.hibernate.cache.impl.NoCachingRegionFactory
10:21:21,507 INFO [SettingsFactory] Optimize cache for minimal puts: disabled
10:21:21,507 INFO [SettingsFactory] Structured second-level cache entries: disabled
10:21:21,507 INFO [SettingsFactory] Statistics: disabled
10:21:21,507 INFO [SettingsFactory] Deleted entity synthetic identifier rollback: disabled
10:21:21,522 INFO [SettingsFactory] Default entity-mode: pojo
10:21:21,522 INFO [SettingsFactory] Named query checking : enabled
10:21:21,632 INFO [SessionFactoryImpl] building session factory
10:21:22,507 INFO [SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured
10:21:22,569 INFO [Configuration] configuring from url: vfszip:/C:/Tools/jboss-5.0.0.GA/server/default/deploy/sipre.war/WEB-INF/classes/hibernate.cfg
.xml

*** more mapping **

10:21:24,397 INFO [ConnectionProviderFactory] Initializing connection provider: org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider
10:21:24,413 INFO [SettingsFactory] RDBMS: Oracle, version: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
10:21:24,444 INFO [SettingsFactory] JDBC driver: Oracle JDBC driver, version: 9.2.0.1.0
10:21:24,444 INFO [Dialect] Using dialect: org.hibernate.dialect.Oracle9Dialect
10:21:24,444 WARN [Oracle9Dialect] The Oracle9Dialect dialect has been deprecated; use either Oracle9iDialect or Oracle10gDialect instead
10:21:24,444 INFO [TransactionFactoryFactory] Using default transaction strategy (direct JDBC transactions)
10:21:24,444 INFO [TransactionManagerLookupFactory] No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional se
cond-level cache is not recommended)
10:21:24,460 INFO [SettingsFactory] Automatic flush during beforeCompletion(): disabled
10:21:24,460 INFO [SettingsFactory] Automatic session close at end of transaction: disabled
10:21:24,460 INFO [SettingsFactory] JDBC batch size: 15
10:21:24,460 INFO [SettingsFactory] JDBC batch updates for versioned data: disabled
10:21:24,460 INFO [SettingsFactory] Scrollable result sets: enabled
10:21:24,460 INFO [SettingsFactory] JDBC3 getGeneratedKeys(): disabled
10:21:24,475 INFO [SettingsFactory] Connection release mode: on_close
10:21:24,475 INFO [SettingsFactory] Default batch fetch size: 1
10:21:24,475 INFO [SettingsFactory] Generate SQL with comments: disabled
10:21:24,475 INFO [SettingsFactory] Order SQL updates by primary key: disabled
10:21:24,475 INFO [SettingsFactory] Order SQL inserts for batching: disabled
10:21:24,475 INFO [SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
10:21:24,475 INFO [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
10:21:24,491 INFO [SettingsFactory] Query language substitutions: {}
10:21:24,491 INFO [SettingsFactory] JPA-QL strict compliance: disabled
10:21:24,491 INFO [SettingsFactory] Second-level cache: enabled
10:21:24,491 INFO [SettingsFactory] Query cache: disabled
10:21:24,491 INFO [SettingsFactory] Cache region factory : org.hibernate.cache.impl.NoCachingRegionFactory
10:21:24,491 INFO [SettingsFactory] Optimize cache for minimal puts: disabled
10:21:24,507 INFO [SettingsFactory] Structured second-level cache entries: disabled
10:21:24,507 INFO [SettingsFactory] Statistics: disabled
10:21:24,507 INFO [SettingsFactory] Deleted entity synthetic identifier rollback: disabled
10:21:24,507 INFO [SettingsFactory] Default entity-mode: pojo
10:21:24,522 INFO [SettingsFactory] Named query checking : enabled
10:21:24,585 INFO [SessionFactoryImpl] building session factory
10:21:25,632 INFO [SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured
10:21:28,476 INFO [STDOUT] INFO [main] QuartzScheduler.<init>(195) | Quartz Scheduler v.1.5.2 created.
10:21:28,476 INFO [STDOUT] INFO [main] RAMJobStore.initialize(138) | RAMJobStore initialized.
10:21:28,476 INFO [STDOUT] INFO [main] StdSchedulerFactory.instantiate(1014) | Quartz scheduler 'DefaultQuartzScheduler' initialized from default res
ource file in Quartz package: 'quartz.properties'
10:21:28,491 INFO [STDOUT] INFO [main] StdSchedulerFactory.instantiate(1018) | Quartz scheduler version: 1.5.2
10:21:28,522 INFO [STDOUT] INFO [main] QuartzScheduler.setJobFactory(1853) | JobFactory set to: org.springframework.scheduling.quartz.AdaptableJobFac
tory@1072115
10:21:28,554 INFO [STDOUT] INFO [main] QuartzScheduler.start(400) | Scheduler DefaultQuartzScheduler_\$_NON_CLUSTERED started.
10:21:34,226 INFO [TomcatDeployment] deploy, ctxPath=/web.xml, vfsUrl=sipre/WEB-INF/web.xml
10:21:34,601 WARN [config] Unable to process deployment descriptor for context '/web.xml'
10:21:38,038 INFO [xml]] Initializing Spring root WebApplicationContext
10:21:38,038 INFO [ContextLoader] Root WebApplicationContext: initialization started
10:21:38,179 INFO [XmlWebApplicationContext] Refreshing org.springframework.web.context.support.XmlWebApplicationContext@d8a434: display name [Root W
ebApplicationContext]; startup date [Tue Mar 17 10:21:38 GMT 2009]; root of context hierarchy
10:21:38,351 ERROR [ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from ServletContext resource [/WEB-INF/applicationCon
text.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123
)
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3910)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4393)
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:367)
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:146)
at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:460)
at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
at org.jboss.web.deployers.WebModule.start(WebModule.java:96)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
at \$Proxy36.start(Unknown Source)
at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
at org.jboss.system.ServiceController.start(ServiceController.java:460)
at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:146)
at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:104)
at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:45)
at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:545)
at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
at org.jboss.Main.boot(Main.java:209)
at org.jboss.Main\$1.run(Main.java:547)
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)
... 70 more
```

I hope someone can help me to understand and solve this problem. Thank you so much.

Sorry if my english is poor, I am learning.

• ###### 1. Re: Failed deployment, several tomcat deployment and ctxPath

By any chance, does the deploy folder of JBoss have a sipre directory? If yes, then remove it.

You can also post the output of the following command :

```cd C:/Tools/jboss-5.0.0.GA/server/default/deploy/
dir```

• ###### 2. Re: Failed deployment, several tomcat deployment and ctxPath

Thanks.

How you can see below there was a folder called sipre in the deploy folder.

``` Directorio de C:\Tools\jboss-5.0.0.GA\server\default\deploy

17/03/2009 14:14 <DIR> .
17/03/2009 14:14 <DIR> ..
04/12/2008 17:23 2.065 cache-invalidation-service.xml
04/12/2008 17:23 372 ejb2-container-jboss-beans.xml
04/12/2008 17:23 2.911 ejb2-timer-service.xml
04/12/2008 17:23 1.506 ejb3-connectors-jboss-beans.xml
04/12/2008 17:23 423 ejb3-container-jboss-beans.xml
04/12/2008 17:23 27.783 ejb3-interceptors-aop.xml
04/12/2008 17:23 6.302 ejb3-timer-service.xml
04/12/2008 17:23 763 hdscanner-jboss-beans.xml
04/12/2008 17:23 5.211 hsqldb-ds.xml
04/12/2008 17:23 <DIR> http-invoker.sar
04/12/2008 17:23 14.394 jboss-local-jdbc.rar
04/12/2008 17:23 14.373 jboss-xa-jdbc.rar
04/12/2008 17:23 <DIR> jbossweb.sar
04/12/2008 17:23 <DIR> jbossws.sar
04/12/2008 17:23 2.536 jca-jboss-beans.xml
04/12/2008 17:23 81.347 jms-ra.rar
04/12/2008 17:23 <DIR> jmx-console.war
04/12/2008 17:23 6.052 jmx-invoker-service.xml
04/12/2008 17:23 <DIR> jmx-remoting.sar
04/12/2008 17:23 1.583 jsr88-service.xml
04/12/2008 17:23 2.565 legacy-invokers-service.xml
04/12/2008 17:23 14.791 mail-ra.rar
04/12/2008 17:23 1.722 mail-service.xml
04/12/2008 17:23 <DIR> management
04/12/2008 17:23 <DIR> messaging
04/12/2008 17:23 5.426 monitoring-service.xml
04/12/2008 17:23 7.703 profileservice-jboss-beans.xml
04/12/2008 17:23 1.847 properties-service.xml
04/12/2008 17:23 8.415 quartz-ra.rar
04/12/2008 17:23 8.287 remoting-jboss-beans.xml
04/12/2008 17:23 <DIR> ROOT.war
04/12/2008 17:23 4.941 schedule-manager-service.xml
04/12/2008 17:23 2.889 scheduler-service.xml
04/12/2008 17:23 <DIR> security
17/03/2009 14:12 <DIR> sipre
17/03/2009 13:31 52.002.219 sipre.war
04/12/2008 17:23 198 sqlexception-service.xml
04/12/2008 17:23 3.094 transaction-jboss-beans.xml
04/12/2008 17:23 2.872 transaction-service.xml
04/12/2008 17:23 <DIR> uuid-key-generator.sar
04/12/2008 17:23 425 vfs-jboss-beans.xml
30 archivos 52.235.015 bytes
13 dirs 43.003.359.232 bytes libres
```

When I removed it I could do the deployment successfully.

Thanks again.