SEVERE: не удалось запустить Context [/ example] из-за предыдущих ошибок
Новое в комбинации Java EE + Spring + Hibernate + Maven. Попытка сделать простой проект с Tomcat 6.0.
Наш проект просто отлично, никаких проблем с отладкой. Но когда яя пытаюсь запустить сервер, он мне даетОшибка listenerStart " все время.
Я искал по всей сети в течение 3 дней, но не нашел решения об этой ошибке. Может кто-нибудь, пожалуйста, помогите мне об этой ситуации?
Спасибо за вашу помощь.
Мой консольный выход
13.Eki.2013 08:32:14 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.6.0_45\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;c:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\;C:\MinGW\bin;C:\Program Files (x86)\Notepad++;C:\J2ETutorial\apache-maven-3.0.5\bin;C:\Program Files\Apache Software Foundation\Tomcat 6.0\bin;C:\Program Files (x86)\SDCC\bin;.
13.Eki.2013 08:32:15 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8081
13.Eki.2013 08:32:15 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2219 ms
13.Eki.2013 08:32:15 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
13.Eki.2013 08:32:15 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.37
13.Eki.2013 08:32:21 org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
[INFO] [08:32:21.463] Root WebApplicationContext: initialization started
[INFO] [08:32:21.881] Refreshing Root WebApplicationContext: startup date [Sun Oct 13 08:32:21 VET 2013]; root of context hierarchy
[INFO] [08:32:22.365] Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext.xml]
[INFO] [08:32:22.689] Loading XML bean definitions from ServletContext resource [/WEB-INF/datasource-config.xml]
[INFO] [08:32:23.001] Loading XML bean definitions from ServletContext resource [/WEB-INF/webflow-config.xml]
[INFO] [08:32:23.622] Loading properties file from class path resource [datasource.properties]
[INFO] [08:32:23.626] Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@17991de1: defining beans [org.springframework.context.support.PropertySourcesPlaceholderConfigurer#0,dataSource,entityManagerFactory,transactionManager,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0,org.springframework.transaction.interceptor.TransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor,org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor#0,jpaFlowExecutionListener,facesContextListener,flowExecutor,flowRegistry,org.springframework.faces.model.converter.FacesConversionService#0,org.springframework.webflow.expression.spel.WebFlowSpringELExpressionParser#0,org.springframework.faces.webflow.JsfViewFactoryCreator#0,facesFlowBuilderServices,org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter#0,jsfResourceRequestHandler,org.springframework.web.servlet.handler.SimpleUrlHandlerMapping#0,org.springframework.webflow.mvc.servlet.FlowHandlerMapping#0,org.springframework.faces.webflow.JsfFlowHandlerAdapter#0,faceletsViewResolver,org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter#0,securityFlowExecutionListener]; root of factory hierarchy
[ERROR] [08:32:23.628] Context initialization failed
org.springframework.beans.factory.BeanInitializationException: Could not load properties; nested exception is java.io.FileNotFoundException: class path resource [datasource.properties] cannot be opened because it does not exist
at org.springframework.context.support.PropertySourcesPlaceholderConfigurer.postProcessBeanFactory(PropertySourcesPlaceholderConfigurer.java:147)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:681)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:656)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:446)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:385)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:284)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.io.FileNotFoundException: class path resource [datasource.properties] cannot be opened because it does not exist
at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:158)
at org.springframework.core.io.support.PropertiesLoaderSupport.loadProperties(PropertiesLoaderSupport.java:181)
at org.springframework.core.io.support.PropertiesLoaderSupport.mergeProperties(PropertiesLoaderSupport.java:161)
at org.springframework.context.support.PropertySourcesPlaceholderConfigurer.postProcessBeanFactory(PropertySourcesPlaceholderConfigurer.java:138)
... 21 more
13.Eki.2013 08:32:23 org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanInitializationException: Could not load properties; nested exception is java.io.FileNotFoundException: class path resource [datasource.properties] cannot be opened because it does not exist
at org.springframework.context.support.PropertySourcesPlaceholderConfigurer.postProcessBeanFactory(PropertySourcesPlaceholderConfigurer.java:147)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:681)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:656)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:446)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:385)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:284)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.io.FileNotFoundException: class path resource [datasource.properties] cannot be opened because it does not exist
at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:158)
at org.springframework.core.io.support.PropertiesLoaderSupport.loadProperties(PropertiesLoaderSupport.java:181)
at org.springframework.core.io.support.PropertiesLoaderSupport.mergeProperties(PropertiesLoaderSupport.java:161)
at org.springframework.context.support.PropertySourcesPlaceholderConfigurer.postProcessBeanFactory(PropertySourcesPlaceholderConfigurer.java:138)
... 21 more
13.Eki.2013 08:32:23 org.apache.catalina.core.ApplicationContext log
INFO: Set web app root system property: 'app1' = [C:\J2ETutorial\j2eeapplication\target\j2eeapplication-0.0.1-SNAPSHOT\]
13.Eki.2013 08:32:23 org.apache.catalina.core.ApplicationContext log
INFO: Initializing log4j from [C:\J2ETutorial\j2eeapplication\target\j2eeapplication-0.0.1-SNAPSHOT\WEB-INF\classes\log4j.xml]
13.Eki.2013 08:32:24 com.sun.faces.config.ConfigureListener contextInitialized
INFO: Initializing Mojarra 2.1.10 (-SNAPSHOT 20120625-1354) for context '/nil'
[INFO] [08:32:27.792] Hibernate Validator 4.2.0.Final
13.Eki.2013 08:32:29 org.primefaces.webapp.PostConstructApplicationEventListener processEvent
INFO: Running on PrimeFaces 3.4
13.Eki.2013 08:32:29 org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
13.Eki.2013 08:32:29 org.apache.catalina.core.StandardContext start
SEVERE: Context [/nil] startup failed due to previous errors
13.Eki.2013 08:32:29 org.apache.catalina.core.ApplicationContext log
INFO: Shutting down log4j
13.Eki.2013 08:32:29 org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext
13.Eki.2013 08:32:30 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8081
13.Eki.2013 08:32:30 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8010
13.Eki.2013 08:32:30 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/40 config=null
13.Eki.2013 08:32:30 org.apache.catalina.startup.Catalina start
INFO: Server startup in 15187 ms
-Мой файл Server.xml-
-Мой файл web.xml-
J2EE Application Example
webAppRootKey
app1
index.jsp
javax.faces.DEFAULT_SUFFIX
.xhtml
log4jConfigLocation
/WEB-INF/classes/log4j.xml
facelets.DEVELOPMENT
true
javax.faces.FACELETS_REFRESH_PERIOD
1
contextConfigLocation
/WEB-INF/applicationContext.xml
org.springframework.web.context.ContextLoaderListener
org.springframework.web.util.Log4jConfigListener
Resources Servlet
org.springframework.js.resource.ResourceServlet
0
Resources Servlet
/resources/*
Spring MVC Dispatcher Servlet
org.springframework.web.servlet.DispatcherServlet
contextConfigLocation
1
Spring MVC Dispatcher Servlet
/app/*
Faces Servlet
javax.faces.webapp.FacesServlet
1
Faces Servlet
*.jsf
charEncodingFilter
org.springframework.web.filter.CharacterEncodingFilter
encoding
UTF-8
forceEncoding
true
charEncodingFilter
/*
springSecurityFilterChain
org.springframework.web.filter.DelegatingFilterProxy
springSecurityFilterChain
/*
-Мой файл pom.xml-
4.0.0
com.example.j2eeapp
j2eeapplication
0.0.1-SNAPSHOT
war
J2EE Application Example
prime-repo
PrimeFaces Maven Repository
http://repository.primefaces.org
org.hibernate
hibernate-core
4.1.8.Final
org.hibernate
hibernate-validator
4.2.0.Final
junit
junit
4.8.2
test
org.springframework.webflow
spring-webflow
2.3.1.RELEASE
org.springframework.webflow
spring-faces
2.3.1.RELEASE
org.springframework
spring-orm
3.1.1.RELEASE
com.oracle
ojdbc14
10.2.0.1.0
log4j
log4j
1.2.16
com.sun.faces
jsf-impl
2.1.10
com.sun.facelets
jsf-facelets
1.1.14
com.sun.faces
jsf-api
2.1.10
commons-dbcp
commons-dbcp
20030825.184428
org.slf4j
slf4j-log4j12
1.6.4
javax.servlet
javax.servlet-api
3.0.1
provided
org.springframework
spring-tx
3.0.5.RELEASE
xml-apis
xml-apis
1.3.02
org.springframework.security
spring-security-web
3.1.3.RELEASE
org.springframework.security
spring-security-config
3.1.3.RELEASE
org.primefaces
primefaces
3.4
cglib
cglib
2.2.2
runtime
org.hibernate
hibernate-entitymanager
4.1.8.Final